Documentation ¶
Index ¶
Constants ¶
const ( LoadedImageProtocol = "5B1B31A1-9562-11D2-8E3F-00A0C969723B" ConsoleSupportTest_SimpleTextInputExProtocolTest = "DD9E7534-7762-4698-8C14-F58517A625AA" )
const ( AllocateAnyPages = iota AllocateMaxAddress AllocateAddress MaxAllocateType )
allocate types They made the cardinal mistake of using 0-based contiguous range.
const ( EfiReservedMemoryType = iota EfiLoaderCode EfiLoaderData EfiBootServicesCode EfiBootServicesData EfiRuntimeServicesCode EfiRuntimeServicesData EfiConventionalMemory EfiUnusableMemory EfiACPIReclaimMemory EfiACPIMemoryNVS EfiMemoryMappedIO EfiMemoryMappedIOPortSpace EfiPalCode EfiMaxMemoryType = EfiPalCode )
const ( UC = 1 << iota WC WT WB UCE )
possible caching types for the memory range Caching Types
const ( // physical memory protection on range WP = 1 << (iota + 12) RP XP All = RP | WP | XP )
const ( // range requires a runtime mapping RequiresRuntimeMapping = 0x8000000000000000 // The memory descriptor version -- always 1. MemoryDescriptorVersion = 1 )
const ( EFI_SUCCESS = 0 EFI_LOAD_ERROR = (1) EFI_INVALID_PARAMETER = (2) EFI_UNSUPPORTED = (3) EFI_BAD_BUFFER_SIZE = (4) EFI_BUFFER_TOO_SMALL = (5) EFI_NOT_READY = (6) EFI_DEVICE_ERROR = (7) EFI_WRITE_PROTECTED = (8) EFI_OUT_OF_RESOURCES = (9) EFI_VOLUME_CORRUPTED = (10) EFI_VOLUME_FULL = (11) EFI_NO_MEDIA = (12) EFI_MEDIA_CHANGED = (13) EFI_NOT_FOUND = (14) EFI_ACCESS_DENIED = (15) EFI_NO_RESPONSE = (16) EFI_NO_MAPPING = (17) EFI_TIMEOUT = (18) EFI_NOT_STARTED = (19) EFI_ALREADY_STARTED = (20) EFI_ABORTED = (21) EFI_ICMP_ERROR = (22) EFI_TFTP_ERROR = (23) EFI_PROTOCOL_ERROR = (24) EFI_INCOMPATIBLE_VERSION = (25) EFI_SECURITY_VIOLATION = (26) EFI_CRC_ERROR = (27) EFI_END_OF_MEDIA = (28) EFI_END_OF_FILE = (31) EFI_INVALID_LANGUAGE = (32) EFI_COMPROMISED_DATA = (33) EFI_WARN_UNKOWN_GLYPH = (1) EFI_WARN_UNKNOWN_GLYPH = (1) EFI_WARN_DELETE_FAILURE = (2) EFI_WARN_WRITE_FAILURE = (3) EFI_WARN_BUFFER_TOO_SMALL = (4) )
All the things we hate about UEFI in one convenient place
const ( EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL = 0x00000001 EFI_OPEN_PROTOCOL_GET_PROTOCOL = 0x00000002 EFI_OPEN_PROTOCOL_TEST_PROTOCOL = 0x00000004 EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER = 0x00000008 EFI_OPEN_PROTOCOL_BY_DRIVER = 0x00000010 EFI_OPEN_PROTOCOL_EXCLUSIVE = 0x00000020 )
oh, barf. Did someone just not get the memo about using more than a single bit and in particular not using 1 to mean something. Guess so.
Variables ¶
var ( BlockIOGUID = guid.MustParse("964E5B21-6459-11D2-8E39-00A0C969723B") ConInGUID = guid.MustParse("387477C1-69C7-11D2-8E39-0A00C969723B") ConOutGUID = guid.MustParse("387477C2-69C7-11D2-8E39-0A00C969723B") LoadedImageGUID = guid.MustParse(LoadedImageProtocol) ConsoleSupportTest_SimpleTextInputExProtocolTestGUID = guid.MustParse(ConsoleSupportTest_SimpleTextInputExProtocolTest) )
var (
EFIVariables = map[string]*EFIVariable{}
)
Functions ¶
Types ¶
type EFIVariable ¶
EFIVariable is a variable type. In our can't-make-this-shit-up category, GUIDs have a name and a variable. Name because nobody likes to just use GUIDs. GUID because names might collide. Could they have done a path, back in the day? Well, sure, but GUIDs are so wonderful! We store the name as the form NAME:GUID, where name is the string and GUID is the string form of the GUID.
func ReadVariable ¶
func ReadVariable(n string, g guid.GUID) (*EFIVariable, error)
ReadVariable reads a UEFI variable