Documentation
¶
Index ¶
- Constants
- Variables
- func Allocate(amt int) uintptr
- func Dispatch(f *Fault) error
- func NewSystemtable(tab []byte) (uint64, uint64, error)
- func RegisterCreator(n string, s serviceCreator)
- func RegisterGUIDCreator(n string, s serviceCreator)
- func SetAllocBase(b uint32)
- func SetAllocator(b, lim uintptr)
- func UEFIAllocate(amt uintptr, page bool) uint32
- type BlockIO
- type Boot
- type Collate
- type DevicePath
- type Fault
- type Func
- type Handle
- type ImageHandle
- type LoadedImage
- type Register
- type Runtime
- type ServBase
- type ServPtr
- type Service
- func AddrToService(addr uintptr) (Service, error)
- func NewBlockIO(tab []byte, u ServPtr) (Service, error)
- func NewBoot(tab []byte, u ServPtr) (Service, error)
- func NewCollate(tab []byte, u ServPtr) (Service, error)
- func NewDevicePath(tab []byte, u ServPtr) (Service, error)
- func NewLoadedImage(tab []byte, u ServPtr) (Service, error)
- func NewRuntime(tab []byte, u ServPtr) (Service, error)
- func NewTextIn(tab []byte, u ServPtr) (Service, error)
- func NewTextMode(tab []byte, u ServPtr) (Service, error)
- func NewTextOut(tab []byte, u ServPtr) (Service, error)
- type SystemTable
- type TextIn
- type TextMode
- type TextOut
Constants ¶
const LoadedImageProtocol = "5B1B31A1-9562-11D2-8E3F-00A0C969723B"
This protocol should be loaded FIRST. It should be at the base, currently 0xff000000
Variables ¶
var ( // Debug is for debugging messages. Debug = func(string, ...interface{}) {} )
var GUIDServices = []string{}
var services = map[string]Service
Functions ¶
func Dispatch ¶
Dispatch is called with an address. The address is split into a base and 16-bit offset. The base is not right-shifted or changed in any other way.
func NewSystemtable ¶
NewSystemtable returns a Systemtable Service, as well as the Image Handle. This must be the FIRST New called for a service. The system table is a kind of "root" of UEFI services, with pointers to boot, runtime, and other core services.
func RegisterCreator ¶
func RegisterCreator(n string, s serviceCreator)
RegisterCreator registers a service creator. Assumption: only called from init()
func RegisterGUIDCreator ¶
func RegisterGUIDCreator(n string, s serviceCreator)
RegisterGUIDService registers a service named by a GUID. Assumption: only called from init()
func SetAllocBase ¶
func SetAllocBase(b uint32)
func SetAllocator ¶
func SetAllocator(b, lim uintptr)
SetAllocator sets the base and limit of the bump-allocated data area.
func UEFIAllocate ¶
UEFIAllocate allocates memory for the DXE. If page is set, the alignment is 4k, else it is 8 bytes.
Types ¶
type BlockIO ¶
type BlockIO struct {
// contains filtered or unexported fields
}
BlockIO implements Service
type Boot ¶
type Boot struct {
// contains filtered or unexported fields
}
Boot implements Service
type Collate ¶
type Collate struct {
// contains filtered or unexported fields
}
Collate implements Service
type DevicePath ¶
type DevicePath struct {
// contains filtered or unexported fields
}
DevicePath implements Service But DevicePath *seems* to just be a blob of bytes. So it's a protocol, but it is just data? Who does this?
func (*DevicePath) Aliases ¶
func (d *DevicePath) Aliases() []string
type Fault ¶
type Fault struct { Proc trace.Trace Info *unix.SignalfdSiginfo Inst *x86asm.Inst Regs *syscall.PtraceRegs // We use Asm to figure out instruction type. Asm string Args []uintptr Op Func }
Fault defines all we need to know on a fault and how to do it.
type Handle ¶
type Handle struct {
// contains filtered or unexported fields
}
type ImageHandle ¶
type ImageHandle struct {
// contains filtered or unexported fields
}
This is for the special ImageHandle at services.ImageHandle ImageHandle implements Service
type LoadedImage ¶
type LoadedImage struct {
// contains filtered or unexported fields
}
LoadedImage implements Service
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime implements Service
type ServPtr ¶
type ServPtr uint32
func Base ¶
Base sets up a base address for a service. The base is chosen externally. When a DXE segvs, Dispatch will look up the Base and then dispatch to the correct Call function. Note that because this uses a string, one might set up names based on both a service name and a guid. Why, I have no idea.
type Service ¶
type Service interface { Call(f *Fault) error Base() ServBase Ptr() ServPtr OpenProtocol(f *Fault, h *Handle, g guid.GUID, ptr uintptr, ah, ch *Handle, attr uintptr) (*dispatch, error) Aliases() []string }
Service is the interface to services. In deference to the fact that we may be tracing more than one process, we pass the Tracee in as a parameter.
func AddrToService ¶
Service returns a service given an addr.
func NewBlockIO ¶
NewBlockIO returns a BlockIO Service A BlockIO contains an pointer, not an embedded struct.
func NewCollate ¶
NewCollate returns a Collate Service
func NewDevicePath ¶
NewDevicePath returns a DevicePath Service. Still not todally sure what to do here, so it's empty. A DevicePath contains an pointer, not an embedded struct.
func NewLoadedImage ¶
NewLoadedImage returns a LoadedImage Service
func NewRuntime ¶
NewRuntime returns a Runtime Service
func NewTextMode ¶
NewTextMode returns a TextMode Service
type SystemTable ¶
type SystemTable struct {
// contains filtered or unexported fields
}
Runtime implements Service
type TextIn ¶
type TextIn struct {
// contains filtered or unexported fields
}
TextIn implements Service
type TextMode ¶
type TextMode struct {
// contains filtered or unexported fields
}
TextMode implements Service
func (*TextMode) Call ¶
Call implements service.Call we don't care about textout mode. It's stupid. just ignore and move on.
type TextOut ¶
type TextOut struct {
// contains filtered or unexported fields
}
TextOut implements Service