protocol

package
v0.0.0-...-e83addd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2021 License: GPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LoadedImageRevision = 0x1000
)

More random constants for binary structs. It's all so 1980!

Variables

View Source
var CopyAble = map[string]*ProtocolHandle{}

CopyAble are ProtocolHandle with marshal'ed []byte that we can copy to the process memory.

Functions

This section is empty.

Types

type Handle

type Handle uintptr

Handle is a UEFI handle, whatever that is

type LoadedImage

type LoadedImage struct {
	Revision uint32
	Parent   Handle
	System   Table

	//
	// Source location of image
	//
	Device   Handle
	FilePath uintptr

	//
	// Images load options
	//
	LoadOptionsSize uint32
	LoadOptions     uintptr

	//
	// Location of where image was loaded
	//
	ImageBase     uintptr
	ImageSize     uint64
	ImageCodeType MemoryType
	ImageDataType MemoryType

	//
	// If the driver image supports a dynamic unload request
	//
	/*EFI_IMAGE_UNLOAD*/
	Unload uintptr
	// contains filtered or unexported fields
}

LoadedImage is for the Loaded Image Protocol.

func NewLoadedImage

func NewLoadedImage() (*LoadedImage, error)

NewLoadedImage returns a filled-in LoadedImage struct. As to correctness, we have no idea. General rule: never leave anything with the zero value. It makes debugging much harder. Unless there are stupid UEFI reasons to make it zero, i.e. they have some default "type" and zero is a valid value. note: a valid value of zero is always a mistake. See Unix file open.

func (LoadedImage) Marshal

func (i LoadedImage) Marshal() ([]byte, error)

type MemoryType

type MemoryType uint32

MemoryType is defined somewhere

type Path

type Path uintptr

Path is probably some pointer to what seemed a good character format in 1995

type ProtocolHandle

type ProtocolHandle struct {
	GUID string
	Data []byte
}

A ProtocolHandle is a string'ed GUID and its associated []byte. They are created by init functions.

type Table

type Table uintptr

Table is a UEFI table, ...

type TableMarshaler

type TableMarshaler interface {
	Marshal() ([]byte, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL