34 #define EFIAPI __attribute__((ms_abi)) 39 #define EFIAPI __attribute__((cdecl,regparm(0))) 52 #define EFI_HANDLE STUPID_EFI_HANDLE 54 #define _Static_assert(expr, msg) 94 #define EFI_PROTOCOLS __table ( struct efi_protocol, "efi_protocols" ) 97 #define __efi_protocol __table_entry ( EFI_PROTOCOLS, 01 ) 104 #define EFI_REQUIRE_PROTOCOL( _protocol, _ptr ) \ 105 struct efi_protocol __ ## _protocol __efi_protocol = { \ 106 .guid = _protocol ## _GUID, \ 107 .protocol = ( ( void ** ) ( void * ) \ 108 ( ( (_ptr) == ( ( _protocol ** ) (_ptr) ) ) ? \ 109 (_ptr) : (_ptr) ) ), \ 118 #define EFI_REQUEST_PROTOCOL( _protocol, _ptr ) \ 119 struct efi_protocol __ ## _protocol __efi_protocol = { \ 120 .guid = _protocol ## _GUID, \ 121 .protocol = ( ( void ** ) ( void * ) \ 122 ( ( (_ptr) == ( ( _protocol ** ) (_ptr) ) ) ? \ 123 (_ptr) : (_ptr) ) ), \ 138 #define EFI_CONFIG_TABLES \ 139 __table ( struct efi_config_table, "efi_config_tables" ) 142 #define __efi_config_table __table_entry ( EFI_CONFIG_TABLES, 01 ) 150 #define EFI_USE_TABLE( _table, _ptr, _required ) \ 151 struct efi_config_table __ ## _table __efi_config_table = { \ 152 .guid = _table ## _GUID, \ 153 .table = ( ( void ** ) ( void * ) (_ptr) ), \ 154 .required = (_required), \ 163 #define EFIRC( rc ) ERRNO_TO_PLATFORM ( -(rc) ) 171 #define EEFI( efirc ) EPLATFORM ( EINFO_EPLATFORM, efirc ) 276 #define DBG_EFI_OPENER_IF( level, handle, protocol, \ 278 if ( DBG_ ## level ) { \ 279 dbg_efi_opener ( handle, protocol, \ 284 #define DBG_EFI_OPENERS_IF( level, handle, protocol ) do { \ 285 if ( DBG_ ## level ) { \ 286 dbg_efi_openers ( handle, protocol ); \ 290 #define DBG_EFI_PROTOCOLS_IF( level, handle ) do { \ 291 if ( DBG_ ## level ) { \ 292 dbg_efi_protocols ( handle ); \ 296 #define DBGC_EFI_OPENER_IF( level, id, ... ) do { \ 297 DBG_AC_IF ( level, id ); \ 298 DBG_EFI_OPENER_IF ( level, __VA_ARGS__ ); \ 299 DBG_DC_IF ( level ); \ 302 #define DBGC_EFI_OPENERS_IF( level, id, ... ) do { \ 303 DBG_AC_IF ( level, id ); \ 304 DBG_EFI_OPENERS_IF ( level, __VA_ARGS__ ); \ 305 DBG_DC_IF ( level ); \ 308 #define DBGC_EFI_PROTOCOL_IF( level, id, ... ) do { \ 309 DBG_AC_IF ( level, id ); \ 310 DBG_EFI_PROTOCOL_IF ( level, __VA_ARGS__ ); \ 311 DBG_DC_IF ( level ); \ 314 #define DBGC_EFI_PROTOCOLS_IF( level, id, ... ) do { \ 315 DBG_AC_IF ( level, id ); \ 316 DBG_EFI_PROTOCOLS_IF ( level, __VA_ARGS__ ); \ 317 DBG_DC_IF ( level ); \ 320 #define DBGC_EFI_OPENER( ... ) \ 321 DBGC_EFI_OPENER_IF ( LOG, ##__VA_ARGS__ ) 322 #define DBGC_EFI_OPENERS( ... ) \ 323 DBGC_EFI_OPENERS_IF ( LOG, ##__VA_ARGS__ ) 324 #define DBGC_EFI_PROTOCOL( ... ) \ 325 DBGC_EFI_PROTOCOL_IF ( LOG, ##__VA_ARGS__ ) 326 #define DBGC_EFI_PROTOCOLS( ... ) \ 327 DBGC_EFI_PROTOCOLS_IF ( LOG, ##__VA_ARGS__ ) 329 #define DBGC2_EFI_OPENER( ... ) \ 330 DBGC_EFI_OPENER_IF ( EXTRA, ##__VA_ARGS__ ) 331 #define DBGC2_EFI_OPENERS( ... ) \ 332 DBGC_EFI_OPENERS_IF ( EXTRA, ##__VA_ARGS__ ) 333 #define DBGC2_EFI_PROTOCOL( ... ) \ 334 DBGC_EFI_PROTOCOL_IF ( EXTRA, ##__VA_ARGS__ ) 335 #define DBGC2_EFI_PROTOCOLS( ... ) \ 336 DBGC_EFI_PROTOCOLS_IF ( EXTRA, ##__VA_ARGS__ ) 338 #define DBGCP_EFI_OPENER( ... ) \ 339 DBGC_EFI_OPENER_IF ( PROFILE, ##__VA_ARGS__ ) 340 #define DBGCP_EFI_OPENERS( ... ) \ 341 DBGC_EFI_OPENERS_IF ( PROFILE, ##__VA_ARGS__ ) 342 #define DBGCP_EFI_PROTOCOL( ... ) \ 343 DBGC_EFI_PROTOCOL_IF ( PROFILE, ##__VA_ARGS__ ) 344 #define DBGCP_EFI_PROTOCOLS( ... ) \ 345 DBGC_EFI_PROTOCOLS_IF ( PROFILE, ##__VA_ARGS__ ) 349 #define EFI_INTF_OP INTF_OP 351 #define EFI_INTF_OP UNUSED_INTF_OP
void efi_restore_tpl(struct efi_saved_tpl *tpl)
Restore task priority level.
void ** protocol
Variable containing pointer to protocol structure.
EFI_GUID efi_pci_root_bridge_io_protocol_guid
PCI root bridge I/O protocol GUID.
EFI_GUID efi_mtftp4_service_binding_protocol_guid
MTFTPv4 service binding protocol GUID.
EFI_GUID efi_component_name2_protocol_guid
Component name 2 protocol GUID.
static void efi_init_stack_guard(EFI_HANDLE handle)
Initialise stack cookie.
EFI Oprn Protocol Information Entry.
EFI_GUID efi_ip4_protocol_guid
IPv4 protocol GUID.
EFI_DEVICE_PATH_PROTOCOL * efi_loaded_image_path
Device path for the loaded image's device handle.
EFI_GUID efi_ip6_protocol_guid
IPv6 protocol GUID.
EFI_GUID efi_block_io_protocol_guid
Block I/O protocol GUID.
unsigned long __stack_chk_guard
Stack cookie.
EFI_GUID efi_mtftp6_service_binding_protocol_guid
MTFTPv6 service binding protocol GUID.
EFI_GUID efi_load_file2_protocol_guid
Load file 2 protocol GUID.
EFI_GUID efi_mtftp6_protocol_guid
MTFTPv6 protocol GUID.
EFI_GUID efi_shim_lock_protocol_guid
Shim lock protocol GUID.
EFI_GUID efi_tcp6_service_binding_protocol_guid
TCPv6 service binding protocol GUID.
EFI_GUID efi_simple_file_system_protocol_guid
Simple file system protocol GUID.
128 bit buffer containing a unique identifier value.
EFI_GUID efi_dhcp4_protocol_guid
DHCPv4 protocol GUID.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
EFI_GUID efi_dhcp6_service_binding_protocol_guid
DHCPv6 service binding protocol GUID.
EFI_GUID efi_simple_pointer_protocol_guid
Simple pointer protocol GUID.
EFI_GUID efi_component_name_protocol_guid
Component name protocol GUID.
EFI_GUID efi_dns4_protocol_guid
DNSv4 protocol GUID.
EFI_GUID efi_tcp4_service_binding_protocol_guid
TCPv4 service binding protocol GUID.
EFI_GUID efi_device_path_protocol_guid
Device path protocol GUID.
EFI_GUID efi_apple_net_boot_protocol_guid
Apple NetBoot protocol GUID.
EFI_GUID efi_loaded_image_protocol_guid
Loaded image protocol GUID.
EFI_GUID efi_acpi_table_protocol_guid
ACPI table protocol GUID.
unsigned long efi_stack_cookie(EFI_HANDLE handle)
Construct a stack cookie value.
const char * efi_locate_search_type_name(EFI_LOCATE_SEARCH_TYPE search_type)
Name locate search type.
void dbg_efi_openers(EFI_HANDLE handle, EFI_GUID *protocol)
Print list of openers of a given protocol on a given handle.
EFI_GUID efi_http_protocol_guid
HTTP protocol GUID.
EFI_GUID efi_tcp6_protocol_guid
TCPv6 protocol GUID.
EFI_GUID efi_unicode_collation_protocol_guid
Unicode collation protocol GUID.
EFI_GUID efi_uga_draw_protocol_guid
UGA draw protocol GUID.
This protocol can be used on any device handle to obtain generic path/location information concerning...
void dbg_efi_opener(EFI_HANDLE handle, EFI_GUID *protocol, EFI_OPEN_PROTOCOL_INFORMATION_ENTRY *opener)
Print opened protocol information.
EFI_GUID efi_load_file_protocol_guid
Load file protocol GUID.
EFI_TPL efi_external_tpl
External task priority level.
void efi_raise_tpl(struct efi_saved_tpl *tpl)
Raise task priority level to internal level.
EFI_LOADED_IMAGE_PROTOCOL * efi_loaded_image
Loaded image protocol for this image.
Root include file for Mde Package DXE_CORE, DXE, RUNTIME, SMM, SAL type modules.
UEFI 2.0 Loaded image protocol definition.
An EFI configuration table used by iPXE.
EFI_GUID efi_nii_protocol_guid
Network interface identifier protocol GUID (old version)
EFI_GUID efi_dhcp6_protocol_guid
DHCPv6 protocol GUID.
const char * efi_guid_ntoa(CONST EFI_GUID *guid)
Convert GUID to a printable string.
EFI_GUID efi_ip6_service_binding_protocol_guid
IPv6 service binding protocol GUID.
Can be used on any image handle to obtain information about the loaded image.
EFI_TPL current
Current external TPL.
EFI_GUID efi_block_io2_protocol_guid
Block I/O version 2 protocol GUID.
EFI_GUID efi_pxe_base_code_protocol_guid
PXE base code protocol GUID.
EFI_GUID efi_console_control_protocol_guid
Console control protocol GUID.
EFI_GUID efi_dhcp4_service_binding_protocol_guid
DHCPv4 service binding protocol GUID.
const char * efi_devpath_text(EFI_DEVICE_PATH_PROTOCOL *path)
Get textual representation of device path.
EFI_GUID efi_usb2_hc_protocol_guid
USB2 host controller protocol GUID.
EFI_GUID efi_usb_hc_protocol_guid
USB host controller protocol GUID.
EFI_GUID efi_simple_text_input_protocol_guid
Simple text input protocol GUID.
EFI_STATUS efi_init(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *systab)
Initialise EFI environment.
An EFI protocol used by iPXE.
EFI_GUID efi_simple_network_protocol_guid
Simple network protocol GUID.
EFI_GUID efi_simple_text_output_protocol_guid
Simple text output protocol GUID.
EFI_GUID efi_vlan_config_protocol_guid
VLAN configuration protocol GUID.
void dbg_efi_protocol(EFI_HANDLE handle, EFI_GUID *protocol)
Print protocol information on a given handle.
EFI_GUID efi_udp6_service_binding_protocol_guid
UDPv6 service binding protocol GUID.
const char * efi_handle_name(EFI_HANDLE handle)
Get name of an EFI handle.
EFI_GUID efi_graphics_output_protocol_guid
Graphics output protocol GUID.
EFI_GUID efi_bus_specific_driver_override_protocol_guid
Bus specific driver override protocol GUID.
EFI_GUID efi_mtftp4_protocol_guid
MTFTPv4 protocol GUID.
EFI_TPL previous
Previous external TPL.
EFI_GUID efi_dns6_protocol_guid
DNSv6 protocol GUID.
Root include file for Mde Package UEFI, UEFI_APPLICATION type modules.
EFI_GUID efi_hii_font_protocol_guid
HII font protocol GUID.
EFI_GUID efi_simple_text_input_ex_protocol_guid
Simple text input extension protocol GUID.
EFI_GUID efi_dns4_service_binding_protocol_guid
DNSv4 service binding protocol GUID.
EFI_GUID efi_arp_protocol_guid
ARP protocol GUID.
EFI_GUID efi_tcp4_protocol_guid
TCPv4 protocol GUID.
EFI_GUID efi_tree_protocol_guid
TrEE protocol GUID.
EFI_GUID efi_managed_network_protocol_guid
Managed network protocol GUID.
void ** table
Variable containing pointer to configuration table.
int required
Protocol is required.
EFI_GUID efi_arp_service_binding_protocol_guid
ARP service binding protocol GUID.
EFI_GUID efi_serial_io_protocol_guid
Serial I/O protocol GUID.
EFI_GUID efi_udp4_protocol_guid
UDPv4 protocol GUID.
EFI_TPL efi_internal_tpl
Internal task priority level.
UINTN EFI_TPL
Task priority level.
An EFI saved task priority level.
EFI_GUID efi_tcg2_protocol_guid
TCG2 protocol GUID.
#define CONST
Datum is read-only.
const char * efi_open_attributes_name(unsigned int attributes)
Name protocol open attributes.
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
EFI_GUID efi_nii31_protocol_guid
Network interface identifier protocol GUID (new version)
EFI_GUID efi_tcg_protocol_guid
TCG protocol GUID.
EFI_GUID efi_udp4_service_binding_protocol_guid
UDPv4 service binding protocol GUID.
Defines data types and constants introduced in UEFI.
int efi_shutdown_in_progress
EFI shutdown is in progress.
EFI_HANDLE efi_image_handle
Image handle passed to entry point.
EFI_GUID efi_managed_network_service_binding_protocol_guid
Managed network service binding protocol GUID.
EFI_GUID efi_usb_io_protocol_guid
USB I/O protocol GUID.
EFI_GUID efi_file_system_info_id
File system information GUID.
EFI_GUID efi_dns6_service_binding_protocol_guid
DNSv6 service binding protocol GUID.
void __stack_chk_fail(void)
Abort on stack check failure.
EFI_GUID efi_absolute_pointer_protocol_guid
Absolute pointer protocol GUID.
EFI_GUID efi_hii_config_access_protocol_guid
HII configuration access protocol GUID.
EFI_SYSTEM_TABLE * efi_systab
uint16_t protocol
Protocol ID.
EFI_GUID efi_loaded_image_device_path_protocol_guid
Loaded image device path protocol GUID.
EFI_LOCATE_SEARCH_TYPE
Enumeration of EFI Locate Search Types.
EFI_GUID efi_driver_binding_protocol_guid
Driver binding protocol GUID.
EFI_GUID efi_ip4_config_protocol_guid
IPv4 configuration protocol GUID.
EFI_GUID efi_pci_io_protocol_guid
PCI I/O protocol GUID.
int required
Table is required for operation.
EFI_GUID efi_file_info_id
File information GUID.
EFI_GUID efi_udp6_protocol_guid
UDPv6 protocol GUID.
EFI_GUID efi_ip4_config2_protocol_guid
IPv4 configuration 2 protocol GUID.
EFI_GUID efi_ip6_config_protocol_guid
IPv6 configuration protocol GUID.
EFI_GUID efi_ip4_service_binding_protocol_guid
IPv4 service binding protocol GUID.
EFI_GUID efi_http_service_binding_protocol_guid
HTTP service binding protocol GUID.
EFI_GUID efi_disk_io_protocol_guid
Disk I/O protocol GUID.
void dbg_efi_protocols(EFI_HANDLE handle)
Print list of protocol handlers attached to a handle.