Documentation
¶
Overview ¶
Graphics Output Protocol (GOP) – §12.9 UEFI 2.10
Serial I/O Protocol (SIOP) – §12.8 UEFI 2.10
Index ¶
- Constants
- Variables
- func DebugPrint(text string, val uint64)
- func EFI_SPECIFICATION_REVISION_MAJORMINOR(major, minor uint16) uint32
- func Init(argImageHandle uintptr, argSystemTable uintptr)
- func OpenRoot(sfs *EFI_SIMPLE_FILE_SYSTEM_PROTOCOL) (*EFI_FILE_PROTOCOL, EFI_STATUS)
- func Ptrval(ptr any) uint64
- func UTF16PtrLenToString(input *CHAR16, length int) string
- func UTF16PtrToString(input *CHAR16) string
- func UTF16ToString(input []CHAR16) string
- func WaitForEvent(event EFI_EVENT)
- type BOOLEAN
- type CHAR16
- type DHCPv4
- type Disk
- type EFI_ALLOCATE_TYPE
- type EFI_BLOCK_IO_MEDIA
- type EFI_BLOCK_IO_PROTOCOL
- func (p *EFI_BLOCK_IO_PROTOCOL) FlushBlocks() EFI_STATUS
- func (p *EFI_BLOCK_IO_PROTOCOL) ReadBlocks(mediaId uint32, lba EFI_LBA, bufSize UINTN, buffer unsafe.Pointer) EFI_STATUS
- func (p *EFI_BLOCK_IO_PROTOCOL) Reset(extendedVerification bool) EFI_STATUS
- func (p *EFI_BLOCK_IO_PROTOCOL) WriteBlocks(mediaId uint32, lba EFI_LBA, bufSize UINTN, buffer unsafe.Pointer) EFI_STATUS
- type EFI_BOOT_SERVICES
- func (p *EFI_BOOT_SERVICES) AllocatePages(Type EFI_ALLOCATE_TYPE, MemoryType EFI_MEMORY_TYPE, Pages UINTN, ...) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) AllocatePool(PoolType EFI_MEMORY_TYPE, Size UINTN, Buffer **VOID) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) CalculateCrc32(Data *VOID, DataSize UINTN, Crc32 *uint32) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) CheckEvent(Event EFI_EVENT) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) CloseEvent(Event EFI_EVENT) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) CloseProtocol(Handle EFI_HANDLE, Protocol *EFI_GUID, AgentHandle EFI_HANDLE, ...) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) ConnectController(ControllerHandle EFI_HANDLE, DriverImageHandle *EFI_HANDLE, ...) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) CopyMem(Destination *VOID, Source *VOID, Length UINTN) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) CreateEvent(Type EVENT_TYPE, NotifyTpl EFI_TPL, NotifyFunction unsafe.Pointer, ...) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) CreateEventEx(Type uint32, NotifyTpl EFI_TPL, NotifyFunction unsafe.Pointer, ...) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) DisconnectController(ControllerHandle EFI_HANDLE, DriverImageHandle EFI_HANDLE, ...) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) Exit(ImageHandle EFI_HANDLE, ExitStatus EFI_STATUS, ExitDataSize UINTN, ...) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) ExitBootServices(ImageHandle EFI_HANDLE, MapKey UINTN) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) FreePages(Memory EFI_PHYSICAL_ADDRESS, Pages UINTN) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) FreePool(Buffer *VOID) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) GetMemoryMap(MemoryMapSize *UINTN, MemoryMap *EFI_MEMORY_DESCRIPTOR, MapKey *UINTN, ...) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) GetNextMonotonicCount(Count *uint64) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) HandleProtocol(Handle EFI_HANDLE, Protocol *EFI_GUID, Interface unsafe.Pointer) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) InstallConfigurationTable(Guid *EFI_GUID, Table *VOID) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) InstallMultipleProtocolInterfaces(Handle *EFI_HANDLE) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) InstallProtocolInterface(Handle *EFI_HANDLE, Protocol *EFI_GUID, InterfaceType EFI_INTERFACE_TYPE, ...) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) LoadImage(BootPolicy BOOLEAN, ParentImageHandle EFI_HANDLE, ...) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) LocateDevicePath(Protocol *EFI_GUID, DevicePath **EFI_DEVICE_PATH_PROTOCOL, Device *EFI_HANDLE) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) LocateHandle(SearchType EFI_LOCATE_SEARCH_TYPE, Protocol *EFI_GUID, SearchKey *VOID, ...) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) LocateHandleBuffer(SearchType EFI_LOCATE_SEARCH_TYPE, Protocol *EFI_GUID, SearchKey *VOID, ...) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) LocateProtocol(Protocol *EFI_GUID, Registration *VOID, InterfacePtr unsafe.Pointer) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) OpenProtocol(Handle EFI_HANDLE, Protocol *EFI_GUID, Interface **VOID, ...) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) OpenProtocolInformation(Handle EFI_HANDLE, Protocol *EFI_GUID, ...) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) ProtocolsPerHandle(Handle EFI_HANDLE, ProtocolBuffer ***EFI_GUID, ProtocolBufferCount *UINTN) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) RaiseTPL(NewTpl EFI_TPL) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) RegisterProtocolNotify(Protocol *EFI_GUID, Event EFI_EVENT, Registration **VOID) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) ReinstallProtocolInterface(Handle EFI_HANDLE, Protocol *EFI_GUID, OldInterface *VOID, NewInterface *VOID) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) RestoreTPL(OldTpl EFI_TPL) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) SetMem(Buffer *VOID, Size UINTN, Value byte) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) SetTimer(Event EFI_EVENT, Type EFI_TIMER_DELAY, TriggerTime uint64) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) SetWatchdogTimer(Timeout UINTN, WatchdogCode uint64, DataSize UINTN, WatchdogData *CHAR16) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) SignalEvent(Event EFI_EVENT) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) Stall(Microseconds UINTN) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) StartImage(ImageHandle EFI_HANDLE, ExitDataSize *UINTN, ExitData **CHAR16) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) UninstallMultipleProtocolInterfaces(Handle EFI_HANDLE) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) UninstallProtocolInterface(Handle EFI_HANDLE, Protocol *EFI_GUID, Interface *VOID) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) UnloadImage(ImageHandle EFI_HANDLE) EFI_STATUS
- func (p *EFI_BOOT_SERVICES) WaitForEvent(NumberOfEvents UINTN, Event *EFI_EVENT, Index *UINTN) EFI_STATUS
- type EFI_CAPSULE_BLOCK_DESCRIPTOR
- type EFI_CAPSULE_HEADER
- type EFI_CAPSULE_TABLE
- type EFI_CONFIGURATION_TABLE
- type EFI_DEVICE_PATH_PROTOCOL
- type EFI_DHCP4_CALLBACK
- type EFI_DHCP4_CONFIG_DATA
- type EFI_DHCP4_MODE_DATA
- type EFI_DHCP4_PACKET_OPTION
- type EFI_DHCP4_PROTOCOL
- func (p *EFI_DHCP4_PROTOCOL) Build(packetBuffer unsafe.Pointer) EFI_STATUS
- func (p *EFI_DHCP4_PROTOCOL) Configure(cfg *EFI_DHCP4_CONFIG_DATA) EFI_STATUS
- func (p *EFI_DHCP4_PROTOCOL) GetModeData(modeData *EFI_DHCP4_MODE_DATA) EFI_STATUS
- func (p *EFI_DHCP4_PROTOCOL) Parse(packetBuffer unsafe.Pointer, parseResult unsafe.Pointer) EFI_STATUS
- func (p *EFI_DHCP4_PROTOCOL) Release(asyncEvent *EFI_EVENT) EFI_STATUS
- func (p *EFI_DHCP4_PROTOCOL) RenewRebind(asyncEvent *EFI_EVENT) EFI_STATUS
- func (p *EFI_DHCP4_PROTOCOL) Start(asyncEvent *EFI_EVENT) EFI_STATUS
- func (p *EFI_DHCP4_PROTOCOL) Stop() EFI_STATUS
- func (p *EFI_DHCP4_PROTOCOL) TransmitReceive(token unsafe.Pointer) EFI_STATUS
- type EFI_DHCP4_SERVICE_BINDING_PROTOCOL
- type EFI_DISK_IO_PROTOCOL
- type EFI_EVENT
- type EFI_FILE_INFO
- type EFI_FILE_PROTOCOL
- func (p *EFI_FILE_PROTOCOL) Close() EFI_STATUS
- func (p *EFI_FILE_PROTOCOL) Delete() EFI_STATUS
- func (p *EFI_FILE_PROTOCOL) Flush() EFI_STATUS
- func (p *EFI_FILE_PROTOCOL) GetInfo(infoType *EFI_GUID, bufferSize *UINTN, buffer unsafe.Pointer) EFI_STATUS
- func (p *EFI_FILE_PROTOCOL) GetPosition(position *uint64) EFI_STATUS
- func (p *EFI_FILE_PROTOCOL) Open(newHandle **EFI_FILE_PROTOCOL, fileName *CHAR16, openMode uint64, ...) EFI_STATUS
- func (p *EFI_FILE_PROTOCOL) Read(bufferSize *UINTN, buffer unsafe.Pointer) EFI_STATUS
- func (p *EFI_FILE_PROTOCOL) SetInfo(infoType *EFI_GUID, bufferSize UINTN, buffer unsafe.Pointer) EFI_STATUS
- func (p *EFI_FILE_PROTOCOL) SetPosition(position uint64) EFI_STATUS
- func (p *EFI_FILE_PROTOCOL) Write(bufferSize *UINTN, buffer unsafe.Pointer) EFI_STATUS
- type EFI_FILE_SYSTEM_INFO
- type EFI_GRAPHICS_OUTPUT_BLT_OPERATION
- type EFI_GRAPHICS_OUTPUT_BLT_PIXEL
- type EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
- type EFI_GRAPHICS_OUTPUT_PROTOCOL
- func (p *EFI_GRAPHICS_OUTPUT_PROTOCOL) Blt(BltBuffer *EFI_GRAPHICS_OUTPUT_BLT_PIXEL, ...) EFI_STATUS
- func (p *EFI_GRAPHICS_OUTPUT_PROTOCOL) Init() (info *EFI_GRAPHICS_OUTPUT_MODE_INFORMATION)
- func (p *EFI_GRAPHICS_OUTPUT_PROTOCOL) QueryMode(ModeNumber uint32, SizeOfInfo *UINTN, ...) EFI_STATUS
- func (p *EFI_GRAPHICS_OUTPUT_PROTOCOL) SetMode(ModeNumber uint32) EFI_STATUS
- type EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE
- type EFI_GUID
- type EFI_HANDLE
- type EFI_INPUT_KEY
- type EFI_INTERFACE_TYPE
- type EFI_IP_ADDRESS
- type EFI_IPv4_ADDRESS
- type EFI_IPv6_ADDRESS
- type EFI_KEY_DATA
- type EFI_KEY_STATE
- type EFI_KEY_TOGGLE_STATE
- type EFI_LBA
- type EFI_LOADED_IMAGE_PROTOCOL
- type EFI_LOAD_OPTION
- type EFI_LOCATE_SEARCH_TYPE
- type EFI_MAC_ADDRESS
- type EFI_MEMORY_DESCRIPTOR
- type EFI_MEMORY_TYPE
- type EFI_OPEN_PROTOCOL_INFORMATION_ENTRY
- type EFI_PHYSICAL_ADDRESS
- type EFI_PIXEL_BITMASK
- type EFI_RESET_TYPE
- type EFI_RUNTIME_SERVICES
- func (p *EFI_RUNTIME_SERVICES) ConvertPointer(DebugDisposition UINTN, Address **VOID) EFI_STATUS
- func (p *EFI_RUNTIME_SERVICES) GetNextHighMonotonicCount(HighCount *uint32) EFI_STATUS
- func (p *EFI_RUNTIME_SERVICES) GetNextVariableName(VariableNameSize *UINTN, VariableName *CHAR16, VendorGuid *EFI_GUID) EFI_STATUS
- func (p *EFI_RUNTIME_SERVICES) GetTime(Time *EFI_TIME, Capabilities *EFI_TIME_CAPABILITIES) EFI_STATUS
- func (p *EFI_RUNTIME_SERVICES) GetVariable(VariableName *CHAR16, VendorGuid *EFI_GUID, Attributes *uint32, ...) EFI_STATUS
- func (p *EFI_RUNTIME_SERVICES) GetWakeupTime(Enabled *BOOLEAN, Pending *BOOLEAN, Time *EFI_TIME) EFI_STATUS
- func (p *EFI_RUNTIME_SERVICES) QueryCapsuleCapabilities(CapsuleHeaderArray **EFI_CAPSULE_HEADER, CapsuleCount UINTN, ...) EFI_STATUS
- func (p *EFI_RUNTIME_SERVICES) QueryVariableInfo(Attributes uint32, MaximumVariableStorageSize *uint64, ...) EFI_STATUS
- func (p *EFI_RUNTIME_SERVICES) ResetSystem(ResetType EFI_RESET_TYPE, ResetStatus EFI_STATUS, DataSize UINTN, ...) EFI_STATUS
- func (p *EFI_RUNTIME_SERVICES) SetTime(Time *EFI_TIME) EFI_STATUS
- func (p *EFI_RUNTIME_SERVICES) SetVariable(VariableName *CHAR16, VendorGuid *EFI_GUID, Attributes uint32, DataSize UINTN, ...) EFI_STATUS
- func (p *EFI_RUNTIME_SERVICES) SetVirtualAddressMap(MemoryMapSize UINTN, DescriptorSize UINTN, DescriptorVersion uint32, ...) EFI_STATUS
- func (p *EFI_RUNTIME_SERVICES) SetWakeupTime(Enable BOOLEAN, Time *EFI_TIME) EFI_STATUS
- func (p *EFI_RUNTIME_SERVICES) UpdateCapsule(CapsuleHeaderArray **EFI_CAPSULE_HEADER, CapsuleCount UINTN, ...) EFI_STATUS
- type EFI_SERIAL_IO_MODE
- type EFI_SERIAL_IO_PROTOCOL
- func (p *EFI_SERIAL_IO_PROTOCOL) GetControl(control *uint32) EFI_STATUS
- func (p *EFI_SERIAL_IO_PROTOCOL) Read(bufSize *UINTN, buffer unsafe.Pointer) EFI_STATUS
- func (p *EFI_SERIAL_IO_PROTOCOL) Reset() EFI_STATUS
- func (p *EFI_SERIAL_IO_PROTOCOL) SetAttributes(baudRate uint64, receiveFifoDepth uint32, timeout uint32, parity uint32, ...) EFI_STATUS
- func (p *EFI_SERIAL_IO_PROTOCOL) SetControl(control uint32) EFI_STATUS
- func (p *EFI_SERIAL_IO_PROTOCOL) Write(bufSize *UINTN, buffer unsafe.Pointer) EFI_STATUS
- type EFI_SIMPLE_FILE_SYSTEM_PROTOCOL
- type EFI_SIMPLE_NETWORK_MODE
- type EFI_SIMPLE_NETWORK_PROTOCOL
- type EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
- type EFI_SIMPLE_TEXT_INPUT_PROTOCOL
- type EFI_SIMPLE_TEXT_OUTPUT_MODE
- type EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
- func (p *EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) ClearScreen() EFI_STATUS
- func (p *EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) EnableCursor(Visible BOOLEAN) EFI_STATUS
- func (p *EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) OutputString(String *CHAR16) EFI_STATUS
- func (p *EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) QueryMode(ModeNumber UINTN, Columns *UINTN, Rows *UINTN) EFI_STATUS
- func (p *EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) Reset(ExtendedVerification BOOLEAN) EFI_STATUS
- func (p *EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) SetAttribute(Attribute UINTN) EFI_STATUS
- func (p *EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) SetCursorPosition(Column UINTN, Row UINTN) EFI_STATUS
- func (p *EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) SetMode(ModeNumber UINTN) EFI_STATUS
- func (p *EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) TestString(String *CHAR16) EFI_STATUS
- type EFI_STATUS
- func UefiCall0(fn uintptr) EFI_STATUS
- func UefiCall1(fn uintptr, a uintptr) EFI_STATUS
- func UefiCall2(fn uintptr, a uintptr, b uintptr) EFI_STATUS
- func UefiCall3(fn uintptr, a uintptr, b uintptr, c uintptr) EFI_STATUS
- func UefiCall4(fn uintptr, a uintptr, b uintptr, c uintptr, d uintptr) EFI_STATUS
- func UefiCall5(fn uintptr, a uintptr, b uintptr, c uintptr, d uintptr, e uintptr) EFI_STATUS
- func UefiCall6(fn uintptr, a uintptr, b uintptr, c uintptr, d uintptr, e uintptr, f uintptr) EFI_STATUS
- func UefiCall7(fn uintptr, a uintptr, b uintptr, c uintptr, d uintptr, e uintptr, f uintptr, ...) EFI_STATUS
- func UefiCall8(fn uintptr, a uintptr, b uintptr, c uintptr, d uintptr, e uintptr, f uintptr, ...) EFI_STATUS
- func UefiCall9(fn uintptr, a uintptr, b uintptr, c uintptr, d uintptr, e uintptr, f uintptr, ...) EFI_STATUS
- func UefiCall10(fn uintptr, a uintptr, b uintptr, c uintptr, d uintptr, e uintptr, f uintptr, ...) EFI_STATUS
- type EFI_SYSTEM_TABLE
- type EFI_TABLE_HEADER
- type EFI_TIME
- type EFI_TIMER_DELAY
- type EFI_TIME_CAPABILITIES
- type EFI_TPL
- type EFI_VIRTUAL_ADDRESS
- type EVENT_TYPE
- type Error
- type SerialPort
- type SimpleNetworkProtocol
- type UINTN
- type VOID
Constants ¶
const ( Dhcp4Stopped = iota Dhcp4Init Dhcp4Selecting Dhcp4Requesting Dhcp4Bound Dhcp4Renewing Dhcp4Rebinding Dhcp4InitReboot Dhcp4Rebooting )
EFI_DHCP4_STATE — DHCP state machine §29.2.3
const ( Dhcp4SendDiscover = iota + 1 Dhcp4RcvdOffer Dhcp4SelectOffer Dhcp4SendRequest Dhcp4RcvdAck Dhcp4RcvdNak Dhcp4SendDecline Dhcp4BoundCompleted Dhcp4EnterRenewing Dhcp4EnterRebinding Dhcp4AddressLost Dhcp4Fail )
EFI_DHCP4_EVENT tracks events in the DHCP process. §29.2.4
const ( PixelRedGreenBlueReserved8BitPerColor = iota PixelBlueGreenRedReserved8BitPerColor PixelBitMask PixelBltOnly PixelFormatMax )
const ( ParityDefault = iota ParityNone ParityEven ParityOdd ParityMark ParitySpace )
Parity – §13.4.1 Table 13-3
const ( StopBitsDefault = iota StopBits1 StopBits1_5 StopBits2 )
Stop bits – §13.4.1 Table 13-4
const ( EFI_SERIAL_DATA_TERMINAL_READY uint32 = 0x0001 EFI_SERIAL_REQUEST_TO_SEND uint32 = 0x0002 EFI_SERIAL_CLEAR_TO_SEND uint32 = 0x0010 EFI_SERIAL_DATA_SET_READY uint32 = 0x0020 EFI_SERIAL_RING_INDICATE uint32 = 0x0040 EFI_SERIAL_CARRIER_DETECT uint32 = 0x0080 EFI_SERIAL_INPUT_BUFFER_EMPTY uint32 = 0x0100 EFI_SERIAL_OUTPUT_BUFFER_EMPTY uint32 = 0x0200 EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE uint32 = 0x1000 EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE uint32 = 0x2000 EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE uint32 = 0x4000 )
Control-bit masks – §13.4.2
const ( EFI_FILE_MODE_READ uint64 = 0x0000000000000001 EFI_FILE_MODE_WRITE uint64 = 0x0000000000000002 EFI_FILE_MODE_CREATE uint64 = 0x8000000000000000 )
Open modes are 64-bit flags
const ( EFI_FILE_READ_ONLY uint64 = 0x0000000000000001 EFI_FILE_HIDDEN uint64 = 0x0000000000000002 EFI_FILE_SYSTEM uint64 = 0x0000000000000004 EFI_FILE_RESERVED uint64 = 0x0000000000000008 EFI_FILE_DIRECTORY uint64 = 0x0000000000000010 EFI_FILE_ARCHIVE uint64 = 0x0000000000000020 )
Attribute flags (also 64-bit)
const ( EFI_FILE_PROTOCOL_REVISION = 0x00010000 EFI_FILE_PROTOCOL_REVISION2 = 0x00020000 EFI_FILE_PROTOCOL_LATEST = EFI_FILE_PROTOCOL_REVISION2 )
Optional: known protocol revision values (not strictly required to use)
const ( EFI_SIMPLE_NETWORK_STOPPED = 0 EFI_SIMPLE_NETWORK_STARTED = 1 EFI_SIMPLE_NETWORK_INITIALIZED = 2 )
const ( EFI_SCROLL_LOCK_ACTIVE EFI_KEY_TOGGLE_STATE = 0x01 EFI_NUM_LOCK_ACTIVE = 0x02 EFI_CAPS_LOCK_ACTIVE = 0x04 EFI_KEY_STATE_EXPOSED = 0x40 EFI_TOGGLE_STATE_VALID = 0x80 )
const ( EFI_SHIFT_STATE_VALID = 0x80000000 EFI_RIGHT_SHIFT_PRESSED = 0x00000001 EFI_LEFT_SHIFT_PRESSED = 0x00000002 EFI_RIGHT_CONTROL_PRESSED = 0x00000004 EFI_LEFT_CONTROL_PRESSED = 0x00000008 EFI_RIGHT_ALT_PRESSED = 0x00000010 EFI_LEFT_ALT_PRESSED = 0x00000020 EFI_RIGHT_LOGO_PRESSED = 0x00000040 EFI_LEFT_LOGO_PRESSED = 0x00000080 EFI_MENU_KEY_PRESSED = 0x00000100 EFI_SYS_REQ_PRESSED = 0x00000200 )
const ( EFI_MEMORY_UC uint64 = 0x0000000000000001 EFI_MEMORY_WC uint64 = 0x0000000000000002 EFI_MEMORY_WT uint64 = 0x0000000000000004 EFI_MEMORY_WB uint64 = 0x0000000000000008 EFI_MEMORY_UCE uint64 = 0x0000000000000010 )
Memory cacheability attribute
const ( EFI_MEMORY_WP uint64 = 0x0000000000001000 EFI_MEMORY_RP uint64 = 0x0000000000002000 EFI_MEMORY_XP uint64 = 0x0000000000004000 EFI_MEMORY_RO uint64 = 0x0000000000020000 )
Physical memory protection attribute
const ( EFI_MEMORY_NV uint64 = 0x0000000000008000 EFI_MEMORY_RUNTIME uint64 = 0x8000000000000000 )
Runtime memory attribute
const ( EFI_MEMORY_MORE_RELIABLE uint64 = 0x0000000000010000 EFI_MEMORY_SP uint64 = 0x0000000000040000 EFI_MEMORY_CPU_CRYPTO uint64 = 0x0000000000080000 EFI_MEMORY_ISA_VALID uint64 = 0x4000000000000000 EFI_MEMORY_ISA_MASK uint64 = 0x0FFFF00000000000 )
Other memory attribute
const ( EFI_VARIABLE_NON_VOLATILE uint32 = 0x00000001 EFI_VARIABLE_BOOTSERVICE_ACCESS = 0x00000002 EFI_VARIABLE_RUNTIME_ACCESS = 0x00000004 )
Variable Service attribute bits
const ( EVT_TIMER EVENT_TYPE = 0x80000000 EVT_RUNTIME EVENT_TYPE = 0x40000000 EVT_RUNTIME_CONTEXT EVENT_TYPE = 0x20000000 EVT_NOTIFY_WAIT EVENT_TYPE = 0x00000100 EVT_NOTIFY_SIGNAL EVENT_TYPE = 0x00000200 EVT_SIGNAL_EXIT_BOOT_SERVICES EVENT_TYPE = 0x00000201 EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE EVENT_TYPE = 0x60000202 EVT_EFI_SIGNAL_MASK EVENT_TYPE = 0x000000FF EVT_EFI_SIGNAL_MAX EVENT_TYPE = 4 EFI_EVENT_TIMER = EVT_TIMER EFI_EVENT_RUNTIME = EVT_RUNTIME EFI_EVENT_RUNTIME_CONTEXT = EVT_RUNTIME_CONTEXT EFI_EVENT_NOTIFY_WAIT = EVT_NOTIFY_WAIT EFI_EVENT_NOTIFY_SIGNAL = EVT_NOTIFY_SIGNAL EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES = EVT_SIGNAL_EXIT_BOOT_SERVICES EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE = EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE EFI_EVENT_EFI_SIGNAL_MASK = EVT_EFI_SIGNAL_MASK EFI_EVENT_EFI_SIGNAL_MAX = EVT_EFI_SIGNAL_MAX )
const ( TPL_APPLICATION EFI_TPL = 4 TPL_CALLBACK EFI_TPL = 8 TPL_NOTIFY EFI_TPL = 16 TPL_HIGH_LEVEL EFI_TPL = 31 EFI_TPL_APPLICATION = TPL_APPLICATION EFI_TPL_CALLBACK = TPL_CALLBACK EFI_TPL_NOTIFY = TPL_NOTIFY EFI_TPL_HIGH_LEVEL = TPL_HIGH_LEVEL )
const EFI_BOOT_SERVICES_SIGNATURE = 0x56524553544f4f42
EFI_BOOT_SERVICES_SIGNATURE
const EFI_MEMORY_DESCRIPTOR_VERSION = 1
const EFI_RUNTIME_SERVICES_SIGNATURE = 0x56524553544e5552
const EFI_SPECIFICATION_MAJOR_REVISION uint16 = 1
EFI_SPECIFICATION_MAJOR_REVISION represents the major revision of the EFI Specification.
const EFI_SPECIFICATION_MINOR_REVISION uint16 = 2
EFI_SPECIFICATION_MINOR_REVISION represents the minor revision of the EFI Specification.
const EFI_SYSTEM_TABLE_SIGNATURE = 0x5453595320494249
EFI_SYSTEM_TABLE_SIGNATURE is the signature for the EFI system table.
Variables ¶
var ( ErrLoadError = newError(EFI_LOAD_ERROR, "image failed to load") ErrInvalidParameter = newError(EFI_INVALID_PARAMETER, "a parameter was incorrect") ErrUnsupported = newError(EFI_UNSUPPORTED, "operation not supported") ErrBadBufferSize = newError(EFI_BAD_BUFFER_SIZE, "buffer size incorrect for request") ErrBufferTooSmall = newError(EFI_BUFFER_TOO_SMALL, "buffer too small; size returned in parameter") ErrNotReady = newError(EFI_NOT_READY, "no data pending") ErrDeviceError = newError(EFI_DEVICE_ERROR, "physical device reported an error") ErrWriteProtected = newError(EFI_WRITE_PROTECTED, "device is write-protected") ErrOutOfResources = newError(EFI_OUT_OF_RESOURCES, "out of resources") ErrVolumeCorrupted = newError(EFI_VOLUME_CORRUPTED, "filesystem inconsistency detected") ErrVolumeFull = newError(EFI_VOLUME_FULL, "no more space on filesystem") ErrNoMedia = newError(EFI_NO_MEDIA, "device contains no medium") ErrMediaChanged = newError(EFI_MEDIA_CHANGED, "medium changed since last access") ErrNotFound = newError(EFI_NOT_FOUND, "item not found") ErrAccessDenied = newError(EFI_ACCESS_DENIED, "access denied") ErrNoResponse = newError(EFI_NO_RESPONSE, "server not found or no response") ErrNoMapping = newError(EFI_NO_MAPPING, "no device mapping exists") ErrTimeout = newError(EFI_TIMEOUT, "timeout expired") ErrNotStarted = newError(EFI_NOT_STARTED, "protocol not started") ErrAlreadyStarted = newError(EFI_ALREADY_STARTED, "protocol already started") ErrAborted = newError(EFI_ABORTED, "operation aborted") ErrICMPError = newError(EFI_ICMP_ERROR, "ICMP error during network operation") ErrTFTPError = newError(EFI_TFTP_ERROR, "TFTP error during network operation") ErrProtocolError = newError(EFI_PROTOCOL_ERROR, "protocol error during network operation") ErrIncompatibleVersion = newError(EFI_INCOMPATIBLE_VERSION, "requested version incompatible") ErrSecurityViolation = newError(EFI_SECURITY_VIOLATION, "security violation") ErrCRCError = newError(EFI_CRC_ERROR, "CRC error detected") ErrEndOfMedia = newError(EFI_END_OF_MEDIA, "beginning or end of media reached") ErrEndOfFile = newError(EFI_END_OF_FILE, "end of file reached") ErrInvalidLanguage = newError(EFI_INVALID_LANGUAGE, "invalid language specified") ErrCompromisedData = newError(EFI_COMPROMISED_DATA, "data security status unknown or compromised") ErrIPAddressConflict = newError(EFI_IP_ADDRESS_CONFLICT, "IP address conflict detected") ErrHTTPError = newError(EFI_HTTP_ERROR, "HTTP error during network operation") )
var ( ErrDiskNotReady = errors.New("disk not ready") ErrNoMediaPresent = errors.New("no media present") ErrNegativeOffset = errors.New("negative offset") ErrReadOnly = errors.New("media is read-only") )
Errors Disk IO and Block IO can return
var ( EFI_1_02_RUNTIME_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(1, 02) EFI_1_10_RUNTIME_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(1, 10) EFI_2_00_RUNTIME_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 00) EFI_2_10_RUNTIME_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 10) EFI_2_20_RUNTIME_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 20) EFI_2_30_RUNTIME_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 30) EFI_2_31_RUNTIME_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 31) EFI_2_40_RUNTIME_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 40) EFI_2_50_RUNTIME_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 50) EFI_2_60_RUNTIME_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 60) EFI_2_70_RUNTIME_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 70) EFI_2_80_RUNTIME_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 80) EFI_2_90_RUNTIME_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 90) EFI_2_100_RUNTIME_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 100) EFI_RUNTIME_SERVICES_REVISION = EFI_SPECIFICATION_VERSION )
var ( EFI_1_02_BOOT_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(1, 02) EFI_1_10_BOOT_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(1, 10) EFI_2_00_BOOT_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 00) EFI_2_10_BOOT_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 10) EFI_2_20_BOOT_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 20) EFI_2_30_BOOT_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 30) EFI_2_31_BOOT_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 31) EFI_2_40_BOOT_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 40) EFI_2_50_BOOT_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 50) EFI_2_60_BOOT_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 60) EFI_2_70_BOOT_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 70) EFI_2_80_BOOT_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 80) EFI_2_90_BOOT_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 90) EFI_2_100_BOOT_SERVICES_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 100) EFI_BOOT_SERVICES_REVISION = EFI_SPECIFICATION_VERSION )
EFI_BOOT_SERVICES_REVISION
var ( MPS_TABLE_GUID = EFI_GUID{ Data1: 0xeb9d2d2f, Data2: 0x2d88, Data3: 0x11d3, Data4: [8]uint8{0x9a, 0x16, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d}, } ACPI_TABLE_GUID = EFI_GUID{ Data1: 0xeb9d2d30, Data2: 0x2d88, Data3: 0x11d3, Data4: [8]uint8{0x9a, 0x16, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d}, } ACPI_20_TABLE_GUID = EFI_GUID{ Data1: 0x8868e871, Data2: 0xe4f1, Data3: 0x11d3, Data4: [8]uint8{0xbc, 0x22, 0x00, 0x80, 0xc7, 0x3c, 0x88, 0x81}, } SMBIOS_TABLE_GUID = EFI_GUID{ Data1: 0xeb9d2d31, Data2: 0x2d88, Data3: 0x11d3, Data4: [8]uint8{0x9a, 0x16, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d}, } SMBIOS3_TABLE_GUID = EFI_GUID{ Data1: 0xf2fd1544, Data2: 0x9794, Data3: 0x4a2c, Data4: [8]uint8{0x99, 0x2e, 0xe5, 0xbb, 0xcf, 0x20, 0xe3, 0x94}, } SAL_SYSTEM_TABLE_GUID = EFI_GUID{ Data1: 0xeb9d2d32, Data2: 0x2d88, Data3: 0x11d3, Data4: [8]uint8{0x9a, 0x16, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d}, } EFI_DTB_TABLE_GUID = EFI_GUID{ Data1: 0xb1b621d5, Data2: 0xf19c, Data3: 0x41a5, Data4: [8]uint8{0x83, 0x0b, 0xd9, 0x15, 0x2c, 0x69, 0xaa, 0xe0}, } )
EFI_GUID definitions
var ( EFI1_02_SYSTEM_TABLE_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(1, 02) EFI1_10_SYSTEM_TABLE_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(1, 10) EFI2_00_SYSTEM_TABLE_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 00) EFI2_10_SYSTEM_TABLE_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 10) EFI2_20_SYSTEM_TABLE_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 20) EFI2_30_SYSTEM_TABLE_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 30) EFI2_31_SYSTEM_TABLE_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 31) EFI2_40_SYSTEM_TABLE_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 40) EFI2_50_SYSTEM_TABLE_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 50) EFI2_60_SYSTEM_TABLE_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 60) EFI2_70_SYSTEM_TABLE_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 70) EFI2_80_SYSTEM_TABLE_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 80) EFI2_90_SYSTEM_TABLE_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 90) EFI2_100_SYSTEM_TABLE_REVISION = EFI_SPECIFICATION_REVISION_MAJORMINOR(2, 100) EFISYSTEM_TABLE_REVISION = EFI_SPECIFICATION_VERSION )
var EFI_BLOCK_IO_PROTOCOL_GUID = EFI_GUID{ 0x964E5B21, 0x6459, 0x11D2, [8]uint8{0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b}, }
EFI_BLOCK_IO_PROTOCOL_GUID = {964E5B21-6459-11d2-8E39-00A0C969723B}
var EFI_DEVICE_PATH_PROTOCOL_GUID = EFI_GUID{0x9576e91, 0x6d3f, 0x11d2, [8]uint8{0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b}}
var EFI_DHCP4_PROTOCOL_GUID = EFI_GUID{ 0x8a219718, 0x4ef5, 0x4761, [8]uint8{0x91, 0xc8, 0xc0, 0xf0, 0x4b, 0xda, 0x9e, 0x56}, }
EFI_DHCP4_PROTOCOL_GUID — §29.2.2
var EFI_DHCP4_SERVICE_BINDING_PROTOCOL_GUID = EFI_GUID{ 0x9d9a39d8, 0xbd42, 0x4a73, [8]uint8{0xa4, 0xd5, 0x8e, 0xe9, 0x4b, 0xe1, 0x13, 0x80}, }
EFI_DHCP4_SERVICE_BINDING_PROTOCOL_GUID — §29.2.1
var EFI_DISK_IO_PROTOCOL_GUID = EFI_GUID{ 0xCE345171, 0xBA0B, 0x11D2, [8]uint8{0x8e, 0x4f, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b}, }
EFI_DISK_IO_PROTOCOL_GUID = {CE345171-BA0B-11d2-8E4F-00A0C969723B}
var EFI_FILE_INFO_ID = EFI_GUID{ 0x09576e92, 0x6d3f, 0x11d2, [8]uint8{0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b}, }
gEfiFileInfoGuid = {09576E92-6D3F-11D2-8E39-00A0C969723B}
var EFI_FILE_SYSTEM_INFO_ID = EFI_GUID{ 0x09576e93, 0x6d3f, 0x11d2, [8]uint8{0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b}, }
gEfiFileSystemInfoGuid = {09576E93-6D3F-11D2-8E39-00A0C969723B}
var EFI_FILE_SYSTEM_VOLUME_LABEL_ID = EFI_GUID{ 0xdb47d7d3, 0xfe81, 0x11d3, [8]uint8{0x9a, 0x35, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d}, }
gEfiFileSystemVolumeLabelInfoIdGuid = {DB47D7D3-FE81-11D3-9A35-0090273FC14D}
var EFI_LOADED_IMAGE_GUID = EFI_GUID{0x5B1B31A1, 0x9562, 0x11d2, [8]uint8{0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B}}
var EFI_LOADED_IMAGE_PROTOCOL_GUID = EFI_GUID{ 0x5B1B31A1, 0x9562, 0x11d2, [...]byte{0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B}}
var EFI_SERIAL_IO_PROTOCOL_GUID = EFI_GUID{ 0xBB25CF6F, 0xF1D4, 0x11D2, [8]uint8{0x9a, 0x0c, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0xfd}, }
{BB25CF6F-F1A1-4F11-9E5A-AE8C109A771F}
var EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID = EFI_GUID{ 0x964E5B22, 0x6459, 0x11D2, [8]uint8{0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b}, }
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID = {964E5B22-6459-11D2-8E39-00A0C969723B}
var EFI_SIMPLE_NETWORK_PROTOCOL_GUID = EFI_GUID{ 0xA19832B9, 0xAC25, 0x11D3, [8]uint8{0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D}, }
{A19832B9-AC25-11D3-9A2D-0090273FC14D}
var EFI_SPECIFICATION_VERSION = EFI_SPECIFICATION_REVISION_MAJORMINOR(EFI_SPECIFICATION_MAJOR_REVISION, EFI_SPECIFICATION_MINOR_REVISION)
EFI_SPECIFICATION_VERSION represents the combined major and minor revision of the EFI Specification.
var GraphicsOutputProtocolGUID = EFI_GUID{ 0x9042a9de, 0x23dc, 0x4a38, [8]uint8{0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a}, }
{9042A9DE-23DC-4A38-96FB-7ADED080516A}
var SimpleTextInputExProtocolGUID = EFI_GUID{ 0xdd9e7534, 0x7762, 0x4698, [...]byte{0x8c, 0x14, 0xf5, 0x85, 0x17, 0xa6, 0x25, 0xaa}}
var EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID = EFI_GUID{
Functions ¶
func DebugPrint ¶
func EFI_SPECIFICATION_REVISION_MAJORMINOR ¶
EFI_SPECIFICATION_REVISION_MAJORMINOR combines the major and minor revision into a single value. @param major Major revision @param minor Minor revision @return Combined major and minor revision
func OpenRoot ¶
func OpenRoot(sfs *EFI_SIMPLE_FILE_SYSTEM_PROTOCOL) (*EFI_FILE_PROTOCOL, EFI_STATUS)
OpenRoot opens the volume root directory for a given SFS.
func UTF16PtrLenToString ¶
func UTF16PtrToString ¶
func UTF16ToString ¶
func WaitForEvent ¶
func WaitForEvent(event EFI_EVENT)
WaitForEvent blocks execution while yielding to other goroutines which differs from BS().WaitForEvent, which is a hard-block; the CPU is entirely stalled.
Types ¶
type DHCPv4 ¶
type DHCPv4 struct {
*EFI_DHCP4_PROTOCOL
}
DHCPv4 wraps EFI_DHCP4_PROTOCOL to provide a more go idiomatic API for handling DHCPv4.
func EnumerateDHCPv4 ¶
type Disk ¶
type Disk struct {
DiskIO *EFI_DISK_IO_PROTOCOL
BlockIO *EFI_BLOCK_IO_PROTOCOL
}
Disk bundles Disk I/O with its backing Block I/O (for MediaId, size, alignment).
func EnumerateDisks ¶
EnumerateDisks returns Disk adapters for every handle that exposes both Disk I/O and Block I/O.
func (*Disk) SectorSize ¶
SectorSize returns the logical block size in bytes.
type EFI_ALLOCATE_TYPE ¶
type EFI_ALLOCATE_TYPE int
const ( AllocateAnyPages EFI_ALLOCATE_TYPE = iota AllocateMaxAddress AllocateAddress MaxAllocateType )
type EFI_BLOCK_IO_MEDIA ¶
type EFI_BLOCK_IO_MEDIA struct {
MediaId uint32
RemovableMedia bool
MediaPresent bool
LogicalPartition bool
ReadOnly bool
WriteCaching bool
BlockSize uint32
IoAlign uint32
LastBlock EFI_LBA
}
Classic subset of MEDIA fields (UEFI 2.x adds more tail fields; we keep the common prefix)
type EFI_BLOCK_IO_PROTOCOL ¶
type EFI_BLOCK_IO_PROTOCOL struct {
Revision uint64
Media *EFI_BLOCK_IO_MEDIA
// contains filtered or unexported fields
}
§Block I/O function table order: Revision, Media, Reset, ReadBlocks, WriteBlocks, FlushBlocks
func (*EFI_BLOCK_IO_PROTOCOL) FlushBlocks ¶
func (p *EFI_BLOCK_IO_PROTOCOL) FlushBlocks() EFI_STATUS
FlushBlocks flushes any device caches.
func (*EFI_BLOCK_IO_PROTOCOL) ReadBlocks ¶
func (p *EFI_BLOCK_IO_PROTOCOL) ReadBlocks(mediaId uint32, lba EFI_LBA, bufSize UINTN, buffer unsafe.Pointer) EFI_STATUS
ReadBlocks reads raw LBAs into Buffer (size in bytes).
func (*EFI_BLOCK_IO_PROTOCOL) Reset ¶
func (p *EFI_BLOCK_IO_PROTOCOL) Reset(extendedVerification bool) EFI_STATUS
Reset the device (optionally extended verification)
func (*EFI_BLOCK_IO_PROTOCOL) WriteBlocks ¶
func (p *EFI_BLOCK_IO_PROTOCOL) WriteBlocks(mediaId uint32, lba EFI_LBA, bufSize UINTN, buffer unsafe.Pointer) EFI_STATUS
WriteBlocks writes raw LBAs from Buffer (size in bytes).
type EFI_BOOT_SERVICES ¶
type EFI_BOOT_SERVICES struct {
Hdr EFI_TABLE_HEADER
Reserved *VOID
// contains filtered or unexported fields
}
EFI_BOOT_SERVICES EFI Boot Services Table.
func BS ¶
func BS() *EFI_BOOT_SERVICES
func (*EFI_BOOT_SERVICES) AllocatePages ¶
func (p *EFI_BOOT_SERVICES) AllocatePages(Type EFI_ALLOCATE_TYPE, MemoryType EFI_MEMORY_TYPE, Pages UINTN, Memory *EFI_PHYSICAL_ADDRESS) EFI_STATUS
AllocatePages Allocates memory pages from the system. @param[in] Type The type of allocation to perform. @param[in] MemoryType The type of memory to allocate. ..............................MemoryType values in the range 0x70000000..0x7FFFFFFF ..............................are reserved for OEM use. MemoryType values in the range ..............................0x80000000..0xFFFFFFFF are reserved for use by UEFI OS loaders ..............................that are provided by operating system vendors. @param[in] Pages The number of contiguous 4 KB pages to allocate. @param[in, out] Memory The pointer to a physical address. On input, the way in which the address is .................used depends on the value of Type. @retval EFI_SUCCESS The requested pages were allocated. @retval EFI_INVALID_PARAMETER 1) Type is not AllocateAnyPages or ..............................AllocateMaxAddress or AllocateAddress. ..............................2) MemoryType is in the range ..............................EfiMaxMemoryType..0x6FFFFFFF. ..............................3) Memory is NULL. ..............................4) MemoryType is EfiPersistentMemory. @retval EFI_OUT_OF_RESOURCES The pages could not be allocated. @retval EFI_NOT_FOUND The requested pages could not be found.
func (*EFI_BOOT_SERVICES) AllocatePool ¶
func (p *EFI_BOOT_SERVICES) AllocatePool(PoolType EFI_MEMORY_TYPE, Size UINTN, Buffer **VOID) EFI_STATUS
AllocatePool Allocates pool memory. @param[in] PoolType The type of pool to allocate. ..............................MemoryType values in the range 0x70000000..0x7FFFFFFF ..............................are reserved for OEM use. MemoryType values in the range ..............................0x80000000..0xFFFFFFFF are reserved for use by UEFI OS loaders ..............................that are provided by operating system vendors. @param[in] Size The number of bytes to allocate from the pool. @param[out] Buffer A pointer to a pointer to the allocated buffer if the call succeeds; ..............................undefined otherwise. @retval EFI_SUCCESS The requested number of bytes was allocated. @retval EFI_OUT_OF_RESOURCES The pool requested could not be allocated. @retval EFI_INVALID_PARAMETER Buffer is NULL. ..............................PoolType is in the range EfiMaxMemoryType..0x6FFFFFFF. ..............................PoolType is EfiPersistentMemory.
func (*EFI_BOOT_SERVICES) CalculateCrc32 ¶
func (p *EFI_BOOT_SERVICES) CalculateCrc32(Data *VOID, DataSize UINTN, Crc32 *uint32) EFI_STATUS
CalculateCrc32 Computes and returns a 32-bit CRC for a data buffer. @param[in] Data A pointer to the buffer on which the 32-bit CRC is to be computed. @param[in] DataSize The number of bytes in the buffer Data. @param[out] Crc32 The 32-bit CRC that was computed for the data buffer specified by Data ..............................and DataSize. @retval EFI_SUCCESS The 32-bit CRC was computed for the data buffer and returned in ..............................Crc32. @retval EFI_INVALID_PARAMETER Data is NULL. @retval EFI_INVALID_PARAMETER Crc32 is NULL. @retval EFI_INVALID_PARAMETER DataSize is 0.
func (*EFI_BOOT_SERVICES) CheckEvent ¶
func (p *EFI_BOOT_SERVICES) CheckEvent(Event EFI_EVENT) EFI_STATUS
CheckEvent Checks whether an event is in the signaled state. @param[in] Event The event to check. @retval EFI_SUCCESS The event is in the signaled state. @retval EFI_NOT_READY The event is not in the signaled state. @retval EFI_INVALID_PARAMETER Event is of type EVT_NOTIFY_SIGNAL.
func (*EFI_BOOT_SERVICES) CloseEvent ¶
func (p *EFI_BOOT_SERVICES) CloseEvent(Event EFI_EVENT) EFI_STATUS
CloseEvent Closes an event. @param[in] Event The event to close. @retval EFI_SUCCESS The event has been closed.
func (*EFI_BOOT_SERVICES) CloseProtocol ¶
func (p *EFI_BOOT_SERVICES) CloseProtocol(Handle EFI_HANDLE, Protocol *EFI_GUID, AgentHandle EFI_HANDLE, ControllerHandle EFI_HANDLE) EFI_STATUS
CloseProtocol Closes a protocol on a handle that was opened using OpenProtocol(). @param[in] Handle The handle for the protocol interface that was previously opened ..............................with OpenProtocol(), and is now being closed. @param[in] Protocol The published unique identifier of the protocol. @param[in] AgentHandle The handle of the agent that is closing the protocol interface. @param[in] ControllerHandle If the agent that opened a protocol is a driver that follows the ..............................UEFI Driver Model, then this parameter is the controller handle ..............................that required the protocol interface. @retval EFI_SUCCESS The protocol instance was closed. @retval EFI_INVALID_PARAMETER 1) Handle is NULL. ..............................2) AgentHandle is NULL. ..............................3) ControllerHandle is not NULL and ControllerHandle is not a valid EFI_HANDLE. ..............................4) Protocol is NULL. @retval EFI_NOT_FOUND 1) Handle does not support the protocol specified by Protocol. ..............................2) The protocol interface specified by Handle and Protocol is not ..............................currently open by AgentHandle and ControllerHandle.
func (*EFI_BOOT_SERVICES) ConnectController ¶
func (p *EFI_BOOT_SERVICES) ConnectController(ControllerHandle EFI_HANDLE, DriverImageHandle *EFI_HANDLE, RemainingDevicePath *EFI_DEVICE_PATH_PROTOCOL, Recursive BOOLEAN) EFI_STATUS
ConnectController Connects one or more drivers to a controller. @param[in] ControllerHandle The handle of the controller to which driver(s) are to be connected. @param[in] DriverImageHandle A pointer to an ordered list handles that support the ..................................EFI_DRIVER_BINDING_PROTOCOL. @param[in] RemainingDevicePath A pointer to the device path that specifies a child of the ..................................controller specified by ControllerHandle. @param[in] Recursive If TRUE, then ConnectController() is called recursively ..................................until the entire tree of controllers below the controller specified ..................................by ControllerHandle have been created. If FALSE, then ..................................the tree of controllers is only expanded one level. @retval EFI_SUCCESS 1) One or more drivers were connected to ControllerHandle. ..............................2) No drivers were connected to ControllerHandle, but ..............................RemainingDevicePath is not NULL, and it is an End Device ..............................Path Node. @retval EFI_INVALID_PARAMETER ControllerHandle is NULL. @retval EFI_NOT_FOUND 1) There are no EFI_DRIVER_BINDING_PROTOCOL instances ..............................present in the system. ..............................2) No drivers were connected to ControllerHandle. ..............................@retval EFI_SECURITY_VIOLATION ..............................The user has no permission to start UEFI device drivers on the device path ..............................associated with the ControllerHandle or specified by the RemainingDevicePath.
func (*EFI_BOOT_SERVICES) CopyMem ¶
func (p *EFI_BOOT_SERVICES) CopyMem(Destination *VOID, Source *VOID, Length UINTN) EFI_STATUS
CopyMem Copies the contents of one buffer to another buffer. @param[in] Destination The pointer to the destination buffer of the memory copy. @param[in] Source The pointer to the source buffer of the memory copy. @param[in] Length Number of bytes to copy from Source to Destination.
func (*EFI_BOOT_SERVICES) CreateEvent ¶
func (p *EFI_BOOT_SERVICES) CreateEvent(Type EVENT_TYPE, NotifyTpl EFI_TPL, NotifyFunction unsafe.Pointer, NotifyContext unsafe.Pointer, Event *EFI_EVENT) EFI_STATUS
CreateEvent Creates an event. @param[in] Type The type of event to create and its mode and attributes. @param[in] NotifyTpl The task priority level of event notifications, if needed. @param[in] NotifyFunction The pointer to the event's notification function, if any. @param[in] NotifyContext The pointer to the notification function's context; corresponds to parameter ..............................Context in the notification function. @param[out] Event The pointer to the newly created event if the call succeeds; undefined ..............................otherwise. @retval EFI_SUCCESS The event structure was created. @retval EFI_INVALID_PARAMETER One or more parameters are invalid. @retval EFI_OUT_OF_RESOURCES The event could not be allocated.
func (*EFI_BOOT_SERVICES) CreateEventEx ¶
func (p *EFI_BOOT_SERVICES) CreateEventEx(Type uint32, NotifyTpl EFI_TPL, NotifyFunction unsafe.Pointer, NotifyContext uintptr, EventGroup *EFI_GUID, Event *EFI_EVENT) EFI_STATUS
CreateEventEx Creates an event in a group. @param[in] Type The type of event to create and its mode and attributes. @param[in] NotifyTpl The task priority level of event notifications,if needed. @param[in] NotifyFunction The pointer to the event's notification function, if any. @param[in] NotifyContext The pointer to the notification function's context; corresponds to parameter ..............................Context in the notification function. @param[in] EventGroup The pointer to the unique identifier of the group to which this event belongs. ..............................If this is NULL, then the function behaves as if the parameters were passed ..............................to CreateEvent. @param[out] Event The pointer to the newly created event if the call succeeds; undefined ..............................otherwise. @retval EFI_SUCCESS The event structure was created. @retval EFI_INVALID_PARAMETER One or more parameters are invalid. @retval EFI_OUT_OF_RESOURCES The event could not be allocated.
func (*EFI_BOOT_SERVICES) DisconnectController ¶
func (p *EFI_BOOT_SERVICES) DisconnectController(ControllerHandle EFI_HANDLE, DriverImageHandle EFI_HANDLE, ChildHandle EFI_HANDLE) EFI_STATUS
DisconnectController Disconnects one or more drivers from a controller. @param[in] ControllerHandle The handle of the controller from which driver(s) are to be disconnected. @param[in] DriverImageHandle The driver to disconnect from ControllerHandle. ..................................If DriverImageHandle is NULL, then all the drivers currently managing ..................................ControllerHandle are disconnected from ControllerHandle. @param[in] ChildHandle The handle of the child to destroy. ..................................If ChildHandle is NULL, then all the children of ControllerHandle are ..................................destroyed before the drivers are disconnected from ControllerHandle. @retval EFI_SUCCESS 1) One or more drivers were disconnected from the controller. ..............................2) On entry, no drivers are managing ControllerHandle. ..............................3) DriverImageHandle is not NULL, and on entry ..............................DriverImageHandle is not managing ControllerHandle. @retval EFI_INVALID_PARAMETER 1) ControllerHandle is NULL. ..............................2) DriverImageHandle is not NULL, and it is not a valid EFI_HANDLE. ..............................3) ChildHandle is not NULL, and it is not a valid EFI_HANDLE. ..............................4) DriverImageHandle does not support the EFI_DRIVER_BINDING_PROTOCOL. @retval EFI_OUT_OF_RESOURCES There are not enough resources available to disconnect any drivers from ..............................ControllerHandle. @retval EFI_DEVICE_ERROR The controller could not be disconnected because of a device error.
func (*EFI_BOOT_SERVICES) Exit ¶
func (p *EFI_BOOT_SERVICES) Exit(ImageHandle EFI_HANDLE, ExitStatus EFI_STATUS, ExitDataSize UINTN, ExitData *CHAR16) EFI_STATUS
Exit Terminates a loaded EFI image and returns control to boot services. @param[in] ImageHandle Handle that identifies the image. This parameter is passed to the ..............................image on entry. @param[in] ExitStatus The image's exit code. @param[in] ExitDataSize The size, in bytes, of ExitData. Ignored if ExitStatus is EFI_SUCCESS. @param[in] ExitData The pointer to a data buffer that includes a Null-terminated string, ..............................optionally followed by additional binary data. The string is a ..............................description that the caller may use to further indicate the reason ..............................for the image's exit. ExitData is only valid if ExitStatus ..............................is something other than EFI_SUCCESS. The ExitData buffer ..............................must be allocated by calling AllocatePool(). @retval EFI_SUCCESS The image specified by ImageHandle was unloaded. @retval EFI_INVALID_PARAMETER The image specified by ImageHandle has been loaded and ..............................started with LoadImage() and StartImage(), but the ..............................image is not the currently executing image.
func (*EFI_BOOT_SERVICES) ExitBootServices ¶
func (p *EFI_BOOT_SERVICES) ExitBootServices(ImageHandle EFI_HANDLE, MapKey UINTN) EFI_STATUS
ExitBootServices Terminates all boot services. @param[in] ImageHandle Handle that identifies the exiting image. @param[in] MapKey Key to the latest memory map. @retval EFI_SUCCESS Boot services have been terminated. @retval EFI_INVALID_PARAMETER MapKey is incorrect.
func (*EFI_BOOT_SERVICES) FreePages ¶
func (p *EFI_BOOT_SERVICES) FreePages(Memory EFI_PHYSICAL_ADDRESS, Pages UINTN) EFI_STATUS
FreePages Frees memory pages. @param[in] Memory The base physical address of the pages to be freed. @param[in] Pages The number of contiguous 4 KB pages to free. @retval EFI_SUCCESS The requested pages were freed. @retval EFI_INVALID_PARAMETER Memory is not a page-aligned address or Pages is invalid. @retval EFI_NOT_FOUND The requested memory pages were not allocated with ..............................AllocatePages().
func (*EFI_BOOT_SERVICES) FreePool ¶
func (p *EFI_BOOT_SERVICES) FreePool(Buffer *VOID) EFI_STATUS
FreePool Returns pool memory to the system. @param[in] Buffer The pointer to the buffer to free. @retval EFI_SUCCESS The memory was returned to the system. @retval EFI_INVALID_PARAMETER Buffer was invalid.
func (*EFI_BOOT_SERVICES) GetMemoryMap ¶
func (p *EFI_BOOT_SERVICES) GetMemoryMap(MemoryMapSize *UINTN, MemoryMap *EFI_MEMORY_DESCRIPTOR, MapKey *UINTN, DescriptorSize *UINTN, DescriptorVersion *uint32) EFI_STATUS
GetMemoryMap Returns the current memory map. @param[in, out] MemoryMapSize A pointer to the size, in bytes, of the MemoryMap buffer. .................On input, this is the size of the buffer allocated by the caller. .................On output, it is the size of the buffer returned by the firmware if .................the buffer was large enough, or the size of the buffer needed to contain .................the map if the buffer was too small. @param[out] MemoryMap A pointer to the buffer in which firmware places the current memory .......................................map. @param[out] MapKey A pointer to the location in which firmware returns the key for the .......................................current memory map. @param[out] DescriptorSize A pointer to the location in which firmware returns the size, in bytes, of .......................................an individual EFI_MEMORY_DESCRIPTOR. @param[out] DescriptorVersion A pointer to the location in which firmware returns the version number .......................................associated with the EFI_MEMORY_DESCRIPTOR. @retval EFI_SUCCESS The memory map was returned in the MemoryMap buffer. @retval EFI_BUFFER_TOO_SMALL The MemoryMap buffer was too small. The current buffer size ..............................needed to hold the memory map is returned in MemoryMapSize. @retval EFI_INVALID_PARAMETER 1) MemoryMapSize is NULL. ..............................2) The MemoryMap buffer is not too small and MemoryMap is ..............................NULL.
func (*EFI_BOOT_SERVICES) GetNextMonotonicCount ¶
func (p *EFI_BOOT_SERVICES) GetNextMonotonicCount(Count *uint64) EFI_STATUS
GetNextMonotonicCount Returns a monotonically increasing count for the platform. @param[out] Count The pointer to returned value. @retval EFI_SUCCESS The next monotonic count was returned. @retval EFI_INVALID_PARAMETER Count is NULL. @retval EFI_DEVICE_ERROR The device is not functioning properly.
func (*EFI_BOOT_SERVICES) HandleProtocol ¶
func (p *EFI_BOOT_SERVICES) HandleProtocol(Handle EFI_HANDLE, Protocol *EFI_GUID, Interface unsafe.Pointer) EFI_STATUS
HandleProtocol Queries a handle to determine if it supports a specified protocol. @param[in] Handle The handle being queried. @param[in] Protocol The published unique identifier of the protocol. @param[out] Interface Supplies the address where a pointer to the corresponding Protocol ..............................Interface is returned. @retval EFI_SUCCESS The interface information for the specified protocol was returned. @retval EFI_UNSUPPORTED The device does not support the specified protocol. @retval EFI_INVALID_PARAMETER Handle is NULL. @retval EFI_INVALID_PARAMETER Protocol is NULL. @retval EFI_INVALID_PARAMETER Interface is NULL.
func (*EFI_BOOT_SERVICES) InstallConfigurationTable ¶
func (p *EFI_BOOT_SERVICES) InstallConfigurationTable(Guid *EFI_GUID, Table *VOID) EFI_STATUS
InstallConfigurationTable Adds, updates, or removes a configuration table entry from the EFI System Table. @param[in] Guid A pointer to the GUID for the entry to add, update, or remove. @param[in] Table A pointer to the configuration table for the entry to add, update, or ..............................remove. May be NULL. @retval EFI_SUCCESS The (Guid, Table) pair was added, updated, or removed. @retval EFI_NOT_FOUND An attempt was made to delete a nonexistent entry. @retval EFI_INVALID_PARAMETER Guid is NULL. @retval EFI_OUT_OF_RESOURCES There is not enough memory available to complete the operation.
func (*EFI_BOOT_SERVICES) InstallMultipleProtocolInterfaces ¶
func (p *EFI_BOOT_SERVICES) InstallMultipleProtocolInterfaces(Handle *EFI_HANDLE) EFI_STATUS
InstallMultipleProtocolInterfaces Installs one or more protocol interfaces into the boot services environment. @param[in, out] Handle The pointer to a handle to install the new protocol interfaces on, .................or a pointer to NULL if a new handle is to be allocated. @param ... A variable argument list containing pairs of protocol GUIDs and protocol ..............................interfaces. @retval EFI_SUCCESS All the protocol interface was installed. @retval EFI_OUT_OF_RESOURCES There was not enough memory in pool to install all the protocols. @retval EFI_ALREADY_STARTED A Device Path Protocol instance was passed in that is already present in ..............................the handle database. @retval EFI_INVALID_PARAMETER Handle is NULL. @retval EFI_INVALID_PARAMETER Protocol is already installed on the handle specified by Handle.
func (*EFI_BOOT_SERVICES) InstallProtocolInterface ¶
func (p *EFI_BOOT_SERVICES) InstallProtocolInterface(Handle *EFI_HANDLE, Protocol *EFI_GUID, InterfaceType EFI_INTERFACE_TYPE, Interface *VOID) EFI_STATUS
InstallProtocolInterface Installs a protocol interface on a device handle. If the handle does not exist, it is created and added to the list of handles in the system. InstallMultipleProtocolInterfaces() performs more error checking than InstallProtocolInterface(), so it is recommended that InstallMultipleProtocolInterfaces() be used in place of InstallProtocolInterface() @param[in, out] Handle A pointer to the EFI_HANDLE on which the interface is to be installed. @param[in] Protocol The numeric ID of the protocol interface. @param[in] InterfaceType Indicates whether Interface is supplied in native form. @param[in] Interface A pointer to the protocol interface. @retval EFI_SUCCESS The protocol interface was installed. @retval EFI_OUT_OF_RESOURCES Space for a new handle could not be allocated. @retval EFI_INVALID_PARAMETER Handle is NULL. @retval EFI_INVALID_PARAMETER Protocol is NULL. @retval EFI_INVALID_PARAMETER InterfaceType is not EFI_NATIVE_INTERFACE. @retval EFI_INVALID_PARAMETER Protocol is already installed on the handle specified by Handle.
func (*EFI_BOOT_SERVICES) LoadImage ¶
func (p *EFI_BOOT_SERVICES) LoadImage(BootPolicy BOOLEAN, ParentImageHandle EFI_HANDLE, DevicePath *EFI_DEVICE_PATH_PROTOCOL, SourceBuffer *VOID, SourceSize UINTN, ImageHandle *EFI_HANDLE) EFI_STATUS
LoadImage Loads an EFI image into memory. @param[in] BootPolicy If TRUE, indicates that the request originates from the boot ...............................manager, and that the boot manager is attempting to load ...............................FilePath as a boot selection. Ignored if SourceBuffer is ...............................not NULL. @param[in] ParentImageHandle The caller's image handle. @param[in] DevicePath The DeviceHandle specific file path from which the image is ...............................loaded. @param[in] SourceBuffer If not NULL, a pointer to the memory location containing a copy ...............................of the image to be loaded. @param[in] SourceSize The size in bytes of SourceBuffer. Ignored if SourceBuffer is NULL. @param[out] ImageHandle The pointer to the returned image handle that is created when the ...............................image is successfully loaded. @retval EFI_SUCCESS Image was loaded into memory correctly. @retval EFI_NOT_FOUND Both SourceBuffer and DevicePath are NULL. @retval EFI_INVALID_PARAMETER One or more parametes are invalid. @retval EFI_UNSUPPORTED The image type is not supported. @retval EFI_OUT_OF_RESOURCES Image was not loaded due to insufficient resources. @retval EFI_LOAD_ERROR Image was not loaded because the image format was corrupt or not ...............................understood. @retval EFI_DEVICE_ERROR Image was not loaded because the device returned a read error. @retval EFI_ACCESS_DENIED Image was not loaded because the platform policy prohibits the ...............................image from being loaded. NULL is returned in *ImageHandle. @retval EFI_SECURITY_VIOLATION Image was loaded and an ImageHandle was created with a ...............................valid EFI_LOADED_IMAGE_PROTOCOL. However, the current ...............................platform policy specifies that the image should not be started.
func (*EFI_BOOT_SERVICES) LocateDevicePath ¶
func (p *EFI_BOOT_SERVICES) LocateDevicePath(Protocol *EFI_GUID, DevicePath **EFI_DEVICE_PATH_PROTOCOL, Device *EFI_HANDLE) EFI_STATUS
LocateDevicePath Locates the handle to a device on the device path that supports the specified protocol. @param[in] Protocol Specifies the protocol to search for. @param[in, out] DevicePath On input, a pointer to a pointer to the device path. On output, the device .................path pointer is modified to point to the remaining part of the device .................path. @param[out] Device A pointer to the returned device handle. @retval EFI_SUCCESS The resulting handle was returned. @retval EFI_NOT_FOUND No handles match the search. @retval EFI_INVALID_PARAMETER Protocol is NULL. @retval EFI_INVALID_PARAMETER DevicePath is NULL. @retval EFI_INVALID_PARAMETER A handle matched the search and Device is NULL.
func (*EFI_BOOT_SERVICES) LocateHandle ¶
func (p *EFI_BOOT_SERVICES) LocateHandle(SearchType EFI_LOCATE_SEARCH_TYPE, Protocol *EFI_GUID, SearchKey *VOID, BufferSize *UINTN, Buffer *EFI_HANDLE) EFI_STATUS
LocateHandle Returns an array of handles that support a specified protocol. @param[in] SearchType Specifies which handle(s) are to be returned. @param[in] Protocol Specifies the protocol to search by. @param[in] SearchKey Specifies the search key. @param[in, out] BufferSize On input, the size in bytes of Buffer. On output, the size in bytes of .................the array returned in Buffer (if the buffer was large enough) or the .................size, in bytes, of the buffer needed to obtain the array (if the buffer was .................not large enough). @param[out] Buffer The buffer in which the array is returned. @retval EFI_SUCCESS The array of handles was returned. @retval EFI_NOT_FOUND No handles match the search. @retval EFI_BUFFER_TOO_SMALL The BufferSize is too small for the result. @retval EFI_INVALID_PARAMETER SearchType is not a member of EFI_LOCATE_SEARCH_TYPE. @retval EFI_INVALID_PARAMETER SearchType is ByRegisterNotify and SearchKey is NULL. @retval EFI_INVALID_PARAMETER SearchType is ByProtocol and Protocol is NULL. @retval EFI_INVALID_PARAMETER One or more matches are found and BufferSize is NULL. @retval EFI_INVALID_PARAMETER BufferSize is large enough for the result and Buffer is NULL.
func (*EFI_BOOT_SERVICES) LocateHandleBuffer ¶
func (p *EFI_BOOT_SERVICES) LocateHandleBuffer(SearchType EFI_LOCATE_SEARCH_TYPE, Protocol *EFI_GUID, SearchKey *VOID, NoHandles *UINTN, Buffer **EFI_HANDLE) EFI_STATUS
LocateHandleBuffer Returns an array of handles that support the requested protocol in a buffer allocated from pool. @param[in] SearchType Specifies which handle(s) are to be returned. @param[in] Protocol Provides the protocol to search by. ..............................This parameter is only valid for a SearchType of ByProtocol. @param[in] SearchKey Supplies the search key depending on the SearchType. @param[out] NoHandles The number of handles returned in Buffer. @param[out] Buffer A pointer to the buffer to return the requested array of handles that ..............................support Protocol. @retval EFI_SUCCESS The array of handles was returned in Buffer, and the number of ..............................handles in Buffer was returned in NoHandles. @retval EFI_NOT_FOUND No handles match the search. @retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the matching results. @retval EFI_INVALID_PARAMETER NoHandles is NULL. @retval EFI_INVALID_PARAMETER Buffer is NULL.
func (*EFI_BOOT_SERVICES) LocateProtocol ¶
func (p *EFI_BOOT_SERVICES) LocateProtocol(Protocol *EFI_GUID, Registration *VOID, InterfacePtr unsafe.Pointer) EFI_STATUS
LocateProtocol Returns the first protocol instance that matches the given protocol. @param[in] Protocol Provides the protocol to search for. @param[in] Registration Optional registration key returned from ..............................RegisterProtocolNotify(). @param[out] Interface On return, a pointer to the first interface that matches Protocol and ..............................Registration. @retval EFI_SUCCESS A protocol instance matching Protocol was found and returned in ..............................Interface. @retval EFI_NOT_FOUND No protocol instances were found that match Protocol and ..............................Registration. @retval EFI_INVALID_PARAMETER Interface is NULL. ..............................Protocol is NULL.
func (*EFI_BOOT_SERVICES) OpenProtocol ¶
func (p *EFI_BOOT_SERVICES) OpenProtocol(Handle EFI_HANDLE, Protocol *EFI_GUID, Interface **VOID, AgentHandle EFI_HANDLE, ControllerHandle EFI_HANDLE, Attributes uint32) EFI_STATUS
OpenProtocol Queries a handle to determine if it supports a specified protocol. If the protocol is supported by the handle, it opens the protocol on behalf of the calling agent. @param[in] Handle The handle for the protocol interface that is being opened. @param[in] Protocol The published unique identifier of the protocol. @param[out] Interface Supplies the address where a pointer to the corresponding Protocol ..............................Interface is returned. @param[in] AgentHandle The handle of the agent that is opening the protocol interface ..............................specified by Protocol and Interface. @param[in] ControllerHandle If the agent that is opening a protocol is a driver that follows the ..............................UEFI Driver Model, then this parameter is the controller handle ..............................that requires the protocol interface. If the agent does not follow ..............................the UEFI Driver Model, then this parameter is optional and may ..............................be NULL. @param[in] Attributes The open mode of the protocol interface specified by Handle ..............................and Protocol. @retval EFI_SUCCESS An item was added to the open list for the protocol interface, and the ..............................protocol interface was returned in Interface. @retval EFI_UNSUPPORTED Handle does not support Protocol. @retval EFI_INVALID_PARAMETER One or more parameters are invalid. @retval EFI_ACCESS_DENIED Required attributes can't be supported in current environment. @retval EFI_ALREADY_STARTED Item on the open list already has requierd attributes whose agent ..............................handle is the same as AgentHandle.
func (*EFI_BOOT_SERVICES) OpenProtocolInformation ¶
func (p *EFI_BOOT_SERVICES) OpenProtocolInformation(Handle EFI_HANDLE, Protocol *EFI_GUID, EntryBuffer **EFI_OPEN_PROTOCOL_INFORMATION_ENTRY, EntryCount *UINTN) EFI_STATUS
OpenProtocolInformation Retrieves the list of agents that currently have a protocol interface opened. @param[in] Handle The handle for the protocol interface that is being queried. @param[in] Protocol The published unique identifier of the protocol. @param[out] EntryBuffer A pointer to a buffer of open protocol information in the form of ..............................EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures. @param[out] EntryCount A pointer to the number of entries in EntryBuffer. @retval EFI_SUCCESS The open protocol information was returned in EntryBuffer, and the ..............................number of entries was returned EntryCount. @retval EFI_OUT_OF_RESOURCES There are not enough resources available to allocate EntryBuffer. @retval EFI_NOT_FOUND Handle does not support the protocol specified by Protocol.
func (*EFI_BOOT_SERVICES) ProtocolsPerHandle ¶
func (p *EFI_BOOT_SERVICES) ProtocolsPerHandle(Handle EFI_HANDLE, ProtocolBuffer ***EFI_GUID, ProtocolBufferCount *UINTN) EFI_STATUS
ProtocolsPerHandle Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated from pool. @param[in] Handle The handle from which to retrieve the list of protocol interface .................................GUIDs. @param[out] ProtocolBuffer A pointer to the list of protocol interface GUID pointers that are .................................installed on Handle. @param[out] ProtocolBufferCount A pointer to the number of GUID pointers present in .................................ProtocolBuffer. @retval EFI_SUCCESS The list of protocol interface GUIDs installed on Handle was returned in ..............................ProtocolBuffer. The number of protocol interface GUIDs was ..............................returned in ProtocolBufferCount. @retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the results. @retval EFI_INVALID_PARAMETER Handle is NULL. @retval EFI_INVALID_PARAMETER Handle is not a valid EFI_HANDLE. @retval EFI_INVALID_PARAMETER ProtocolBuffer is NULL. @retval EFI_INVALID_PARAMETER ProtocolBufferCount is NULL.
func (*EFI_BOOT_SERVICES) RaiseTPL ¶
func (p *EFI_BOOT_SERVICES) RaiseTPL(NewTpl EFI_TPL) EFI_STATUS
RaiseTPL Raises a task's priority level and returns its previous level. @param[in] NewTpl The new task priority level. @return Previous task priority level
func (*EFI_BOOT_SERVICES) RegisterProtocolNotify ¶
func (p *EFI_BOOT_SERVICES) RegisterProtocolNotify(Protocol *EFI_GUID, Event EFI_EVENT, Registration **VOID) EFI_STATUS
RegisterProtocolNotify Creates an event that is to be signaled whenever an interface is installed for a specified protocol. @param[in] Protocol The numeric ID of the protocol for which the event is to be registered. @param[in] Event Event that is to be signaled whenever a protocol interface is registered ..............................for Protocol. @param[out] Registration A pointer to a memory location to receive the registration value. @retval EFI_SUCCESS The notification event has been registered. @retval EFI_OUT_OF_RESOURCES Space for the notification event could not be allocated. @retval EFI_INVALID_PARAMETER Protocol is NULL. @retval EFI_INVALID_PARAMETER Event is NULL. @retval EFI_INVALID_PARAMETER Registration is NULL.
func (*EFI_BOOT_SERVICES) ReinstallProtocolInterface ¶
func (p *EFI_BOOT_SERVICES) ReinstallProtocolInterface(Handle EFI_HANDLE, Protocol *EFI_GUID, OldInterface *VOID, NewInterface *VOID) EFI_STATUS
ReinstallProtocolInterface Reinstalls a protocol interface on a device handle. @param[in] Handle Handle on which the interface is to be reinstalled. @param[in] Protocol The numeric ID of the interface. @param[in] OldInterface A pointer to the old interface. NULL can be used if a structure is not ..............................associated with Protocol. @param[in] NewInterface A pointer to the new interface. @retval EFI_SUCCESS The protocol interface was reinstalled. @retval EFI_NOT_FOUND The OldInterface on the handle was not found. @retval EFI_ACCESS_DENIED The protocol interface could not be reinstalled, ..............................because OldInterface is still being used by a ..............................driver that will not release it. @retval EFI_INVALID_PARAMETER Handle is NULL. @retval EFI_INVALID_PARAMETER Protocol is NULL.
func (*EFI_BOOT_SERVICES) RestoreTPL ¶
func (p *EFI_BOOT_SERVICES) RestoreTPL(OldTpl EFI_TPL) EFI_STATUS
RestoreTPL Restores a task's priority level to its previous value. @param[in] OldTpl The previous task priority level to restore.
func (*EFI_BOOT_SERVICES) SetMem ¶
func (p *EFI_BOOT_SERVICES) SetMem(Buffer *VOID, Size UINTN, Value byte) EFI_STATUS
SetMem The SetMem() function fills a buffer with a specified value. @param[in] Buffer The pointer to the buffer to fill. @param[in] Size Number of bytes in Buffer to fill. @param[in] Value Value to fill Buffer with.
func (*EFI_BOOT_SERVICES) SetTimer ¶
func (p *EFI_BOOT_SERVICES) SetTimer(Event EFI_EVENT, Type EFI_TIMER_DELAY, TriggerTime uint64) EFI_STATUS
SetTimer Sets the type of timer and the trigger time for a timer event. @param[in] Event The timer event that is to be signaled at the specified time. @param[in] Type The type of time that is specified in TriggerTime. @param[in] TriggerTime The number of 100ns units until the timer expires. ..............................A TriggerTime of 0 is legal. ..............................If Type is TimerRelative and TriggerTime is 0, then the timer ..............................event will be signaled on the next timer tick. ..............................If Type is TimerPeriodic and TriggerTime is 0, then the timer ..............................event will be signaled on every timer tick. @retval EFI_SUCCESS The event has been set to be signaled at the requested time. @retval EFI_INVALID_PARAMETER Event or Type is not valid.
func (*EFI_BOOT_SERVICES) SetWatchdogTimer ¶
func (p *EFI_BOOT_SERVICES) SetWatchdogTimer(Timeout UINTN, WatchdogCode uint64, DataSize UINTN, WatchdogData *CHAR16) EFI_STATUS
SetWatchdogTimer Sets the system's watchdog timer. @param[in] Timeout The number of seconds to set the watchdog timer to. @param[in] WatchdogCode The numeric code to log on a watchdog timer timeout event. @param[in] DataSize The size, in bytes, of WatchdogData. @param[in] WatchdogData A data buffer that includes a Null-terminated string, optionally ..............................followed by additional binary data. @retval EFI_SUCCESS The timeout has been set. @retval EFI_INVALID_PARAMETER The supplied WatchdogCode is invalid. @retval EFI_UNSUPPORTED The system does not have a watchdog timer. @retval EFI_DEVICE_ERROR The watchdog timer could not be programmed due to a hardware ..............................error.
func (*EFI_BOOT_SERVICES) SignalEvent ¶
func (p *EFI_BOOT_SERVICES) SignalEvent(Event EFI_EVENT) EFI_STATUS
SignalEvent Signals an event. @param[in] Event The event to signal. @retval EFI_SUCCESS The event has been signaled.
func (*EFI_BOOT_SERVICES) Stall ¶
func (p *EFI_BOOT_SERVICES) Stall(Microseconds UINTN) EFI_STATUS
Stall Induces a fine-grained stall. @param[in] Microseconds The number of microseconds to stall execution. @retval EFI_SUCCESS Execution was stalled at least the requested number of ..............................Microseconds.
func (*EFI_BOOT_SERVICES) StartImage ¶
func (p *EFI_BOOT_SERVICES) StartImage(ImageHandle EFI_HANDLE, ExitDataSize *UINTN, ExitData **CHAR16) EFI_STATUS
StartImage Transfers control to a loaded image's entry point. @param[in] ImageHandle Handle of image to be started. @param[out] ExitDataSize The pointer to the size, in bytes, of ExitData. @param[out] ExitData The pointer to a pointer to a data buffer that includes a Null-terminated ...............................string, optionally followed by additional binary data. @retval EFI_INVALID_PARAMETER ImageHandle is either an invalid image handle or the image ...............................has already been initialized with StartImage. @retval EFI_SECURITY_VIOLATION The current platform policy specifies that the image should not be started. @return Exit code from image
func (*EFI_BOOT_SERVICES) UninstallMultipleProtocolInterfaces ¶
func (p *EFI_BOOT_SERVICES) UninstallMultipleProtocolInterfaces(Handle EFI_HANDLE) EFI_STATUS
UninstallMultipleProtocolInterfaces Removes one or more protocol interfaces into the boot services environment. @param[in] Handle The handle to remove the protocol interfaces from. @param ... A variable argument list containing pairs of protocol GUIDs and ..............................protocol interfaces. @retval EFI_SUCCESS All the protocol interfaces were removed. @retval EFI_INVALID_PARAMETER One of the protocol interfaces was not previously installed on Handle.
func (*EFI_BOOT_SERVICES) UninstallProtocolInterface ¶
func (p *EFI_BOOT_SERVICES) UninstallProtocolInterface(Handle EFI_HANDLE, Protocol *EFI_GUID, Interface *VOID) EFI_STATUS
UninstallProtocolInterface Removes a protocol interface from a device handle. It is recommended that UninstallMultipleProtocolInterfaces() be used in place of UninstallProtocolInterface(). @param[in] Handle The handle on which the interface was installed. @param[in] Protocol The numeric ID of the interface. @param[in] Interface A pointer to the interface. @retval EFI_SUCCESS The interface was removed. @retval EFI_NOT_FOUND The interface was not found. @retval EFI_ACCESS_DENIED The interface was not removed because the interface ..............................is still being used by a driver. @retval EFI_INVALID_PARAMETER Handle is NULL. @retval EFI_INVALID_PARAMETER Protocol is NULL.
func (*EFI_BOOT_SERVICES) UnloadImage ¶
func (p *EFI_BOOT_SERVICES) UnloadImage(ImageHandle EFI_HANDLE) EFI_STATUS
UnloadImage Unloads an image. @param[in] ImageHandle Handle that identifies the image to be unloaded. @retval EFI_SUCCESS The image has been unloaded. @retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.
func (*EFI_BOOT_SERVICES) WaitForEvent ¶
func (p *EFI_BOOT_SERVICES) WaitForEvent(NumberOfEvents UINTN, Event *EFI_EVENT, Index *UINTN) EFI_STATUS
WaitForEvent Stops execution until an event is signaled. @param[in] NumberOfEvents The number of events in the Event array. @param[in] Event An array of EFI_EVENT. @param[out] Index The pointer to the index of the event which satisfied the wait condition. @retval EFI_SUCCESS The event indicated by Index was signaled. @retval EFI_INVALID_PARAMETER 1) NumberOfEvents is 0. ..............................2) The event indicated by Index is of type ..............................EVT_NOTIFY_SIGNAL. @retval EFI_UNSUPPORTED The current TPL is not TPL_APPLICATION.
type EFI_CAPSULE_BLOCK_DESCRIPTOR ¶
type EFI_CAPSULE_BLOCK_DESCRIPTOR struct {
Length uint64
DataBlock EFI_PHYSICAL_ADDRESS
ContinuationPointer EFI_PHYSICAL_ADDRESS
}
EFI_CAPSULE_BLOCK_DESCRIPTOR EFI Capsule Block Descriptor
type EFI_CAPSULE_HEADER ¶
type EFI_CAPSULE_HEADER struct {
CapsuleGuid EFI_GUID
HeaderSize uint32
Flags uint32
CapsuleImageSize uint32
}
EFI_CAPSULE_HEADER EFI Capsule Header.
type EFI_CAPSULE_TABLE ¶
type EFI_CAPSULE_TABLE struct {
CapsuleArrayNumber uint32
}
EFI_CAPSULE_TABLE The EFI System Table entry must point to an array of capsules that contain the same CapsuleGuid value. The array must be prefixed by a UINT32 that represents the size of the array of capsules.
type EFI_CONFIGURATION_TABLE ¶
EFI_CONFIGURATION_TABLE Contains a set of GUID/pointer pairs comprised of the ConfigurationTable field in the EFI System Table.
type EFI_DEVICE_PATH_PROTOCOL ¶
EFI_DEVICE_PATH_PROTOCOL structure
type EFI_DHCP4_CALLBACK ¶
type EFI_DHCP4_CALLBACK uintptr
EFI_DHCP4_CALLBACK is not yet supported. Needs a PE+ -> SysV trampoline.
type EFI_DHCP4_CONFIG_DATA ¶
type EFI_DHCP4_CONFIG_DATA struct {
DiscoverTryCount uint32
DiscoverTimeout *uint32
RequestTryCount uint32
RequestTimeout *uint32
ClientAddress EFI_IPv4_ADDRESS
Dhcp4Callback EFI_DHCP4_CALLBACK
CallbackContext unsafe.Pointer // not sure about this
OptionCount uint32
OptionList **EFI_DHCP4_PACKET_OPTION
}
EFI_DHCP4_CONFIG_DATA is for configuring a DHCP request. §29.2.4
type EFI_DHCP4_MODE_DATA ¶
type EFI_DHCP4_MODE_DATA struct {
State uint32
ConfigData EFI_DHCP4_CONFIG_DATA
ClientAddress EFI_IPv4_ADDRESS
ClientMac EFI_MAC_ADDRESS
ServerAddress EFI_IPv4_ADDRESS
RouterAddress EFI_IPv4_ADDRESS
SubnetMask EFI_IPv4_ADDRESS
}
type EFI_DHCP4_PACKET_OPTION ¶
EFI_DHCP4_PACKET_OPTION 29.2.4
type EFI_DHCP4_PROTOCOL ¶
type EFI_DHCP4_PROTOCOL struct {
// contains filtered or unexported fields
}
EFI_DHCP4_PROTOCOL function table §29.2.2
func (*EFI_DHCP4_PROTOCOL) Build ¶
func (p *EFI_DHCP4_PROTOCOL) Build(packetBuffer unsafe.Pointer) EFI_STATUS
func (*EFI_DHCP4_PROTOCOL) Configure ¶
func (p *EFI_DHCP4_PROTOCOL) Configure(cfg *EFI_DHCP4_CONFIG_DATA) EFI_STATUS
func (*EFI_DHCP4_PROTOCOL) GetModeData ¶
func (p *EFI_DHCP4_PROTOCOL) GetModeData(modeData *EFI_DHCP4_MODE_DATA) EFI_STATUS
func (*EFI_DHCP4_PROTOCOL) Parse ¶
func (p *EFI_DHCP4_PROTOCOL) Parse(packetBuffer unsafe.Pointer, parseResult unsafe.Pointer) EFI_STATUS
func (*EFI_DHCP4_PROTOCOL) Release ¶
func (p *EFI_DHCP4_PROTOCOL) Release(asyncEvent *EFI_EVENT) EFI_STATUS
func (*EFI_DHCP4_PROTOCOL) RenewRebind ¶
func (p *EFI_DHCP4_PROTOCOL) RenewRebind(asyncEvent *EFI_EVENT) EFI_STATUS
func (*EFI_DHCP4_PROTOCOL) Start ¶
func (p *EFI_DHCP4_PROTOCOL) Start(asyncEvent *EFI_EVENT) EFI_STATUS
func (*EFI_DHCP4_PROTOCOL) Stop ¶
func (p *EFI_DHCP4_PROTOCOL) Stop() EFI_STATUS
func (*EFI_DHCP4_PROTOCOL) TransmitReceive ¶
func (p *EFI_DHCP4_PROTOCOL) TransmitReceive(token unsafe.Pointer) EFI_STATUS
type EFI_DHCP4_SERVICE_BINDING_PROTOCOL ¶
type EFI_DHCP4_SERVICE_BINDING_PROTOCOL struct {
// contains filtered or unexported fields
}
func (*EFI_DHCP4_SERVICE_BINDING_PROTOCOL) CreateChild ¶
func (p *EFI_DHCP4_SERVICE_BINDING_PROTOCOL) CreateChild(childHandle *EFI_HANDLE) EFI_STATUS
func (*EFI_DHCP4_SERVICE_BINDING_PROTOCOL) DestroyChild ¶
func (p *EFI_DHCP4_SERVICE_BINDING_PROTOCOL) DestroyChild(childHandle EFI_HANDLE) EFI_STATUS
type EFI_DISK_IO_PROTOCOL ¶
type EFI_DISK_IO_PROTOCOL struct {
Revision uint64
// contains filtered or unexported fields
}
§Disk I/O function table order: Revision, ReadDisk, WriteDisk
func (*EFI_DISK_IO_PROTOCOL) ReadDisk ¶
func (p *EFI_DISK_IO_PROTOCOL) ReadDisk(mediaId uint32, offset uint64, bufSize UINTN, buffer unsafe.Pointer) EFI_STATUS
ReadDisk reads BufferSize bytes at byte Offset into Buffer.
func (*EFI_DISK_IO_PROTOCOL) WriteDisk ¶
func (p *EFI_DISK_IO_PROTOCOL) WriteDisk(mediaId uint32, offset uint64, bufSize UINTN, buffer unsafe.Pointer) EFI_STATUS
WriteDisk writes BufferSize bytes at byte Offset from Buffer.
type EFI_FILE_INFO ¶
type EFI_FILE_PROTOCOL ¶
type EFI_FILE_PROTOCOL struct {
Revision uint64
// contains filtered or unexported fields
}
func (*EFI_FILE_PROTOCOL) Close ¶
func (p *EFI_FILE_PROTOCOL) Close() EFI_STATUS
Close closes the file handle. (§13.5.4)
func (*EFI_FILE_PROTOCOL) Delete ¶
func (p *EFI_FILE_PROTOCOL) Delete() EFI_STATUS
Delete deletes the file opened by this handle. (§13.5.5)
func (*EFI_FILE_PROTOCOL) Flush ¶
func (p *EFI_FILE_PROTOCOL) Flush() EFI_STATUS
Flush flushes file data and metadata to the device. (§13.5.12)
func (*EFI_FILE_PROTOCOL) GetInfo ¶
func (p *EFI_FILE_PROTOCOL) GetInfo(infoType *EFI_GUID, bufferSize *UINTN, buffer unsafe.Pointer) EFI_STATUS
GetInfo retrieves metadata identified by InformationType. Common GUIDs: EFI_FILE_INFO_ID, EFI_FILE_SYSTEM_INFO_ID, EFI_FILE_SYSTEM_VOLUME_LABEL_ID. (§13.5.10)
func (*EFI_FILE_PROTOCOL) GetPosition ¶
func (p *EFI_FILE_PROTOCOL) GetPosition(position *uint64) EFI_STATUS
GetPosition returns the current file position in bytes. (§13.5.8)
func (*EFI_FILE_PROTOCOL) Open ¶
func (p *EFI_FILE_PROTOCOL) Open(newHandle **EFI_FILE_PROTOCOL, fileName *CHAR16, openMode uint64, attributes uint64) EFI_STATUS
Open opens a file or directory relative to this handle (which may be a root or directory handle). FileName must be a NUL-terminated UTF-16 path using '\\' separators. (§13.5.3)
func (*EFI_FILE_PROTOCOL) Read ¶
func (p *EFI_FILE_PROTOCOL) Read(bufferSize *UINTN, buffer unsafe.Pointer) EFI_STATUS
Read reads from the file into Buffer. BufferSize is in/out: on entry, size of Buffer; on return, bytes read. (§13.5.6)
func (*EFI_FILE_PROTOCOL) SetInfo ¶
func (p *EFI_FILE_PROTOCOL) SetInfo(infoType *EFI_GUID, bufferSize UINTN, buffer unsafe.Pointer) EFI_STATUS
SetInfo sets metadata identified by InformationType. (§13.5.11)
func (*EFI_FILE_PROTOCOL) SetPosition ¶
func (p *EFI_FILE_PROTOCOL) SetPosition(position uint64) EFI_STATUS
SetPosition sets the current file position. Setting to 0xFFFFFFFFFFFFFFFF seeks to end-of-file. (§13.5.9)
func (*EFI_FILE_PROTOCOL) Write ¶
func (p *EFI_FILE_PROTOCOL) Write(bufferSize *UINTN, buffer unsafe.Pointer) EFI_STATUS
Write writes to the file from Buffer. BufferSize is in/out: on entry, bytes to write; on return, bytes written. (§13.5.7)
type EFI_FILE_SYSTEM_INFO ¶
type EFI_GRAPHICS_OUTPUT_BLT_OPERATION ¶
type EFI_GRAPHICS_OUTPUT_BLT_OPERATION uint32
const ( BltVideoFill EFI_GRAPHICS_OUTPUT_BLT_OPERATION = iota BltVideoToBltBuffer BltBufferToVideo BltVideoToVideo BltOperationMax )
type EFI_GRAPHICS_OUTPUT_BLT_PIXEL ¶
type EFI_GRAPHICS_OUTPUT_BLT_PIXEL struct {
Blue, Green, Red, Reserved uint8
}
12.9.5 EFI_GRAPHICS_OUTPUT_BLT_PIXEL
type EFI_GRAPHICS_OUTPUT_MODE_INFORMATION ¶
type EFI_GRAPHICS_OUTPUT_MODE_INFORMATION struct {
Version uint32
HorizontalResolution uint32
VerticalResolution uint32
PixelFormat uint32 // values above
PixelInformation EFI_PIXEL_BITMASK // only valid when PixelFormat==PixelBitMask
PixelsPerScanLine uint32
}
12.9.3 EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
type EFI_GRAPHICS_OUTPUT_PROTOCOL ¶
type EFI_GRAPHICS_OUTPUT_PROTOCOL struct {
Mode *EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE
// contains filtered or unexported fields
}
func GraphicsOutputProtocol ¶
func GraphicsOutputProtocol() (*EFI_GRAPHICS_OUTPUT_PROTOCOL, error)
func (*EFI_GRAPHICS_OUTPUT_PROTOCOL) Blt ¶
func (p *EFI_GRAPHICS_OUTPUT_PROTOCOL) Blt( BltBuffer *EFI_GRAPHICS_OUTPUT_BLT_PIXEL, BltOperation EFI_GRAPHICS_OUTPUT_BLT_OPERATION, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta UINTN, ) EFI_STATUS
Blt – the work-horse pixel pump.
- BltBuffer may be nil when the operation is VideoFill or VideoToVideo.
- Delta is bytes per scan line in BltBuffer (0 ⇒ tightly packed).
func (*EFI_GRAPHICS_OUTPUT_PROTOCOL) Init ¶
func (p *EFI_GRAPHICS_OUTPUT_PROTOCOL) Init() (info *EFI_GRAPHICS_OUTPUT_MODE_INFORMATION)
Init finds the highest resolution mode and uses it as the current mode. This is not strictly necessary, but it can help make some poorly behaved firmware work better.
Highest resolution is calculated by total number of pixels.
func (*EFI_GRAPHICS_OUTPUT_PROTOCOL) QueryMode ¶
func (p *EFI_GRAPHICS_OUTPUT_PROTOCOL) QueryMode( ModeNumber uint32, SizeOfInfo *UINTN, Info **EFI_GRAPHICS_OUTPUT_MODE_INFORMATION, ) EFI_STATUS
QueryMode – returns a filled-in MODE_INFORMATION for ModeNumber.
func (*EFI_GRAPHICS_OUTPUT_PROTOCOL) SetMode ¶
func (p *EFI_GRAPHICS_OUTPUT_PROTOCOL) SetMode(ModeNumber uint32) EFI_STATUS
SetMode – switch to the requested graphics mode.
type EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE ¶
type EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE struct {
MaxMode uint32 // total available modes
Mode uint32 // current mode
Info *EFI_GRAPHICS_OUTPUT_MODE_INFORMATION // mode info for current mode
SizeOfInfo UINTN
FrameBufferBase EFI_PHYSICAL_ADDRESS
FrameBufferSize UINTN
}
12.9.2 EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE
type EFI_INPUT_KEY ¶
EFI_INPUT_KEY The keystroke information for the key that was pressed.
type EFI_INTERFACE_TYPE ¶
type EFI_INTERFACE_TYPE uint
Enumeration for EFI_INTERFACE_TYPE
const ( EFI_NATIVE_INTERFACE EFI_INTERFACE_TYPE = iota EFI_PCODE_INTERFACE )
type EFI_IP_ADDRESS ¶
type EFI_IP_ADDRESS [16]uint8
type EFI_IPv4_ADDRESS ¶
type EFI_IPv4_ADDRESS [4]uint8
type EFI_IPv6_ADDRESS ¶
type EFI_IPv6_ADDRESS [16]uint8
type EFI_KEY_DATA ¶
type EFI_KEY_DATA struct {
Key EFI_INPUT_KEY
KeyState EFI_KEY_STATE
}
type EFI_KEY_STATE ¶
type EFI_KEY_STATE struct {
KeyShiftState uint32
KeyToggleState EFI_KEY_TOGGLE_STATE
}
type EFI_KEY_TOGGLE_STATE ¶
type EFI_KEY_TOGGLE_STATE uint8
type EFI_LOADED_IMAGE_PROTOCOL ¶
type EFI_LOADED_IMAGE_PROTOCOL struct {
Revision uint32
ParentHandle EFI_HANDLE
SystemTable *EFI_SYSTEM_TABLE
DeviceHandle EFI_HANDLE
FilePath *EFI_DEVICE_PATH_PROTOCOL
Reserved *VOID
LoadOptionsSize uint32
LoadOptions *VOID
ImageBase *VOID
ImageSize uint64
ImageCodeType EFI_MEMORY_TYPE
ImageDataType EFI_MEMORY_TYPE
// contains filtered or unexported fields
}
EFI_LOADED_IMAGE_PROTOCOL Can be used on any image handle to obtain information about the loaded image.
func GetLoadedImageProtocol ¶
func GetLoadedImageProtocol() (*EFI_LOADED_IMAGE_PROTOCOL, error)
func (*EFI_LOADED_IMAGE_PROTOCOL) Unload ¶
func (p *EFI_LOADED_IMAGE_PROTOCOL) Unload(ImageHandle EFI_HANDLE) EFI_STATUS
Unload Unloads an image. @param[in] ImageHandle Handle that identifies the image to be unloaded. @retval EFI_SUCCESS The image has been unloaded. @retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.
type EFI_LOAD_OPTION ¶
type EFI_LOCATE_SEARCH_TYPE ¶
type EFI_LOCATE_SEARCH_TYPE int
const ( AllHandles EFI_LOCATE_SEARCH_TYPE = 0 ByRegisterNotify EFI_LOCATE_SEARCH_TYPE = 1 ByProtocol EFI_LOCATE_SEARCH_TYPE = 2 )
type EFI_MAC_ADDRESS ¶
type EFI_MAC_ADDRESS [32]uint8
type EFI_MEMORY_DESCRIPTOR ¶
type EFI_MEMORY_DESCRIPTOR struct {
Type uint32
PhysicalStart EFI_PHYSICAL_ADDRESS
VirtualStart EFI_VIRTUAL_ADDRESS
NumberOfPages uint64
Attribute uint64
}
EFI_MEMORY_DESCRIPTOR Definition of an EFI memory descriptor.
type EFI_MEMORY_TYPE ¶
type EFI_MEMORY_TYPE int
EFI_MEMORY_TYPE is an enumeration of memory types.
const ( EfiReservedMemoryType EFI_MEMORY_TYPE = iota EfiLoaderCode EfiLoaderData EfiBootServicesCode EfiBootServicesData EfiRuntimeServicesCode EfiRuntimeServicesData EfiConventionalMemory EfiUnusableMemory EfiACPIReclaimMemory EfiACPIMemoryNVS EfiMemoryMappedIO EfiMemoryMappedIOPortSpace EfiPalCode EfiPersistentMemory EfiUnacceptedMemoryType EfiMaxMemoryType )
type EFI_OPEN_PROTOCOL_INFORMATION_ENTRY ¶
type EFI_OPEN_PROTOCOL_INFORMATION_ENTRY struct {
AgentHandle EFI_HANDLE
ControllerHandle EFI_HANDLE
Attributes uint32
OpenCount uint32
}
EFI_OPEN_PROTOCOL_INFORMATION_ENTRY EFI Oprn Protocol Information Entry
type EFI_PHYSICAL_ADDRESS ¶
type EFI_PHYSICAL_ADDRESS uint64
type EFI_PIXEL_BITMASK ¶
type EFI_PIXEL_BITMASK struct {
RedMask, GreenMask, BlueMask, ReservedMask uint32
}
12.9.4 EFI_PIXEL_BITMASK
type EFI_RESET_TYPE ¶
type EFI_RESET_TYPE int
const ( EfiResetCold EFI_RESET_TYPE = 0 EfiResetWarm EFI_RESET_TYPE = 1 EfiResetShutdown EFI_RESET_TYPE = 2 )
type EFI_RUNTIME_SERVICES ¶
type EFI_RUNTIME_SERVICES struct {
Hdr EFI_TABLE_HEADER
// contains filtered or unexported fields
}
EFI_RUNTIME_SERVICES EFI Runtime Services Table.
func (*EFI_RUNTIME_SERVICES) ConvertPointer ¶
func (p *EFI_RUNTIME_SERVICES) ConvertPointer(DebugDisposition UINTN, Address **VOID) EFI_STATUS
ConvertPointer Determines the new virtual address that is to be used on subsequent memory accesses. @param[in] DebugDisposition Supplies type information for the pointer being converted. @param[in, out] Address A pointer to a pointer that is to be fixed to be the value needed .................for the new virtual address mappings being applied. @retval EFI_SUCCESS The pointer pointed to by Address was modified. @retval EFI_INVALID_PARAMETER 1) Address is NULL. ..............................2) *Address is NULL and DebugDisposition does ..............................not have the EFI_OPTIONAL_PTR bit set. @retval EFI_NOT_FOUND The pointer pointed to by Address was not found to be part ..............................of the current memory map. This is normally fatal.
func (*EFI_RUNTIME_SERVICES) GetNextHighMonotonicCount ¶
func (p *EFI_RUNTIME_SERVICES) GetNextHighMonotonicCount(HighCount *uint32) EFI_STATUS
GetNextHighMonotonicCount Returns the next high 32 bits of the platform's monotonic counter. @param[out] HighCount The pointer to returned value. @retval EFI_SUCCESS The next high monotonic count was returned. @retval EFI_INVALID_PARAMETER HighCount is NULL. @retval EFI_DEVICE_ERROR The device is not functioning properly.
func (*EFI_RUNTIME_SERVICES) GetNextVariableName ¶
func (p *EFI_RUNTIME_SERVICES) GetNextVariableName(VariableNameSize *UINTN, VariableName *CHAR16, VendorGuid *EFI_GUID) EFI_STATUS
GetNextVariableName Enumerates the current variable names. @param[in, out] VariableNameSize The size of the VariableName buffer. The size must be large .................enough to fit input string supplied in VariableName buffer. @param[in, out] VariableName On input, supplies the last VariableName that was returned .................by GetNextVariableName(). On output, returns the Nullterminated .................string of the current variable. @param[in, out] VendorGuid On input, supplies the last VendorGuid that was returned by .................GetNextVariableName(). On output, returns the .................VendorGuid of the current variable. @retval EFI_SUCCESS The function completed successfully. @retval EFI_NOT_FOUND The next variable was not found. @retval EFI_BUFFER_TOO_SMALL The VariableNameSize is too small for the result. ..............................VariableNameSize has been updated with the size needed to complete the request. @retval EFI_INVALID_PARAMETER VariableNameSize is NULL. @retval EFI_INVALID_PARAMETER VariableName is NULL. @retval EFI_INVALID_PARAMETER VendorGuid is NULL. @retval EFI_INVALID_PARAMETER The input values of VariableName and VendorGuid are not a name and ..............................GUID of an existing variable. @retval EFI_INVALID_PARAMETER Null-terminator is not found in the first VariableNameSize bytes of ..............................the input VariableName buffer. @retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error.
func (*EFI_RUNTIME_SERVICES) GetTime ¶
func (p *EFI_RUNTIME_SERVICES) GetTime(Time *EFI_TIME, Capabilities *EFI_TIME_CAPABILITIES) EFI_STATUS
GetTime Returns the current time and date information, and the time-keeping capabilities of the hardware platform. @param[out] Time A pointer to storage to receive a snapshot of the current time. @param[out] Capabilities An optional pointer to a buffer to receive the real time clock ..............................device's capabilities. @retval EFI_SUCCESS The operation completed successfully. @retval EFI_INVALID_PARAMETER Time is NULL. @retval EFI_DEVICE_ERROR The time could not be retrieved due to hardware error.
func (*EFI_RUNTIME_SERVICES) GetVariable ¶
func (p *EFI_RUNTIME_SERVICES) GetVariable(VariableName *CHAR16, VendorGuid *EFI_GUID, Attributes *uint32, DataSize *UINTN, Data *VOID) EFI_STATUS
GetVariable Returns the value of a variable. @param[in] VariableName A Null-terminated string that is the name of the vendor's ...............................variable. @param[in] VendorGuid A unique identifier for the vendor. @param[out] Attributes If not NULL, a pointer to the memory location to return the ...............................attributes bitmask for the variable. @param[in, out] DataSize On input, the size in bytes of the return Data buffer. .................On output the size of data returned in Data. @param[out] Data The buffer to return the contents of the variable. May be NULL ...............................with a zero DataSize in order to determine the size buffer needed. @retval EFI_SUCCESS The function completed successfully. @retval EFI_NOT_FOUND The variable was not found. @retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the result. @retval EFI_INVALID_PARAMETER VariableName is NULL. @retval EFI_INVALID_PARAMETER VendorGuid is NULL. @retval EFI_INVALID_PARAMETER DataSize is NULL. @retval EFI_INVALID_PARAMETER The DataSize is not too small and Data is NULL. @retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error. @retval EFI_SECURITY_VIOLATION The variable could not be retrieved due to an authentication failure.
func (*EFI_RUNTIME_SERVICES) GetWakeupTime ¶
func (p *EFI_RUNTIME_SERVICES) GetWakeupTime(Enabled *BOOLEAN, Pending *BOOLEAN, Time *EFI_TIME) EFI_STATUS
GetWakeupTime Returns the current wakeup alarm clock setting. @param[out] Enabled Indicates if the alarm is currently enabled or disabled. @param[out] Pending Indicates if the alarm signal is pending and requires acknowledgement. @param[out] Time The current alarm setting. @retval EFI_SUCCESS The alarm settings were returned. @retval EFI_INVALID_PARAMETER Enabled is NULL. @retval EFI_INVALID_PARAMETER Pending is NULL. @retval EFI_INVALID_PARAMETER Time is NULL. @retval EFI_DEVICE_ERROR The wakeup time could not be retrieved due to a hardware error. @retval EFI_UNSUPPORTED A wakeup timer is not supported on this platform.
func (*EFI_RUNTIME_SERVICES) QueryCapsuleCapabilities ¶
func (p *EFI_RUNTIME_SERVICES) QueryCapsuleCapabilities(CapsuleHeaderArray **EFI_CAPSULE_HEADER, CapsuleCount UINTN, MaximumCapsuleSize *uint64, ResetType *EFI_RESET_TYPE) EFI_STATUS
QueryCapsuleCapabilities Returns if the capsule can be supported via UpdateCapsule(). @param[in] CapsuleHeaderArray Virtual pointer to an array of virtual pointers to the capsules .................................being passed into update capsule. @param[in] CapsuleCount Number of pointers to EFI_CAPSULE_HEADER in .................................CaspuleHeaderArray. @param[out] MaxiumCapsuleSize On output the maximum size that UpdateCapsule() can .................................support as an argument to UpdateCapsule() via .................................CapsuleHeaderArray and ScatterGatherList. @param[out] ResetType Returns the type of reset required for the capsule update. @retval EFI_SUCCESS Valid answer returned. @retval EFI_UNSUPPORTED The capsule type is not supported on this platform, and ..............................MaximumCapsuleSize and ResetType are undefined. @retval EFI_INVALID_PARAMETER MaximumCapsuleSize is NULL. @retval EFI_OUT_OF_RESOURCES When ExitBootServices() has been previously called this error indicates the capsule ..............................is compatible with this platform but is not capable of being submitted or processed ..............................in runtime. The caller may resubmit the capsule prior to ExitBootServices(). @retval EFI_OUT_OF_RESOURCES When ExitBootServices() has not been previously called then this error indicates ..............................the capsule is compatible with this platform but there are insufficient resources to process.
func (*EFI_RUNTIME_SERVICES) QueryVariableInfo ¶
func (p *EFI_RUNTIME_SERVICES) QueryVariableInfo(Attributes uint32, MaximumVariableStorageSize *uint64, RemainingVariableStorageSize *uint64, MaximumVariableSize *uint64) EFI_STATUS
QueryVariableInfo Returns information about the EFI variables. @param[in] Attributes Attributes bitmask to specify the type of variables on ..........................................which to return information. @param[out] MaximumVariableStorageSize On output the maximum size of the storage space ..........................................available for the EFI variables associated with the ..........................................attributes specified. @param[out] RemainingVariableStorageSize Returns the remaining size of the storage space ..........................................available for the EFI variables associated with the ..........................................attributes specified. @param[out] MaximumVariableSize Returns the maximum size of the individual EFI ..........................................variables associated with the attributes specified. @retval EFI_SUCCESS Valid answer returned. @retval EFI_INVALID_PARAMETER An invalid combination of attribute bits was supplied @retval EFI_UNSUPPORTED The attribute is not supported on this platform, and the .....................................MaximumVariableStorageSize, .....................................RemainingVariableStorageSize, MaximumVariableSize .....................................are undefined.
func (*EFI_RUNTIME_SERVICES) ResetSystem ¶
func (p *EFI_RUNTIME_SERVICES) ResetSystem(ResetType EFI_RESET_TYPE, ResetStatus EFI_STATUS, DataSize UINTN, ResetData *VOID) EFI_STATUS
ResetSystem Resets the entire platform. @param[in] ResetType The type of reset to perform. @param[in] ResetStatus The status code for the reset. @param[in] DataSize The size, in bytes, of ResetData. @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm, or ..............................EfiResetShutdown the data buffer starts with a Null-terminated ..............................string, optionally followed by additional binary data. ..............................The string is a description that the caller may use to further ..............................indicate the reason for the system reset. ..............................For a ResetType of EfiResetPlatformSpecific the data buffer ..............................also starts with a Null-terminated string that is followed ..............................by an EFI_GUID that describes the specific type of reset to perform.
func (*EFI_RUNTIME_SERVICES) SetTime ¶
func (p *EFI_RUNTIME_SERVICES) SetTime(Time *EFI_TIME) EFI_STATUS
SetTime Sets the current local time and date information. @param[in] Time A pointer to the current time. @retval EFI_SUCCESS The operation completed successfully. @retval EFI_INVALID_PARAMETER A time field is out of range. @retval EFI_DEVICE_ERROR The time could not be set due due to hardware error.
func (*EFI_RUNTIME_SERVICES) SetVariable ¶
func (p *EFI_RUNTIME_SERVICES) SetVariable(VariableName *CHAR16, VendorGuid *EFI_GUID, Attributes uint32, DataSize UINTN, Data *VOID) EFI_STATUS
SetVariable Sets the value of a variable. @param[in] VariableName A Null-terminated string that is the name of the vendor's variable. ...............................Each VariableName is unique for each VendorGuid. VariableName must ...............................contain 1 or more characters. If VariableName is an empty string, ...............................then EFI_INVALID_PARAMETER is returned. @param[in] VendorGuid A unique identifier for the vendor. @param[in] Attributes Attributes bitmask to set for the variable. @param[in] DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE or ...............................EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero ...............................causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is ...............................set, then a SetVariable() call with a DataSize of zero will not cause any change to ...............................the variable value (the timestamp associated with the variable may be updated however ...............................even if no new data value is provided,see the description of the ...............................EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not ...............................be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated). @param[in] Data The contents for the variable. @retval EFI_SUCCESS The firmware has successfully stored the variable and its data as ...............................defined by the Attributes. @retval EFI_INVALID_PARAMETER An invalid combination of attribute bits, name, and GUID was supplied, or the ...............................DataSize exceeds the maximum allowed. @retval EFI_INVALID_PARAMETER VariableName is an empty string. @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the variable and its data. @retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error. @retval EFI_WRITE_PROTECTED The variable in question is read-only. @retval EFI_WRITE_PROTECTED The variable in question cannot be deleted. @retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set, ...............................but the AuthInfo does NOT pass the validation check carried out by the firmware. @retval EFI_NOT_FOUND The variable trying to be updated or deleted was not found.
func (*EFI_RUNTIME_SERVICES) SetVirtualAddressMap ¶
func (p *EFI_RUNTIME_SERVICES) SetVirtualAddressMap(MemoryMapSize UINTN, DescriptorSize UINTN, DescriptorVersion uint32, VirtualMap *EFI_MEMORY_DESCRIPTOR) EFI_STATUS
SetVirtualAddressMap Changes the runtime addressing mode of EFI firmware from physical to virtual. @param[in] MemoryMapSize The size in bytes of VirtualMap. @param[in] DescriptorSize The size in bytes of an entry in the VirtualMap. @param[in] DescriptorVersion The version of the structure entries in VirtualMap. @param[in] VirtualMap An array of memory descriptors which contain new virtual ..............................address mapping information for all runtime ranges. @retval EFI_SUCCESS The virtual address map has been applied. @retval EFI_UNSUPPORTED EFI firmware is not at runtime, or the EFI firmware is already in ..............................virtual address mapped mode. @retval EFI_INVALID_PARAMETER DescriptorSize or DescriptorVersion is invalid. @retval EFI_NO_MAPPING A virtual address was not supplied for a range in the memory ..............................map that requires a mapping. @retval EFI_NOT_FOUND A virtual address was supplied for an address that is not found ..............................in the memory map.
func (*EFI_RUNTIME_SERVICES) SetWakeupTime ¶
func (p *EFI_RUNTIME_SERVICES) SetWakeupTime(Enable BOOLEAN, Time *EFI_TIME) EFI_STATUS
SetWakeupTime Sets the system wakeup alarm clock time. @param[in] Enable Enable or disable the wakeup alarm. @param[in] Time If Enable is TRUE, the time to set the wakeup alarm for. ..............................If Enable is FALSE, then this parameter is optional, and may be NULL. @retval EFI_SUCCESS If Enable is TRUE, then the wakeup alarm was enabled. If ..............................Enable is FALSE, then the wakeup alarm was disabled. @retval EFI_INVALID_PARAMETER A time field is out of range. @retval EFI_DEVICE_ERROR The wakeup time could not be set due to a hardware error. @retval EFI_UNSUPPORTED A wakeup timer is not supported on this platform.
func (*EFI_RUNTIME_SERVICES) UpdateCapsule ¶
func (p *EFI_RUNTIME_SERVICES) UpdateCapsule(CapsuleHeaderArray **EFI_CAPSULE_HEADER, CapsuleCount UINTN, ScatterGatherList EFI_PHYSICAL_ADDRESS) EFI_STATUS
UpdateCapsule Passes capsules to the firmware with both virtual and physical mapping. Depending on the intended consumption, the firmware may process the capsule immediately. If the payload should persist across a system reset, the reset value returned from EFI_QueryCapsuleCapabilities must be passed into ResetSystem() and will cause the capsule to be processed by the firmware as part of the reset process. @param[in] CapsuleHeaderArray Virtual pointer to an array of virtual pointers to the capsules ...............................being passed into update capsule. @param[in] CapsuleCount Number of pointers to EFI_CAPSULE_HEADER in ...............................CaspuleHeaderArray. @param[in] ScatterGatherList Physical pointer to a set of ...............................EFI_CAPSULE_BLOCK_DESCRIPTOR that describes the ...............................location in physical memory of a set of capsules. @retval EFI_SUCCESS Valid capsule was passed. If ..............................CAPSULE_FLAGS_PERSIT_ACROSS_RESET is not set, the ..............................capsule has been successfully processed by the firmware. @retval EFI_INVALID_PARAMETER CapsuleSize is NULL, or an incompatible set of flags were ..............................set in the capsule header. @retval EFI_INVALID_PARAMETER CapsuleCount is 0. @retval EFI_DEVICE_ERROR The capsule update was started, but failed due to a device error. @retval EFI_UNSUPPORTED The capsule type is not supported on this platform. @retval EFI_OUT_OF_RESOURCES When ExitBootServices() has been previously called this error indicates the capsule ..............................is compatible with this platform but is not capable of being submitted or processed ..............................in runtime. The caller may resubmit the capsule prior to ExitBootServices(). @retval EFI_OUT_OF_RESOURCES When ExitBootServices() has not been previously called then this error indicates ..............................the capsule is compatible with this platform but there are insufficient resources to process.
type EFI_SERIAL_IO_MODE ¶
type EFI_SERIAL_IO_MODE struct {
ControlMask, Timeout uint32
BaudRate uint64
ReceiveFifoDepth, DataBits, Parity, StopBits uint32
}
EFI_SERIAL_IO_MODE is the output-only struct for checking the status of a serial port. §12.8.1
type EFI_SERIAL_IO_PROTOCOL ¶
type EFI_SERIAL_IO_PROTOCOL struct {
Revision uint32
Mode *EFI_SERIAL_IO_MODE
// contains filtered or unexported fields
}
EFI_SERIAL_IO_PROTOCOL Function table order matches §12.8.1
func (*EFI_SERIAL_IO_PROTOCOL) GetControl ¶
func (p *EFI_SERIAL_IO_PROTOCOL) GetControl(control *uint32) EFI_STATUS
GetControl queries control bits. §12.8.3.4
func (*EFI_SERIAL_IO_PROTOCOL) Read ¶
func (p *EFI_SERIAL_IO_PROTOCOL) Read(bufSize *UINTN, buffer unsafe.Pointer) EFI_STATUS
Read bytes from the UART. When calling, bufSize is size of buffer. After Read has returned, bufSize is set to the number of bytes actually read. §12.8.3.6
func (*EFI_SERIAL_IO_PROTOCOL) Reset ¶
func (p *EFI_SERIAL_IO_PROTOCOL) Reset() EFI_STATUS
Reset the device. §12.8.3.1
func (*EFI_SERIAL_IO_PROTOCOL) SetAttributes ¶
func (p *EFI_SERIAL_IO_PROTOCOL) SetAttributes( baudRate uint64, receiveFifoDepth uint32, timeout uint32, parity uint32, dataBits int8, stopBits uint32, ) EFI_STATUS
SetAttributes configures baud/format. Setting baudRate, receiveFifoDepth, or timeout to 0 *SHOULD* tell the port driver to use sane default values. YMMV. §12.8.3.2
func (*EFI_SERIAL_IO_PROTOCOL) SetControl ¶
func (p *EFI_SERIAL_IO_PROTOCOL) SetControl(control uint32) EFI_STATUS
SetControl sets or clears control bits. §12.8.3.3
func (*EFI_SERIAL_IO_PROTOCOL) Write ¶
func (p *EFI_SERIAL_IO_PROTOCOL) Write(bufSize *UINTN, buffer unsafe.Pointer) EFI_STATUS
Write bytes to the UART. When calling, bufSize is the size of buffer. After Write has returned, bufSize will be set to the number of bytes actually written. §12.8.3.5
type EFI_SIMPLE_FILE_SYSTEM_PROTOCOL ¶
type EFI_SIMPLE_FILE_SYSTEM_PROTOCOL struct {
Revision uint64
// contains filtered or unexported fields
}
func EnumerateFileSystems ¶
func EnumerateFileSystems() ([]*EFI_SIMPLE_FILE_SYSTEM_PROTOCOL, error)
EnumerateFileSystems locates all Simple File System handles and returns their protocol pointers.
func (*EFI_SIMPLE_FILE_SYSTEM_PROTOCOL) OpenVolume ¶
func (p *EFI_SIMPLE_FILE_SYSTEM_PROTOCOL) OpenVolume(root **EFI_FILE_PROTOCOL) EFI_STATUS
type EFI_SIMPLE_NETWORK_MODE ¶
type EFI_SIMPLE_NETWORK_MODE struct {
State uint32
HwAddressSize uint32
MediaHeaderSize uint32
MaxPacketSize uint32
NvRamSize uint32
NvRamAccessSize uint32
ReceiveFilterMask uint32
ReceiveFilterSetting uint32
MaxMCastFilterCount uint32
MCastFilterCount uint32
MCastFilter [32]EFI_MAC_ADDRESS
CurrentAddress EFI_MAC_ADDRESS
BroadcastAddress EFI_MAC_ADDRESS
PermanentAddress EFI_MAC_ADDRESS
IfType uint8
MacAddressChangeable bool
MultipleTxSupported bool
MediaPresentSupported bool
MediaPresent bool
}
---------------------------------------------------------------------------
Types – §10.4.3
---------------------------------------------------------------------------
type EFI_SIMPLE_NETWORK_PROTOCOL ¶
type EFI_SIMPLE_NETWORK_PROTOCOL struct {
Revision uint64
WaitForPacket EFI_EVENT
Mode *EFI_SIMPLE_NETWORK_MODE
// contains filtered or unexported fields
}
func (*EFI_SIMPLE_NETWORK_PROTOCOL) Initialize ¶
func (snp *EFI_SIMPLE_NETWORK_PROTOCOL) Initialize() EFI_STATUS
func (*EFI_SIMPLE_NETWORK_PROTOCOL) Shutdown ¶
func (snp *EFI_SIMPLE_NETWORK_PROTOCOL) Shutdown() EFI_STATUS
func (*EFI_SIMPLE_NETWORK_PROTOCOL) Start ¶
func (snp *EFI_SIMPLE_NETWORK_PROTOCOL) Start() EFI_STATUS
func (*EFI_SIMPLE_NETWORK_PROTOCOL) Stop ¶
func (snp *EFI_SIMPLE_NETWORK_PROTOCOL) Stop() EFI_STATUS
type EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL ¶
type EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL struct {
WaitForKeyEx EFI_EVENT
// contains filtered or unexported fields
}
func SimpleTextInExProtocol ¶
func SimpleTextInExProtocol() (*EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL, error)
SimpleTextInExProtocol finds and returns the first handle implementing this protocol and returns it. Usually there will only be one or multiple get multiplexed together.
func (*EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL) GetKey ¶
func (p *EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL) GetKey() EFI_KEY_DATA
GetKey blocks while waiting to receive a key. It yields to the scheduler so other goroutines may continue to work while waiting for a key press.
func (*EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL) ReadKeyStroke ¶
func (p *EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL) ReadKeyStroke(Key *EFI_KEY_DATA) EFI_STATUS
func (*EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL) Reset ¶
func (p *EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL) Reset(ExtendedVerification BOOLEAN) EFI_STATUS
type EFI_SIMPLE_TEXT_INPUT_PROTOCOL ¶
type EFI_SIMPLE_TEXT_INPUT_PROTOCOL struct {
WaitForKey EFI_EVENT
// contains filtered or unexported fields
}
EFI_SIMPLE_TEXT_INPUT_PROTOCOL The EFI_SIMPLE_TEXT_INPUT_PROTOCOL is used on the ConsoleIn device. It is the minimum required protocol for ConsoleIn.
func (*EFI_SIMPLE_TEXT_INPUT_PROTOCOL) ReadKeyStroke ¶
func (p *EFI_SIMPLE_TEXT_INPUT_PROTOCOL) ReadKeyStroke(Key *EFI_INPUT_KEY) EFI_STATUS
ReadKeyStroke Reads the next keystroke from the input device. The WaitForKey Event can be used to test for existence of a keystroke via WaitForEvent () call. @param This Protocol instance pointer. @param Key A pointer to a buffer that is filled in with the keystroke ..............information for the key that was pressed. @retval EFI_SUCCESS The keystroke information was returned. @retval EFI_NOT_READY There was no keystroke data available. @retval EFI_DEVICE_ERROR The keystroke information was not returned due to .........................hardware errors.
func (*EFI_SIMPLE_TEXT_INPUT_PROTOCOL) Reset ¶
func (p *EFI_SIMPLE_TEXT_INPUT_PROTOCOL) Reset(ExtendedVerification BOOLEAN) EFI_STATUS
Reset Reset the input device and optionally run diagnostics @param This Protocol instance pointer. @param ExtendedVerification Driver may perform diagnostics on reset. @retval EFI_SUCCESS The device was reset. @retval EFI_DEVICE_ERROR The device is not functioning properly and could not be reset.
type EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL ¶
type EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL struct {
Mode *EFI_SIMPLE_TEXT_OUTPUT_MODE
// contains filtered or unexported fields
}
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL The SIMPLE_TEXT_OUTPUT protocol is used to control text-based output devices. It is the minimum required protocol for any handle supplied as the ConsoleOut or StandardError device. In addition, the minimum supported text mode of such devices is at least 80 x 25 characters.
func (*EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) ClearScreen ¶
func (p *EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) ClearScreen() EFI_STATUS
ClearScreen Clears the output device(s) display to the currently selected background color. @param This The protocol instance pointer. @retval EFI_SUCCESS The operation completed successfully. @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. @retval EFI_UNSUPPORTED The output device is not in a valid text mode.
func (*EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) EnableCursor ¶
func (p *EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) EnableCursor(Visible BOOLEAN) EFI_STATUS
EnableCursor Makes the cursor visible or invisible @param This The protocol instance pointer. @param Visible If TRUE, the cursor is set to be visible. If FALSE, the cursor is ................set to be invisible. @retval EFI_SUCCESS The operation completed successfully. @retval EFI_DEVICE_ERROR The device had an error and could not complete the .........................request, or the device does not support changing .........................the cursor mode. @retval EFI_UNSUPPORTED The output device is not in a valid text mode.
func (*EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) OutputString ¶
func (p *EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) OutputString(String *CHAR16) EFI_STATUS
OutputString Write a string to the output device. @param This The protocol instance pointer. @param String The NULL-terminated string to be displayed on the output ...............device(s). All output devices must also support the Unicode ...............drawing character codes defined in this file. @retval EFI_SUCCESS The string was output to the device. @retval EFI_DEVICE_ERROR The device reported an error while attempting to output ................................the text. @retval EFI_UNSUPPORTED The output device's mode is not currently in a ................................defined text mode. @retval EFI_WARN_UNKNOWN_GLYPH This warning code indicates that some of the ................................characters in the string could not be ................................rendered and were skipped.
func (*EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) QueryMode ¶
func (p *EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) QueryMode(ModeNumber UINTN, Columns *UINTN, Rows *UINTN) EFI_STATUS
QueryMode Returns information for an available text mode that the output device(s) supports. @param This The protocol instance pointer. @param ModeNumber The mode number to return information on. @param Columns Returns the geometry of the text output device for the ...................requested ModeNumber. @param Rows Returns the geometry of the text output device for the ...................requested ModeNumber. @retval EFI_SUCCESS The requested mode information was returned. @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. @retval EFI_UNSUPPORTED The mode number was not valid.
func (*EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) Reset ¶
func (p *EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) Reset(ExtendedVerification BOOLEAN) EFI_STATUS
Reset Reset the text output device hardware and optionally run diagnostics @param This The protocol instance pointer. @param ExtendedVerification Driver may perform more exhaustive verification .............................operation of the device during reset. @retval EFI_SUCCESS The text output device was reset. @retval EFI_DEVICE_ERROR The text output device is not functioning correctly and .............................could not be reset.
func (*EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) SetAttribute ¶
func (p *EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) SetAttribute(Attribute UINTN) EFI_STATUS
SetAttribute Sets the background and foreground colors for the OutputString () and ClearScreen () functions. @param This The protocol instance pointer. @param Attribute The attribute to set. Bits 0..3 are the foreground color, and ..................bits 4..6 are the background color. All other bits are undefined ..................and must be zero. The valid Attributes are defined in this file. @retval EFI_SUCCESS The attribute was set. @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. @retval EFI_UNSUPPORTED The attribute requested is not defined.
func (*EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) SetCursorPosition ¶
func (p *EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) SetCursorPosition(Column UINTN, Row UINTN) EFI_STATUS
SetCursorPosition Sets the current coordinates of the cursor position @param This The protocol instance pointer. @param Column The position to set the cursor to. Must be greater than or ....................equal to zero and less than the number of columns and rows ....................by QueryMode (). @param Row The position to set the cursor to. Must be greater than or ....................equal to zero and less than the number of columns and rows ....................by QueryMode (). @retval EFI_SUCCESS The operation completed successfully. @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. @retval EFI_UNSUPPORTED The output device is not in a valid text mode, or the .........................cursor position is invalid for the current mode.
func (*EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) SetMode ¶
func (p *EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) SetMode(ModeNumber UINTN) EFI_STATUS
SetMode Sets the output device(s) to a specified mode. @param This The protocol instance pointer. @param ModeNumber The mode number to set. @retval EFI_SUCCESS The requested text mode was set. @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. @retval EFI_UNSUPPORTED The mode number was not valid.
func (*EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) TestString ¶
func (p *EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL) TestString(String *CHAR16) EFI_STATUS
TestString Verifies that all characters in a string can be output to the target device. @param This The protocol instance pointer. @param String The NULL-terminated string to be examined for the output ...............device(s). @retval EFI_SUCCESS The device(s) are capable of rendering the output string. @retval EFI_UNSUPPORTED Some of the characters in the string cannot be .........................rendered by one or more of the output devices mapped .........................by the EFI handle.
type EFI_STATUS ¶
type EFI_STATUS UINTN
const ( EFI_SUCCESS EFI_STATUS = 0 EFI_LOAD_ERROR EFI_STATUS = errorMask | 1 EFI_INVALID_PARAMETER EFI_STATUS = errorMask | 2 EFI_UNSUPPORTED EFI_STATUS = errorMask | 3 EFI_BAD_BUFFER_SIZE EFI_STATUS = errorMask | 4 EFI_BUFFER_TOO_SMALL EFI_STATUS = errorMask | 5 EFI_NOT_READY EFI_STATUS = errorMask | 6 EFI_DEVICE_ERROR EFI_STATUS = errorMask | 7 EFI_WRITE_PROTECTED EFI_STATUS = errorMask | 8 EFI_OUT_OF_RESOURCES EFI_STATUS = errorMask | 9 EFI_VOLUME_CORRUPTED EFI_STATUS = errorMask | 10 EFI_VOLUME_FULL EFI_STATUS = errorMask | 11 EFI_NO_MEDIA EFI_STATUS = errorMask | 12 EFI_MEDIA_CHANGED EFI_STATUS = errorMask | 13 EFI_NOT_FOUND EFI_STATUS = errorMask | 14 EFI_ACCESS_DENIED EFI_STATUS = errorMask | 15 EFI_NO_RESPONSE EFI_STATUS = errorMask | 16 EFI_NO_MAPPING EFI_STATUS = errorMask | 17 EFI_TIMEOUT EFI_STATUS = errorMask | 18 EFI_NOT_STARTED EFI_STATUS = errorMask | 19 EFI_ALREADY_STARTED EFI_STATUS = errorMask | 20 EFI_ABORTED EFI_STATUS = errorMask | 21 EFI_ICMP_ERROR EFI_STATUS = errorMask | 22 EFI_TFTP_ERROR EFI_STATUS = errorMask | 23 EFI_PROTOCOL_ERROR EFI_STATUS = errorMask | 24 EFI_INCOMPATIBLE_VERSION EFI_STATUS = errorMask | 25 EFI_SECURITY_VIOLATION EFI_STATUS = errorMask | 26 EFI_CRC_ERROR EFI_STATUS = errorMask | 27 EFI_END_OF_MEDIA EFI_STATUS = errorMask | 28 EFI_END_OF_FILE EFI_STATUS = errorMask | 31 EFI_INVALID_LANGUAGE EFI_STATUS = errorMask | 32 EFI_COMPROMISED_DATA EFI_STATUS = errorMask | 33 EFI_IP_ADDRESS_CONFLICT EFI_STATUS = errorMask | 34 EFI_HTTP_ERROR EFI_STATUS = errorMask | 35 )
func UefiCall0 ¶
func UefiCall0(fn uintptr) EFI_STATUS
func UefiCall1 ¶
func UefiCall1(fn uintptr, a uintptr) EFI_STATUS
func UefiCall5 ¶
go:nosplit go:export uefiCall5
func UefiCall5(fn uintptr, a uintptr, b uintptr, c uintptr, d uintptr, e uintptr) EFI_STATUS
type EFI_SYSTEM_TABLE ¶
type EFI_SYSTEM_TABLE struct {
Hdr EFI_TABLE_HEADER
FirmwareVendor *CHAR16
FirmwareRevision uint32
ConsoleInHandle EFI_HANDLE
ConIn *EFI_SIMPLE_TEXT_INPUT_PROTOCOL
ConsoleOutHandle EFI_HANDLE
ConOut *EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
StandardErrorHandle EFI_HANDLE
StdErr *EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
RuntimeServices *EFI_RUNTIME_SERVICES
BootServices *EFI_BOOT_SERVICES
NumberOfTableEntries UINTN
ConfigurationTable *EFI_CONFIGURATION_TABLE
}
EFI_SYSTEM_TABLE EFI System Table
func ST ¶
func ST() *EFI_SYSTEM_TABLE
type EFI_TABLE_HEADER ¶
type EFI_TABLE_HEADER struct {
Signature uint64
Revision uint32
HeaderSize uint32
CRC32 uint32
Reserved uint32
}
EFI_TABLE_HEADER Standard EFI table header
type EFI_TIME ¶
type EFI_TIME struct {
Year uint16
Month byte
Day byte
Hour byte
Minute byte
Second byte
Pad1 byte
Nanosecond uint32
TimeZone int16
Daylight byte
Pad2 byte
}
EFI_TIME EFI Time Abstraction: Year: 1900 - 9999 Month: 1 - 12 Day: 1 - 31 Hour: 0 - 23 Minute: 0 - 59 Second: 0 - 59 Nanosecond: 0 - 999,999,999 TimeZone: -1440 to 1440 or 2047
type EFI_TIMER_DELAY ¶
type EFI_TIMER_DELAY int
EFI_TIMER_DELAY is an enumeration of timer delays.
const ( TimerCancel EFI_TIMER_DELAY = iota TimerPeriodic TimerRelative TimerTypeMax )
type EFI_TIME_CAPABILITIES ¶
EFI_TIME_CAPABILITIES This provides the capabilities of the real time clock device as exposed through the EFI interfaces.
type EFI_VIRTUAL_ADDRESS ¶
type EFI_VIRTUAL_ADDRESS uint64
type EVENT_TYPE ¶
type EVENT_TYPE uint32
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
func StatusError ¶
func StatusError(status EFI_STATUS) *Error
StatusError returns the error object given by status. These can be checked/managed with errors.Is() and the like.
type SerialPort ¶
type SerialPort struct {
*EFI_SERIAL_IO_PROTOCOL
// contains filtered or unexported fields
}
SerialPort wraps an EFI_SERIAL_IO_PROTOCOL and provides an idiomatic-go API TODO: make serial ports implement os.File
func EnumerateSerialPorts ¶
func EnumerateSerialPorts() ([]*SerialPort, error)
EnumerateSerialPorts uses UEFI's handle walking API to discover serial ports. SerialPorts may be in use for something else, so EnumerateSerialPorts doesn't Init() any of the ports it returns.
func (*SerialPort) Init ¶
func (sp *SerialPort) Init() error
Init configures sp to use 115200 baud, 8N1. Read/Write timeout and Receive FIFO depth are left ot the serial driver's discretion.
func (*SerialPort) Read ¶
func (sp *SerialPort) Read(buf []byte) (n int, err error)
Read implements io.Reader. Reads are blocking operations, however if the read operation times out, this method yields to other goroutines. If using hardware flow control, RTS is set and cleared accordingly.
func (*SerialPort) UseFlowControl ¶
func (sp *SerialPort) UseFlowControl(fc bool)
UseFlowControl enables hardware flow control when fc is true.
func (*SerialPort) Write ¶
func (sp *SerialPort) Write(buf []byte) (n int, err error)
Write implements io.Writer. If hardware flow control is enabled and CTS is cleared, Write will return (0, nil) indicating no bytes were written, but this is not an error. Some consumers of the io.Writer interface may not like this.
type SimpleNetworkProtocol ¶
type SimpleNetworkProtocol struct {
*EFI_SIMPLE_NETWORK_PROTOCOL
}
func EnumerateSNP ¶
func EnumerateSNP() (snps []*SimpleNetworkProtocol, err error)
Source Files
¶
- arch_x86.go
- call.go
- dhcpv4.go
- efidef.go
- efidevp.go
- efiguid.go
- efiprot.go
- efistatus.go
- graphics_output_protocol.go
- ip.go
- loaded_image.go
- media_io_protocol.go
- runtime.go
- serial_io_protocol.go
- simple_file_system_protocol.go
- simple_network_protocol.go
- simple_text_in.go
- simple_text_out.go
- uefi_base_type.go
- uefi_spec.go
- util.go