iPXE
efi.h
Go to the documentation of this file.
1 #ifndef _IPXE_EFI_H
2 #define _IPXE_EFI_H
3 
4 /** @file
5  *
6  * EFI API
7  *
8  * The intention is to include near-verbatim copies of the EFI headers
9  * required by iPXE. This is achieved using the import.pl script in
10  * this directory. Run the import script to update the local copies
11  * of the headers:
12  *
13  * ./import.pl /path/to/edk2/edk2
14  *
15  * where /path/to/edk2/edk2 is the path to your local checkout of the
16  * EFI Development Kit.
17  *
18  * Note that import.pl will modify any #include lines in each imported
19  * header to reflect its new location within the iPXE tree. It will
20  * also tidy up the file by removing carriage return characters and
21  * trailing whitespace.
22  */
23 
24 FILE_LICENCE ( GPL2_OR_LATER );
25 
26 /* EFI headers rudely redefine NULL */
27 #undef NULL
28 
29 /* EFI headers redefine ARRAY_SIZE */
30 #undef ARRAY_SIZE
31 
32 /* EFI headers think your compiler uses the MS ABI by default on X64 */
33 #if __x86_64__
34 #define EFIAPI __attribute__((ms_abi))
35 #endif
36 
37 /* EFI headers assume regparm(0) on i386, but that is not the case for iPXE */
38 #if __i386__
39 #define EFIAPI __attribute__((cdecl,regparm(0)))
40 #endif
41 
42 /* EFI headers define EFI_HANDLE and EFI_EVENT as void pointers, which
43  * renders type checking somewhat useless. Work around this bizarre
44  * sabotage attempt by redefining both as pointers to anonymous
45  * structures.
46  *
47  * EFI headers perform some ABI validation checks via _Static_assert()
48  * that may fail when EFI headers are included on a non-EFI platform.
49  * Temporarily disable static assertions to allow these headers to be
50  * included.
51  */
52 #define EFI_HANDLE STUPID_EFI_HANDLE
53 #define EFI_EVENT STUPID_EFI_EVENT
54 #ifndef PLATFORM_efi
55 #define _Static_assert(expr, msg)
56 #endif
58 #undef EFI_HANDLE
59 #undef EFI_EVENT
60 #undef _Static_assert
61 typedef struct {} *EFI_HANDLE;
62 typedef struct {} *EFI_EVENT;
63 
64 /* Include the top-level EFI header files */
65 #include <ipxe/efi/Uefi.h>
66 #include <ipxe/efi/PiDxe.h>
68 
69 /* Reset any trailing #pragma pack directives */
70 #pragma pack(1)
71 #pragma pack()
72 
73 #include <ipxe/tables.h>
74 #include <ipxe/uuid.h>
75 #include <ipxe/version.h>
76 #include <ipxe/profile.h>
77 
78 /** An EFI saved task priority level */
79 struct efi_saved_tpl {
80  /** Current external TPL */
82  /** Previous external TPL */
84 };
85 
86 /** An EFI protocol used by iPXE */
87 struct efi_protocol {
88  /** GUID */
90  /** Variable containing pointer to protocol structure */
91  void **protocol;
92  /** Protocol is required */
93  int required;
94 };
95 
96 /** EFI protocol table */
97 #define EFI_PROTOCOLS __table ( struct efi_protocol, "efi_protocols" )
98 
99 /** Declare an EFI protocol used by iPXE */
100 #define __efi_protocol __table_entry ( EFI_PROTOCOLS, 01 )
101 
102 /** Declare an EFI protocol to be required by iPXE
103  *
104  * @v _protocol EFI protocol name
105  * @v _ptr Pointer to protocol instance
106  */
107 #define EFI_REQUIRE_PROTOCOL( _protocol, _ptr ) \
108  struct efi_protocol __ ## _protocol __efi_protocol = { \
109  .guid = _protocol ## _GUID, \
110  .protocol = ( ( void ** ) ( void * ) \
111  ( ( (_ptr) == ( ( _protocol ** ) (_ptr) ) ) ? \
112  (_ptr) : (_ptr) ) ), \
113  .required = 1, \
114  }
115 
116 /** Declare an EFI protocol to be requested by iPXE
117  *
118  * @v _protocol EFI protocol name
119  * @v _ptr Pointer to protocol instance
120  */
121 #define EFI_REQUEST_PROTOCOL( _protocol, _ptr ) \
122  struct efi_protocol __ ## _protocol __efi_protocol = { \
123  .guid = _protocol ## _GUID, \
124  .protocol = ( ( void ** ) ( void * ) \
125  ( ( (_ptr) == ( ( _protocol ** ) (_ptr) ) ) ? \
126  (_ptr) : (_ptr) ) ), \
127  .required = 0, \
128  }
129 
130 /** An EFI configuration table used by iPXE */
132  /** GUID */
134  /** Variable containing pointer to configuration table */
135  void **table;
136  /** Table is required for operation */
137  int required;
138 };
139 
140 /** EFI configuration table table */
141 #define EFI_CONFIG_TABLES \
142  __table ( struct efi_config_table, "efi_config_tables" )
143 
144 /** Declare an EFI configuration table used by iPXE */
145 #define __efi_config_table __table_entry ( EFI_CONFIG_TABLES, 01 )
146 
147 /** Declare an EFI configuration table to be used by iPXE
148  *
149  * @v _table EFI configuration table name
150  * @v _ptr Pointer to configuration table
151  * @v _required Table is required for operation
152  */
153 #define EFI_USE_TABLE( _table, _ptr, _required ) \
154  struct efi_config_table __ ## _table __efi_config_table = { \
155  .guid = _table ## _GUID, \
156  .table = ( ( void ** ) ( void * ) (_ptr) ), \
157  .required = (_required), \
158  }
159 
160 /**
161  * Convert an iPXE status code to an EFI status code
162  *
163  * @v rc iPXE status code
164  * @ret efirc EFI status code
165  */
166 #define EFIRC( rc ) ERRNO_TO_PLATFORM ( -(rc) )
167 
168 /**
169  * Convert an EFI status code to an iPXE status code
170  *
171  * @v efirc EFI status code
172  * @ret rc iPXE status code (before negation)
173  */
174 #define EEFI( efirc ) EPLATFORM ( EINFO_EPLATFORM, efirc )
175 
256 
262 
270 
277 extern int efi_shutdown_in_progress;
278 
279 extern const __attribute__ (( pure )) char *
281 extern const __attribute__ (( pure )) char *
282 efi_tpl_name ( EFI_TPL tpl );
283 extern const __attribute__ (( pure )) char *
285 extern const __attribute__ (( pure )) char *
286 efi_open_attributes_name ( unsigned int attributes );
287 extern const __attribute__ (( pure )) char *
289 extern const __attribute__ (( pure )) char *
291 
296 extern void dbg_efi_protocols ( EFI_HANDLE handle );
297 
298 #define DBG_EFI_OPENER_IF( level, handle, protocol, \
299  opener ) do { \
300  if ( DBG_ ## level ) { \
301  dbg_efi_opener ( handle, protocol, \
302  opener ); \
303  } \
304  } while ( 0 )
305 
306 #define DBG_EFI_OPENERS_IF( level, handle, protocol ) do { \
307  if ( DBG_ ## level ) { \
308  dbg_efi_openers ( handle, protocol ); \
309  } \
310  } while ( 0 )
311 
312 #define DBG_EFI_PROTOCOLS_IF( level, handle ) do { \
313  if ( DBG_ ## level ) { \
314  dbg_efi_protocols ( handle ); \
315  } \
316  } while ( 0 )
317 
318 #define DBGC_EFI_OPENER_IF( level, id, ... ) do { \
319  DBG_AC_IF ( level, id ); \
320  DBG_EFI_OPENER_IF ( level, __VA_ARGS__ ); \
321  DBG_DC_IF ( level ); \
322  } while ( 0 )
323 
324 #define DBGC_EFI_OPENERS_IF( level, id, ... ) do { \
325  DBG_AC_IF ( level, id ); \
326  DBG_EFI_OPENERS_IF ( level, __VA_ARGS__ ); \
327  DBG_DC_IF ( level ); \
328  } while ( 0 )
329 
330 #define DBGC_EFI_PROTOCOL_IF( level, id, ... ) do { \
331  DBG_AC_IF ( level, id ); \
332  DBG_EFI_PROTOCOL_IF ( level, __VA_ARGS__ ); \
333  DBG_DC_IF ( level ); \
334  } while ( 0 )
335 
336 #define DBGC_EFI_PROTOCOLS_IF( level, id, ... ) do { \
337  DBG_AC_IF ( level, id ); \
338  DBG_EFI_PROTOCOLS_IF ( level, __VA_ARGS__ ); \
339  DBG_DC_IF ( level ); \
340  } while ( 0 )
341 
342 #define DBGC_EFI_OPENER( ... ) \
343  DBGC_EFI_OPENER_IF ( LOG, ##__VA_ARGS__ )
344 #define DBGC_EFI_OPENERS( ... ) \
345  DBGC_EFI_OPENERS_IF ( LOG, ##__VA_ARGS__ )
346 #define DBGC_EFI_PROTOCOL( ... ) \
347  DBGC_EFI_PROTOCOL_IF ( LOG, ##__VA_ARGS__ )
348 #define DBGC_EFI_PROTOCOLS( ... ) \
349  DBGC_EFI_PROTOCOLS_IF ( LOG, ##__VA_ARGS__ )
350 
351 #define DBGC2_EFI_OPENER( ... ) \
352  DBGC_EFI_OPENER_IF ( EXTRA, ##__VA_ARGS__ )
353 #define DBGC2_EFI_OPENERS( ... ) \
354  DBGC_EFI_OPENERS_IF ( EXTRA, ##__VA_ARGS__ )
355 #define DBGC2_EFI_PROTOCOL( ... ) \
356  DBGC_EFI_PROTOCOL_IF ( EXTRA, ##__VA_ARGS__ )
357 #define DBGC2_EFI_PROTOCOLS( ... ) \
358  DBGC_EFI_PROTOCOLS_IF ( EXTRA, ##__VA_ARGS__ )
359 
360 #define DBGCP_EFI_OPENER( ... ) \
361  DBGC_EFI_OPENER_IF ( PROFILE, ##__VA_ARGS__ )
362 #define DBGCP_EFI_OPENERS( ... ) \
363  DBGC_EFI_OPENERS_IF ( PROFILE, ##__VA_ARGS__ )
364 #define DBGCP_EFI_PROTOCOL( ... ) \
365  DBGC_EFI_PROTOCOL_IF ( PROFILE, ##__VA_ARGS__ )
366 #define DBGCP_EFI_PROTOCOLS( ... ) \
367  DBGC_EFI_PROTOCOLS_IF ( PROFILE, ##__VA_ARGS__ )
368 
369 /* Allow for EFI-only interface operations */
370 #ifdef PLATFORM_efi
371 #define EFI_INTF_OP INTF_OP
372 #else
373 #define EFI_INTF_OP UNUSED_INTF_OP
374 #endif
375 
376 extern unsigned long __stack_chk_guard;
377 extern unsigned long efi_stack_cookie ( EFI_HANDLE handle );
378 extern void __stack_chk_fail ( void );
379 
380 /**
381  * Initialise stack cookie
382  *
383  * @v handle Image handle
384  */
385 static inline __attribute__ (( always_inline )) void
387 
388  /* The calling function must not itself use stack protection,
389  * since the change in the stack guard value would trigger a
390  * false positive.
391  *
392  * There is unfortunately no way to annotate a function to
393  * exclude the use of stack protection. We must therefore
394  * rely on correctly anticipating the compiler's decision on
395  * the use of stack protection.
396  *
397  * The calculation of the stack cookie value deliberately
398  * takes the address of a stack variable (to provide an
399  * additional source of entropy). This operation would
400  * trigger the application of stack protection to the calling
401  * function, and so must be externalised.
402  */
404 }
405 
406 extern EFI_STATUS efi_init ( EFI_HANDLE image_handle,
407  EFI_SYSTEM_TABLE *systab );
408 extern void efi_raise_tpl ( struct efi_saved_tpl *tpl );
409 extern void efi_restore_tpl ( struct efi_saved_tpl *tpl );
411  void **interface );
413  void **interface );
416  void **interface );
419  EFI_HANDLE child, void **interface );
421  EFI_HANDLE child );
422 extern int efi_connect ( EFI_HANDLE device, EFI_HANDLE driver );
423 extern int efi_disconnect ( EFI_HANDLE device, EFI_HANDLE driver );
424 
425 /**
426  * Test protocol existence
427  *
428  * @v handle EFI handle
429  * @v protocol Protocol GUID
430  * @ret rc Return status code
431  */
432 #define efi_test( handle, protocol ) \
433  efi_open_untyped ( (handle), (protocol), NULL )
434 
435 /**
436  * Open protocol for ephemeral use
437  *
438  * @v handle EFI handle
439  * @v protocol Protocol GUID
440  * @v interface Protocol interface pointer to fill in
441  * @ret rc Return status code
442  */
443 #define efi_open( handle, protocol, interface ) ( { \
444  typeof ( *(interface) ) check_ptr_ptr = NULL; \
445  efi_open_untyped ( (handle), (protocol), \
446  ( ( void ) check_ptr_ptr, \
447  ( void ** ) (interface) ) ); \
448  } )
449 
450 /**
451  * Open protocol for unsafe persistent use
452  *
453  * @v handle EFI handle
454  * @v protocol Protocol GUID
455  * @v interface Protocol interface pointer to fill in
456  * @ret rc Return status code
457  */
458 #define efi_open_unsafe( handle, protocol, interface ) ( { \
459  typeof ( *(interface) ) check_ptr_ptr = NULL; \
460  efi_open_unsafe_untyped ( (handle), (protocol), \
461  ( ( void ) check_ptr_ptr, \
462  ( void ** ) (interface) ) ); \
463  } )
464 
465 /**
466  * Open protocol for persistent use by a driver
467  *
468  * @v handle EFI handle
469  * @v protocol Protocol GUID
470  * @v interface Protocol interface pointer to fill in
471  * @ret rc Return status code
472  */
473 #define efi_open_by_driver( handle, protocol, interface ) ( { \
474  typeof ( *(interface) ) check_ptr_ptr = NULL; \
475  efi_open_by_driver_untyped ( (handle), (protocol), \
476  ( ( void ) check_ptr_ptr, \
477  ( void ** ) (interface) ) ); \
478  } )
479 
480 /**
481  * Open protocol for persistent use by a child controller
482  *
483  * @v handle EFI handle
484  * @v protocol Protocol GUID
485  * @v child Child controller handle
486  * @v interface Protocol interface pointer to fill in
487  * @ret rc Return status code
488  */
489 #define efi_open_by_child( handle, protocol, child, interface ) ( { \
490  typeof ( *(interface) ) check_ptr_ptr = NULL; \
491  efi_open_by_child_untyped ( (handle), (protocol), (child), \
492  ( ( void ) check_ptr_ptr, \
493  ( void ** ) (interface) ) ); \
494  } )
495 
496 #endif /* _IPXE_EFI_H */
#define __attribute__(x)
Definition: compiler.h:10
void efi_restore_tpl(struct efi_saved_tpl *tpl)
Restore task priority level.
Definition: efi_init.c:398
void ** protocol
Variable containing pointer to protocol structure.
Definition: efi.h:91
EFI_GUID efi_microsoft_vendor_guid
Microsoft vendor GUID.
Definition: efi_guid.c:474
EFI_GUID efi_pci_root_bridge_io_protocol_guid
PCI root bridge I/O protocol GUID.
Definition: efi_guid.c:316
EFI_GUID efi_mtftp4_service_binding_protocol_guid
MTFTPv4 service binding protocol GUID.
Definition: efi_guid.c:292
EFI_GUID efi_component_name2_protocol_guid
Component name 2 protocol GUID.
Definition: efi_guid.c:160
static void efi_init_stack_guard(EFI_HANDLE handle)
Initialise stack cookie.
Definition: efi.h:386
EFI_GUID efi_eap_configuration_protocol_guid
EAP configuration protocol GUID.
Definition: efi_guid.c:212
EFI Oprn Protocol Information Entry.
Definition: UefiSpec.h:1431
EFI_GUID efi_ip4_protocol_guid
IPv4 protocol GUID.
Definition: efi_guid.c:236
EFI_DEVICE_PATH_PROTOCOL * efi_loaded_image_path
Device path for the loaded image's device handle.
Definition: efi_init.c:41
EFI_GUID efi_ip6_protocol_guid
IPv6 protocol GUID.
Definition: efi_guid.c:252
EFI_GUID efi_block_io_protocol_guid
Block I/O protocol GUID.
Definition: efi_guid.c:144
unsigned long __stack_chk_guard
Stack cookie.
Definition: efi_init.c:65
EFI_GUID efi_mtftp6_service_binding_protocol_guid
MTFTPv6 service binding protocol GUID.
Definition: efi_guid.c:300
#define EFI_HANDLE
Definition: efi.h:52
EFI_GUID efi_load_file2_protocol_guid
Load file 2 protocol GUID.
Definition: efi_guid.c:268
EFI_GUID efi_mtftp6_protocol_guid
MTFTPv6 protocol GUID.
Definition: efi_guid.c:296
EFI_GUID efi_shim_lock_protocol_guid
Shim lock protocol GUID.
Definition: efi_guid.c:332
EFI_GUID efi_tcp6_service_binding_protocol_guid
TCPv6 service binding protocol GUID.
Definition: efi_guid.c:388
EFI_GUID efi_simple_file_system_protocol_guid
Simple file system protocol GUID.
Definition: efi_guid.c:336
EFI_GUID efi_image_security_database_guid
Image security database GUID.
Definition: efi_guid.c:471
128 bit buffer containing a unique identifier value.
Definition: Base.h:215
EFI_GUID efi_dhcp4_protocol_guid
DHCPv4 protocol GUID.
Definition: efi_guid.c:172
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
EFI_GUID efi_dhcp6_service_binding_protocol_guid
DHCPv6 service binding protocol GUID.
Definition: efi_guid.c:184
EFI_GUID efi_simple_pointer_protocol_guid
Simple pointer protocol GUID.
Definition: efi_guid.c:344
EFI_GUID efi_component_name_protocol_guid
Component name protocol GUID.
Definition: efi_guid.c:156
EFI_GUID guid
GUID.
Definition: efi.h:89
EFI_GUID efi_dns4_protocol_guid
DNSv4 protocol GUID.
Definition: efi_guid.c:192
int efi_open_by_child_untyped(EFI_HANDLE handle, EFI_GUID *protocol, EFI_HANDLE child, void **interface)
Open protocol for persistent use by a child controller.
Definition: efi_open.c:301
EFI_GUID efi_tcp4_service_binding_protocol_guid
TCPv4 service binding protocol GUID.
Definition: efi_guid.c:380
EFI_GUID efi_device_path_protocol_guid
Device path protocol GUID.
Definition: efi_guid.c:168
EFI_GUID efi_apple_net_boot_protocol_guid
Apple NetBoot protocol GUID.
Definition: efi_guid.c:132
EFI_GUID efi_loaded_image_protocol_guid
Loaded image protocol GUID.
Definition: efi_guid.c:272
EFI_GUID efi_acpi_table_protocol_guid
ACPI table protocol GUID.
Definition: efi_guid.c:124
#define EFI_EVENT
Definition: efi.h:53
const char * efi_tpl_name(EFI_TPL tpl)
Name EFI TPL.
Definition: efi_debug.c:55
EFI_GUID efi_supplicant_protocol_guid
Supplicant protocol GUID.
Definition: efi_guid.c:364
unsigned long efi_stack_cookie(EFI_HANDLE handle)
Construct a stack cookie value.
Definition: efi_init.c:114
const char * efi_locate_search_type_name(EFI_LOCATE_SEARCH_TYPE search_type)
Name locate search type.
Definition: efi_debug.c:77
Universally unique IDs.
void dbg_efi_openers(EFI_HANDLE handle, EFI_GUID *protocol)
Print list of openers of a given protocol on a given handle.
Definition: efi_debug.c:145
EFI_GUID efi_http_protocol_guid
HTTP protocol GUID.
Definition: efi_guid.c:228
EFI_GUID efi_tcp6_protocol_guid
TCPv6 protocol GUID.
Definition: efi_guid.c:384
EFI_GUID efi_unicode_collation_protocol_guid
Unicode collation protocol GUID.
Definition: efi_guid.c:416
EFI_GUID efi_uga_draw_protocol_guid
UGA draw protocol GUID.
Definition: efi_guid.c:412
This protocol can be used on any device handle to obtain generic path/location information concerning...
Definition: DevicePath.h:45
EFI_GUID efi_rng_protocol_guid
Random number generator protocol GUID.
Definition: efi_guid.c:324
void dbg_efi_opener(EFI_HANDLE handle, EFI_GUID *protocol, EFI_OPEN_PROTOCOL_INFORMATION_ENTRY *opener)
Print opened protocol information.
Definition: efi_debug.c:124
EFI_GUID efi_load_file_protocol_guid
Load file protocol GUID.
Definition: efi_guid.c:264
EFI_TPL efi_external_tpl
External task priority level.
Definition: efi_init.c:56
void efi_raise_tpl(struct efi_saved_tpl *tpl)
Raise task priority level to internal level.
Definition: efi_init.c:382
EFI_LOADED_IMAGE_PROTOCOL * efi_loaded_image
Loaded image protocol for this image.
Definition: efi_init.c:38
EFI_GUID efi_fdt_table_guid
FDT table GUID.
Definition: efi_guid.c:448
Root include file for Mde Package DXE_CORE, DXE, RUNTIME, SMM, SAL type modules.
UEFI 2.0 Loaded image protocol definition.
EFI_GUID efi_storage_security_command_protocol_guid
Storage security protocol GUID.
Definition: efi_guid.c:360
EFI_GUID efi_cert_x509_guid
X.509 certificate GUID.
Definition: efi_guid.c:459
An EFI configuration table used by iPXE.
Definition: efi.h:131
EFI_GUID efi_nii_protocol_guid
Network interface identifier protocol GUID (old version)
Definition: efi_guid.c:304
EFI_GUID efi_dhcp6_protocol_guid
DHCPv6 protocol GUID.
Definition: efi_guid.c:180
EFI_GUID efi_smbios2_table_guid
const char * efi_guid_ntoa(CONST EFI_GUID *guid)
Convert GUID to a printable string.
Definition: efi_guid.c:725
A hardware device.
Definition: device.h:76
int efi_connect(EFI_HANDLE device, EFI_HANDLE driver)
Connect UEFI driver(s)
Definition: efi_connect.c:57
EFI_GUID efi_ip6_service_binding_protocol_guid
IPv6 service binding protocol GUID.
Definition: efi_guid.c:260
Can be used on any image handle to obtain information about the loaded image.
Definition: LoadedImage.h:45
EFI_GUID efi_wifi2_protocol_guid
WiFi 2 protocol GUID.
Definition: efi_guid.c:436
EFI_GUID efi_global_variable
Global variable GUID.
Definition: efi_guid.c:468
EFI_TPL current
Current external TPL.
Definition: efi.h:81
EFI_GUID efi_block_io2_protocol_guid
Block I/O version 2 protocol GUID.
Definition: efi_guid.c:148
An object interface.
Definition: interface.h:124
EFI_GUID efi_pxe_base_code_protocol_guid
PXE base code protocol GUID.
Definition: efi_guid.c:320
EFI_GUID efi_acpi_10_table_guid
ACPI 1.0 table GUID.
Definition: efi_guid.c:440
EFI_GUID efi_console_control_protocol_guid
Console control protocol GUID.
Definition: efi_guid.c:164
EFI_GUID efi_dhcp4_service_binding_protocol_guid
DHCPv4 service binding protocol GUID.
Definition: efi_guid.c:176
const char * efi_devpath_text(EFI_DEVICE_PATH_PROTOCOL *path)
Get textual representation of device path.
Definition: efi_debug.c:247
EFI_GUID efi_usb2_hc_protocol_guid
USB2 host controller protocol GUID.
Definition: efi_guid.c:424
EFI_GUID efi_usb_hc_protocol_guid
USB host controller protocol GUID.
Definition: efi_guid.c:420
EFI_GUID efi_simple_text_input_protocol_guid
Simple text input protocol GUID.
Definition: efi_guid.c:348
EFI_STATUS efi_init(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *systab)
Initialise EFI environment.
Definition: efi_init.c:154
EFI_GUID efi_smbios_table_guid
SMBIOS table GUID.
Definition: efi_guid.c:452
Profiling.
An EFI protocol used by iPXE.
Definition: efi.h:87
EFI_GUID efi_simple_network_protocol_guid
Simple network protocol GUID.
Definition: efi_guid.c:340
EFI_GUID efi_simple_text_output_protocol_guid
Simple text output protocol GUID.
Definition: efi_guid.c:356
EFI_GUID efi_vlan_config_protocol_guid
VLAN configuration protocol GUID.
Definition: efi_guid.c:432
void dbg_efi_protocol(EFI_HANDLE handle, EFI_GUID *protocol)
Print protocol information on a given handle.
Definition: efi_debug.c:185
EFI_GUID efi_udp6_service_binding_protocol_guid
UDPv6 service binding protocol GUID.
Definition: efi_guid.c:408
const char * efi_handle_name(EFI_HANDLE handle)
Get name of an EFI handle.
Definition: efi_debug.c:652
EFI_GUID efi_graphics_output_protocol_guid
Graphics output protocol GUID.
Definition: efi_guid.c:216
EFI_GUID efi_bus_specific_driver_override_protocol_guid
Bus specific driver override protocol GUID.
Definition: efi_guid.c:152
EFI_GUID efi_mtftp4_protocol_guid
MTFTPv4 protocol GUID.
Definition: efi_guid.c:288
EFI_TPL previous
Previous external TPL.
Definition: efi.h:83
EFI_GUID efi_dns6_protocol_guid
DNSv6 protocol GUID.
Definition: efi_guid.c:200
Root include file for Mde Package UEFI, UEFI_APPLICATION type modules.
EFI_GUID efi_hii_font_protocol_guid
HII font protocol GUID.
Definition: efi_guid.c:224
EFI_GUID efi_simple_text_input_ex_protocol_guid
Simple text input extension protocol GUID.
Definition: efi_guid.c:352
EFI System Table.
Definition: UefiSpec.h:2043
EFI_GUID efi_dns4_service_binding_protocol_guid
DNSv4 service binding protocol GUID.
Definition: efi_guid.c:196
int efi_open_by_driver_untyped(EFI_HANDLE handle, EFI_GUID *protocol, void **interface)
Open protocol for persistent use by a driver.
Definition: efi_open.c:240
EFI_GUID efi_arp_protocol_guid
ARP protocol GUID.
Definition: efi_guid.c:136
EFI_GUID efi_acpi_20_table_guid
ACPI 2.0 table GUID.
Definition: efi_guid.c:444
Version number.
EFI_GUID efi_tcp4_protocol_guid
TCPv4 protocol GUID.
Definition: efi_guid.c:376
void efi_close_by_driver(EFI_HANDLE handle, EFI_GUID *protocol)
Close protocol opened for persistent use by a driver.
Definition: efi_open.c:278
EFI_GUID efi_tree_protocol_guid
TrEE protocol GUID.
Definition: efi_guid.c:392
EFI_GUID efi_managed_network_protocol_guid
Managed network protocol GUID.
Definition: efi_guid.c:280
void efi_close_unsafe(EFI_HANDLE handle, EFI_GUID *protocol)
Close protocol opened for unsafe persistent use.
Definition: efi_open.c:218
void ** table
Variable containing pointer to configuration table.
Definition: efi.h:135
uint64_t guid
GUID.
Definition: edd.h:30
int required
Protocol is required.
Definition: efi.h:93
EFI_GUID efi_arp_service_binding_protocol_guid
ARP service binding protocol GUID.
Definition: efi_guid.c:140
EFI_GUID efi_serial_io_protocol_guid
Serial I/O protocol GUID.
Definition: efi_guid.c:328
EFI_GUID efi_tls_ca_certificate_guid
TLS CA certificate variable GUID.
Definition: efi_guid.c:477
EFI_GUID efi_udp4_protocol_guid
UDPv4 protocol GUID.
Definition: efi_guid.c:396
int efi_disconnect(EFI_HANDLE device, EFI_HANDLE driver)
Disconnect UEFI driver(s)
Definition: efi_connect.c:89
EFI_GUID efi_adapter_information_protocol_guid
Adapter information protocol GUID.
Definition: efi_guid.c:128
void efi_close_by_child(EFI_HANDLE handle, EFI_GUID *protocol, EFI_HANDLE child)
Close protocol opened for persistent use by a child controller.
Definition: efi_open.c:343
EFI_TPL efi_internal_tpl
Internal task priority level.
Definition: efi_init.c:53
UINTN EFI_TPL
Task priority level.
Definition: UefiBaseType.h:43
An EFI saved task priority level.
Definition: efi.h:79
EFI_GUID efi_tcg2_protocol_guid
TCG2 protocol GUID.
Definition: efi_guid.c:372
EFI_GUID guid
GUID.
Definition: efi.h:133
#define CONST
Datum is read-only.
Definition: Base.h:261
const char * efi_open_attributes_name(unsigned int attributes)
Name protocol open attributes.
Definition: efi_debug.c:102
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:31
EFI_GUID efi_nii31_protocol_guid
Network interface identifier protocol GUID (new version)
Definition: efi_guid.c:308
int efi_open_unsafe_untyped(EFI_HANDLE handle, EFI_GUID *protocol, void **interface)
Open protocol for unsafe persistent use.
Definition: efi_open.c:180
EFI_GUID efi_tcg_protocol_guid
TCG protocol GUID.
Definition: efi_guid.c:368
EFI_GUID efi_udp4_service_binding_protocol_guid
UDPv4 service binding protocol GUID.
Definition: efi_guid.c:400
Defines data types and constants introduced in UEFI.
int efi_shutdown_in_progress
EFI shutdown is in progress.
Definition: efi_init.c:59
Linker tables.
EFI_HANDLE efi_image_handle
Image handle passed to entry point.
Definition: efi_init.c:35
EFI_GUID efi_managed_network_service_binding_protocol_guid
Managed network service binding protocol GUID.
Definition: efi_guid.c:284
EFI_GUID efi_usb_io_protocol_guid
USB I/O protocol GUID.
Definition: efi_guid.c:428
EFI_GUID efi_file_system_info_id
File system information GUID.
Definition: efi_guid.c:465
int efi_open_untyped(EFI_HANDLE handle, EFI_GUID *protocol, void **interface)
Open (or test) protocol for ephemeral use.
Definition: efi_open.c:96
EFI_GUID efi_dns6_service_binding_protocol_guid
DNSv6 service binding protocol GUID.
Definition: efi_guid.c:204
void __stack_chk_fail(void)
Abort on stack check failure.
Definition: efi_init.c:355
EFI_GUID efi_absolute_pointer_protocol_guid
Absolute pointer protocol GUID.
Definition: efi_guid.c:120
EFI_GUID efi_hii_config_access_protocol_guid
HII configuration access protocol GUID.
Definition: efi_guid.c:220
EFI_SYSTEM_TABLE * efi_systab
uint16_t protocol
Protocol ID.
Definition: stp.h:18
EFI_GUID efi_loaded_image_device_path_protocol_guid
Loaded image device path protocol GUID.
Definition: efi_guid.c:276
EFI_LOCATE_SEARCH_TYPE
Enumeration of EFI Locate Search Types.
Definition: UefiSpec.h:1517
EFI_GUID efi_driver_binding_protocol_guid
Driver binding protocol GUID.
Definition: efi_guid.c:208
EFI_GUID efi_ip4_config_protocol_guid
IPv4 configuration protocol GUID.
Definition: efi_guid.c:240
EFI_GUID efi_pci_io_protocol_guid
PCI I/O protocol GUID.
Definition: efi_guid.c:312
int required
Table is required for operation.
Definition: efi.h:137
EFI_GUID efi_file_info_id
File information GUID.
Definition: efi_guid.c:462
EFI_GUID efi_udp6_protocol_guid
UDPv6 protocol GUID.
Definition: efi_guid.c:404
EFI_GUID efi_ip4_config2_protocol_guid
IPv4 configuration 2 protocol GUID.
Definition: efi_guid.c:244
uint16_t handle
Handle.
Definition: smbios.h:16
EFI_GUID efi_ip6_config_protocol_guid
IPv6 configuration protocol GUID.
Definition: efi_guid.c:256
Definition: efi.h:61
EFI_GUID efi_ip4_service_binding_protocol_guid
IPv4 service binding protocol GUID.
Definition: efi_guid.c:248
EFI_GUID efi_http_service_binding_protocol_guid
HTTP service binding protocol GUID.
Definition: efi_guid.c:232
EFI_GUID efi_disk_io_protocol_guid
Disk I/O protocol GUID.
Definition: efi_guid.c:188
void dbg_efi_protocols(EFI_HANDLE handle)
Print list of protocol handlers attached to a handle.
Definition: efi_debug.c:208