42#define colour &efi_systab
45#define EFI_WRAP_DUMP_MAX 128
48#define EFI_WRAP_PRESCROLL 16
75 static char buf[ 19 ];
116 snprintf ( buf,
sizeof ( buf ),
"%#lx",
117 (
unsigned long ) efirc );
130 return (
boolean ?
"TRUE" :
"FALSE" );
140 static char buf[ 11 ];
159 static char buf[ 11 ];
190 static char buf[ 11 ];
209 static char buf[ 20 ];
213 snprintf ( buf,
sizeof ( buf ),
"%04d-%02d-%02d %02d:%02d:%02d",
226 static char buf[ 11 ];
254 &columns, &rows ) ) != 0 )
261 while ( space++ < lines )
283 DBGC (
colour,
"WRAP %s could not get loaded image protocol: "
289 DBGC (
colour,
"WRAP %s at base %p has protocols:\n",
307 void *retaddr = __builtin_return_address ( 0 );
323 void *retaddr = __builtin_return_address ( 0 );
339 void *retaddr = __builtin_return_address ( 0 );
342 DBGC2 (
colour,
"AllocatePages ( %s, %s, %#llx, %#llx ) ",
344 ( (
unsigned long long ) pages ),
345 ( (
unsigned long long ) *memory ) );
348 ( (
unsigned long long ) *memory ), retaddr );
359 void *retaddr = __builtin_return_address ( 0 );
363 ( (
unsigned long long ) memory ),
364 ( (
unsigned long long ) pages ) );
377 UINTN *descriptor_size,
378 UINT32 *descriptor_version ) {
380 void *retaddr = __builtin_return_address ( 0 );
386 ( (
unsigned long long ) *memory_map_size ), memory_map );
387 efirc = bs->
GetMemoryMap ( memory_map_size, memory_map, map_key,
388 descriptor_size, descriptor_version );
389 DBGC (
colour,
"= %s ( %#llx, %#llx, %#llx, v%d",
391 ( (
unsigned long long ) *memory_map_size ),
392 ( (
unsigned long long ) *map_key ),
393 ( (
unsigned long long ) *descriptor_size ),
394 *descriptor_version );
397 for (
desc = memory_map, remaining = *memory_map_size ;
398 remaining >= *descriptor_size ;
399 desc = ( ( (
void * )
desc ) + *descriptor_size ),
400 remaining -= *descriptor_size ) {
402 "%s\n",
desc->PhysicalStart,
422 void *retaddr = __builtin_return_address ( 0 );
427 ( (
unsigned long long )
size ) );
441 void *retaddr = __builtin_return_address ( 0 );
459 void *retaddr = __builtin_return_address ( 0 );
463 efi_tpl_name ( notify_tpl ), notify_function, notify_context );
465 notify_context, event );
479 void *retaddr = __builtin_return_address ( 0 );
482 DBGC (
colour,
"SetTimer ( %p, %s, %ld.%07ld00s ) ",
484 ( (
unsigned long ) ( trigger_time / 10000000 ) ),
485 ( (
unsigned long ) ( trigger_time % 10000000 ) ) );
499 void *retaddr = __builtin_return_address ( 0 );
504 for ( i = 0 ; i < number_of_events ; i++ )
522 void *retaddr = __builtin_return_address ( 0 );
538 void *retaddr = __builtin_return_address ( 0 );
553 void *retaddr = __builtin_return_address ( 0 );
571 void *retaddr = __builtin_return_address ( 0 );
574 DBGC (
colour,
"InstallProtocolInterface ( %s, %s, %d, %p ) ",
592 VOID *new_interface ) {
594 void *retaddr = __builtin_return_address ( 0 );
597 DBGC (
colour,
"ReinstallProtocolInterface ( %s, %s, %p, %p ) ",
599 old_interface, new_interface );
601 old_interface, new_interface );
615 void *retaddr = __builtin_return_address ( 0 );
618 DBGC (
colour,
"UninstallProtocolInterface ( %s, %s, %p ) ",
634 void *retaddr = __builtin_return_address ( 0 );
651 VOID **registration ) {
653 void *retaddr = __builtin_return_address ( 0 );
656 DBGC (
colour,
"RegisterProtocolNotify ( %s, %p ) ",
660 efi_status ( efirc ), *registration, retaddr );
673 void *retaddr = __builtin_return_address ( 0 );
677 DBGC (
colour,
"LocateHandle ( %s, %s, %p, %zd ) ",
706 void *retaddr = __builtin_return_address ( 0 );
709 DBGC (
colour,
"LocateDevicePath ( %s, %s ) ",
725 void *retaddr = __builtin_return_address ( 0 );
728 DBGC (
colour,
"InstallConfigurationTable ( %s, %p ) ",
745 void *retaddr = __builtin_return_address ( 0 );
775 void *retaddr = __builtin_return_address ( 0 );
779 efirc = bs->
StartImage ( image_handle, exit_data_size, exit_data );
781 if ( ( efirc != 0 ) && exit_data && *exit_data_size )
784 if ( ( efirc != 0 ) && exit_data && *exit_data_size )
797 void *retaddr = __builtin_return_address ( 0 );
800 if ( ( exit_status != 0 ) && exit_data && exit_data_size )
804 if ( ( exit_status != 0 ) && exit_data && exit_data_size )
807 efirc = bs->
Exit ( image_handle, exit_status, exit_data_size,
820 void *retaddr = __builtin_return_address ( 0 );
837 void *retaddr = __builtin_return_address ( 0 );
840 DBGC (
colour,
"ExitBootServices ( %s, %#llx ) -> %p\n",
842 ( (
unsigned long long ) map_key ), retaddr );
845 DBGC (
colour,
"ExitBootServices ( ... ) = %s -> %p\n",
867 void *retaddr = __builtin_return_address ( 0 );
884 void *retaddr = __builtin_return_address ( 0 );
888 ( (
unsigned long ) ( microseconds / 1000000 ) ),
889 ( (
unsigned long ) ( microseconds % 1000000 ) ) );
890 efirc = bs->
Stall ( microseconds );
903 void *retaddr = __builtin_return_address ( 0 );
906 DBGC (
colour,
"SetWatchdogTimer ( %lds, %#llx, %#llx, %p ) ",
907 ( (
unsigned long )
timeout ), watchdog_code,
908 ( (
unsigned long long ) data_size ), watchdog_data );
925 void *retaddr = __builtin_return_address ( 0 );
931 if ( driver_image_handle ) {
932 for (
tmp = driver_image_handle ; *
tmp ;
tmp++ ) {
934 ( (
tmp == driver_image_handle ) ?
" " :
", " ),
941 remaining_path, recursive );
955 void *retaddr = __builtin_return_address ( 0 );
978 void *retaddr = __builtin_return_address ( 0 );
987 controller_handle, attributes );
1002 void *retaddr = __builtin_return_address ( 0 );
1010 controller_handle );
1024 UINTN *entry_count ) {
1026 void *retaddr = __builtin_return_address ( 0 );
1029 DBGC (
colour,
"OpenProtocolInformation ( %s, %s ) ",
1035 ( (
unsigned long long ) *entry_count ), retaddr );
1046 UINTN *protocol_buffer_count ) {
1048 void *retaddr = __builtin_return_address ( 0 );
1055 protocol_buffer_count );
1059 for ( i = 0 ; i < *protocol_buffer_count ; i++ ) {
1078 void *retaddr = __builtin_return_address ( 0 );
1082 DBGC (
colour,
"LocateHandleBuffer ( %s, %s, %p ) ",
1089 DBGC (
colour,
" ( %d, {", ( (
unsigned int ) *no_handles ) );
1090 for ( i = 0 ; i < *no_handles ; i++ ) {
1108 void *retaddr = __builtin_return_address ( 0 );
1120#define MAX_WRAP_MULTI 20
1129 void *retaddr = __builtin_return_address ( 0 );
1136 DBGC (
colour,
"InstallMultipleProtocolInterfaces ( %s",
1145 DBGC (
colour,
"<FATAL: too many arguments> ) = %s "
1179 void *retaddr = __builtin_return_address ( 0 );
1186 DBGC (
colour,
"UninstallMultipleProtocolInterfaces ( %s",
1195 DBGC (
colour,
"<FATAL: too many arguments> ) = %s "
1232 void *retaddr = __builtin_return_address ( 0 );
1235 DBGC (
colour,
"CreateEventEx ( %#x, %s, %p, %p, %s ) ",
1239 notify_context, event_group, event );
1252 void *retaddr = __builtin_return_address ( 0 );
1256 efirc = rs->
GetTime ( time, cap );
1269 void *retaddr = __builtin_return_address ( 0 );
1286 void *retaddr = __builtin_return_address ( 0 );
1304 void *retaddr = __builtin_return_address ( 0 );
1322 void *retaddr = __builtin_return_address ( 0 );
1326 DBGC (
colour,
"GetVariable ( %s:%ls, %#llx ) ",
1337 if ( dumplen != *
len )
1354 void *retaddr = __builtin_return_address ( 0 );
1357 DBGC (
colour,
"GetNextVariableName ( %#llx, %s:%ls ) ",
1374 void *retaddr = __builtin_return_address ( 0 );
1377 DBGC (
colour,
"SetVariable ( %s:%ls, %#02x",
1385 ( (
unsigned long long )
len ),
data );
1400 void *retaddr = __builtin_return_address ( 0 );
1402 DBGC (
colour,
"ResetSystem ( %s, %s, %#llx, %p ) -> %p\n",
1404 ( (
unsigned long long )
len ),
data, retaddr );
1421 memcpy ( wrapper, bs,
sizeof ( *wrapper ) );
1484 memcpy ( wrapper, rs,
sizeof ( *wrapper ) );
1535 DBGC (
colour,
"WRAP installed %s wrappers\n",
1536 ( global ?
"global" :
"local" ) );
1559 DBGC (
colour,
"WRAP uninstalled wrappers\n" );
unsigned char BOOLEAN
Logical Boolean.
UINT64 UINTN
Unsigned value of native width.
unsigned long long UINT64
8-byte unsigned value.
unsigned short CHAR16
2-byte Character.
unsigned int UINT32
4-byte unsigned value.
#define NULL
NULL pointer (VOID *)
#define CONST
Datum is read-only.
#define VA_ARG(Marker, TYPE)
Returns an argument of a specified type from a variable argument list and updates the pointer to the ...
#define VA_START(Marker, Parameter)
Retrieves a pointer to the beginning of a variable argument list, based on the name of the parameter ...
#define VOID
Undeclared type.
CHAR8 * VA_LIST
Variable used to traverse the list of arguments.
#define VA_END(Marker)
Terminates the use of a variable argument list.
UEFI 2.0 Loaded image protocol definition.
struct _EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
#define EFI_NO_MAPPING
Enumeration of EFI_STATUS.
#define EFI_WARN_UNKNOWN_GLYPH
Enumeration of EFI_STATUS.
#define EFI_MEDIA_CHANGED
Enumeration of EFI_STATUS.
#define EFI_NOT_READY
Enumeration of EFI_STATUS.
#define EFI_VOLUME_FULL
Enumeration of EFI_STATUS.
#define EFI_DEVICE_ERROR
Enumeration of EFI_STATUS.
UINT64 EFI_PHYSICAL_ADDRESS
64-bit physical memory address.
#define EFI_UNSUPPORTED
Enumeration of EFI_STATUS.
#define EFI_SECURITY_VIOLATION
Enumeration of EFI_STATUS.
#define EFI_NO_RESPONSE
Enumeration of EFI_STATUS.
#define EFI_ALREADY_STARTED
Enumeration of EFI_STATUS.
#define EFI_INCOMPATIBLE_VERSION
Enumeration of EFI_STATUS.
#define EFI_INVALID_PARAMETER
Enumeration of EFI_STATUS.
#define EFI_INVALID_LANGUAGE
Enumeration of EFI_STATUS.
#define EFI_CRC_ERROR
Enumeration of EFI_STATUS.
#define EFI_WRITE_PROTECTED
Enumeration of EFI_STATUS.
#define EFI_PROTOCOL_ERROR
Enumeration of EFI_STATUS.
#define EFI_NO_MEDIA
Enumeration of EFI_STATUS.
#define EFI_NOT_STARTED
Enumeration of EFI_STATUS.
#define EFI_VOLUME_CORRUPTED
Enumeration of EFI_STATUS.
#define EFI_ACCESS_DENIED
Enumeration of EFI_STATUS.
#define EFI_NOT_FOUND
Enumeration of EFI_STATUS.
#define EFI_END_OF_FILE
Enumeration of EFI_STATUS.
#define EFI_ICMP_ERROR
Enumeration of EFI_STATUS.
#define EFI_BAD_BUFFER_SIZE
Enumeration of EFI_STATUS.
#define EFI_END_OF_MEDIA
Enumeration of EFI_STATUS.
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
#define EFI_COMPROMISED_DATA
Enumeration of EFI_STATUS.
UINTN EFI_TPL
Task priority level.
#define EFI_WARN_WRITE_FAILURE
Enumeration of EFI_STATUS.
#define EFI_TFTP_ERROR
Enumeration of EFI_STATUS.
#define EFI_TIMEOUT
Enumeration of EFI_STATUS.
GUID EFI_GUID
128-bit buffer containing a unique identifier value.
#define EFI_WARN_STALE_DATA
Enumeration of EFI_STATUS.
#define EFI_BUFFER_TOO_SMALL
Enumeration of EFI_STATUS.
#define EFI_OUT_OF_RESOURCES
Enumeration of EFI_STATUS.
#define EFI_LOAD_ERROR
Enumeration of EFI_STATUS.
#define EFI_WARN_BUFFER_TOO_SMALL
Enumeration of EFI_STATUS.
#define EFI_ABORTED
Enumeration of EFI_STATUS.
#define EFI_WARN_DELETE_FAILURE
Enumeration of EFI_STATUS.
#define EFI_SUCCESS
Enumeration of EFI_STATUS.
EFI_MEMORY_TYPE
Enumeration of memory types introduced in UEFI.
@ EfiUnusableMemory
Memory in which errors have been detected.
@ EfiBootServicesData
The data portions of a loaded Boot Serves Driver, and the default data allocation type used by a Boot...
@ EfiPersistentMemory
A memory region that operates as EfiConventionalMemory, however it happens to also support byte-addre...
@ EfiReservedMemoryType
Not used.
@ EfiBootServicesCode
The code portions of a loaded Boot Services Driver.
@ EfiConventionalMemory
Free (unallocated) memory.
@ EfiLoaderData
The data portions of a loaded application and the default data allocation type used by an application...
@ EfiACPIMemoryNVS
Address space reserved for use by the firmware.
@ EfiMemoryMappedIOPortSpace
System memory-mapped IO region that is used to translate memory cycles to IO cycles by the processor.
@ EfiACPIReclaimMemory
Memory that holds the ACPI tables.
@ EfiLoaderCode
The code portions of a loaded application.
@ EfiMemoryMappedIO
Used by system firmware to request that a memory-mapped IO region be mapped by the OS to a virtual ad...
@ EfiPalCode
Address space reserved by the firmware for code that is part of the processor.
@ EfiRuntimeServicesCode
The code portions of a loaded Runtime Services Driver.
@ EfiRuntimeServicesData
The data portions of a loaded Runtime Services Driver and the default data allocation type used by a ...
EFI_RESET_TYPE
Enumeration of reset types.
@ EfiResetCold
Used to induce a system-wide reset.
@ EfiResetShutdown
Used to induce an entry into a power state equivalent to the ACPI G2/S5 or G3 state.
@ EfiResetWarm
Used to induce a system-wide initialization.
@ EfiResetPlatformSpecific
Used to induce a system-wide reset.
EFI_INTERFACE_TYPE
Enumeration of EFI Interface Types.
VOID(EFIAPI * EFI_EVENT_NOTIFY)(IN EFI_EVENT Event, IN VOID *Context)
Invoke a notification event.
EFI_TIMER_DELAY
Timer delay types.
@ TimerCancel
An event's timer settings is to be cancelled and not trigger time is to be set/.
@ TimerRelative
An event is to be signaled once at a specified interval from the current time.
@ TimerPeriodic
An event is to be signaled periodically at a specified interval from the current time.
EFI_LOCATE_SEARCH_TYPE
Enumeration of EFI Locate Search Types.
EFI_ALLOCATE_TYPE
Enumeration of EFI memory allocation types.
@ AllocateMaxAddress
Allocate any available range of pages whose uppermost address is less than or equal to a specified ma...
@ AllocateAddress
Allocate pages at a specified address.
@ AllocateAnyPages
Allocate any available range of pages that satisfies the request.
#define colour
Colour for debug messages.
struct arbelprm_rc_send_wqe rc
static unsigned int source_size
struct edd_interface_type interface_type
Interface type.
union edd_device_path device_path
Device path.
const char * efi_handle_name(EFI_HANDLE handle)
Get name of an EFI handle.
const char * efi_open_attributes_name(unsigned int attributes)
Name protocol open attributes.
const char * efi_locate_search_type_name(EFI_LOCATE_SEARCH_TYPE search_type)
Name locate search type.
const char * efi_devpath_text(EFI_DEVICE_PATH_PROTOCOL *path)
Get textual representation of device path.
const char * efi_tpl_name(EFI_TPL tpl)
Name EFI TPL.
EFI_GUID efi_loaded_image_protocol_guid
Loaded image protocol GUID.
const char * efi_guid_ntoa(CONST EFI_GUID *guid)
Convert GUID to a printable string.
static EFI_STATUS EFIAPI efi_get_variable_wrapper(CHAR16 *name, EFI_GUID *guid, UINT32 *attrs, UINTN *len, VOID *data)
Wrap GetVariable()
static EFI_STATUS EFIAPI efi_create_event_wrapper(UINT32 type, EFI_TPL notify_tpl, EFI_EVENT_NOTIFY notify_function, VOID *notify_context, EFI_EVENT *event)
Wrap CreateEvent()
static EFI_STATUS EFIAPI efi_start_image_wrapper(EFI_HANDLE image_handle, UINTN *exit_data_size, CHAR16 **exit_data)
Wrap StartImage()
static EFI_STATUS EFIAPI efi_free_pages_wrapper(EFI_PHYSICAL_ADDRESS memory, UINTN pages)
Wrap FreePages()
static EFI_STATUS EFIAPI efi_wait_for_event_wrapper(UINTN number_of_events, EFI_EVENT *event, UINTN *index)
Wrap WaitForEvent()
static EFI_STATUS EFIAPI efi_register_protocol_notify_wrapper(EFI_GUID *protocol, EFI_EVENT event, VOID **registration)
Wrap RegisterProtocolNotify()
static const char * efi_boolean(BOOLEAN boolean)
Convert EFI boolean to text.
static const char * efi_memory_type(EFI_MEMORY_TYPE type)
Convert EFI memory type to text.
static EFI_SYSTEM_TABLE * efi_systab_pub
Public EFI system table pointer.
static EFI_STATUS EFIAPI efi_signal_event_wrapper(EFI_EVENT event)
Wrap SignalEvent()
static EFI_STATUS EFIAPI efi_get_time_wrapper(EFI_TIME *time, EFI_TIME_CAPABILITIES *cap)
Wrap GetTime()
static EFI_STATUS EFIAPI efi_close_protocol_wrapper(EFI_HANDLE handle, EFI_GUID *protocol, EFI_HANDLE agent_handle, EFI_HANDLE controller_handle)
Wrap CloseProtocol()
static EFI_STATUS EFIAPI efi_set_timer_wrapper(EFI_EVENT event, EFI_TIMER_DELAY type, UINT64 trigger_time)
Wrap SetTimer()
static EFI_TPL EFIAPI efi_raise_tpl_wrapper(EFI_TPL new_tpl)
Wrap RaiseTPL()
static const char * efi_allocate_type(EFI_ALLOCATE_TYPE type)
Convert EFI allocation type to text.
static VOID EFIAPI efi_restore_tpl_wrapper(EFI_TPL old_tpl)
Wrap RestoreTPL()
static EFI_STATUS EFIAPI efi_uninstall_protocol_interface_wrapper(EFI_HANDLE handle, EFI_GUID *protocol, VOID *interface)
Wrap UninstallProtocolInterface()
static EFI_BOOT_SERVICES * efi_bs_orig
Original EFI boot services table pointer.
static EFI_STATUS EFIAPI efi_allocate_pool_wrapper(EFI_MEMORY_TYPE pool_type, UINTN size, VOID **buffer)
Wrap AllocatePool()
#define EFI_WRAP_PRESCROLL
Number of lines to prescroll when needed.
static EFI_STATUS EFIAPI efi_close_event_wrapper(EFI_EVENT event)
Wrap CloseEvent()
static EFI_STATUS EFIAPI efi_locate_device_path_wrapper(EFI_GUID *protocol, EFI_DEVICE_PATH_PROTOCOL **device_path, EFI_HANDLE *device)
Wrap LocateDevicePath()
static EFI_STATUS EFIAPI efi_install_protocol_interface_wrapper(EFI_HANDLE *handle, EFI_GUID *protocol, EFI_INTERFACE_TYPE interface_type, VOID *interface)
Wrap InstallProtocolInterface()
static EFI_STATUS EFIAPI efi_get_next_monotonic_count_wrapper(UINT64 *count)
Wrap GetNextMonotonicCount()
#define MAX_WRAP_MULTI
Maximum number of interfaces for wrapped ...MultipleProtocolInterfaces()
static EFI_SYSTEM_TABLE efi_systab_priv
Private EFI system table used while wrapping is active.
static EFI_STATUS EFIAPI efi_set_watchdog_timer_wrapper(UINTN timeout, UINT64 watchdog_code, UINTN data_size, CHAR16 *watchdog_data)
Wrap SetWatchdogTimer()
void efi_wrap_rs(EFI_RUNTIME_SERVICES *wrapper)
Wrap a runtime services table.
static EFI_STATUS EFIAPI efi_open_protocol_information_wrapper(EFI_HANDLE handle, EFI_GUID *protocol, EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **entry_buffer, UINTN *entry_count)
Wrap OpenProtocolInformation()
static const char * efi_time(EFI_TIME *time)
Convert EFI time to text.
static EFI_STATUS EFIAPI efi_connect_controller_wrapper(EFI_HANDLE controller_handle, EFI_HANDLE *driver_image_handle, EFI_DEVICE_PATH_PROTOCOL *remaining_path, BOOLEAN recursive)
Wrap ConnectController()
static const char * efi_timer_delay(EFI_TIMER_DELAY type)
Convert EFI timer delay type to text.
static EFI_STATUS EFIAPI efi_check_event_wrapper(EFI_EVENT event)
Wrap CheckEvent()
static EFI_STATUS EFIAPI efi_stall_wrapper(UINTN microseconds)
Wrap Stall()
void efi_wrap_bs(EFI_BOOT_SERVICES *wrapper)
Wrap a boot services table.
void efi_wrap_systab(int global)
Wrap the public EFI system table.
static EFI_STATUS EFIAPI efi_unload_image_wrapper(EFI_HANDLE image_handle)
Wrap UnloadImage()
static const char * efi_status(EFI_STATUS efirc)
Convert EFI status code to text.
static EFI_STATUS EFIAPI efi_handle_protocol_wrapper(EFI_HANDLE handle, EFI_GUID *protocol, VOID **interface)
Wrap HandleProtocol()
static EFI_STATUS EFIAPI efi_free_pool_wrapper(VOID *buffer)
Wrap FreePool()
void efi_unwrap(void)
Remove boot services table wrapper.
static EFI_STATUS EFIAPI efi_create_event_ex_wrapper(UINT32 type, EFI_TPL notify_tpl, EFI_EVENT_NOTIFY notify_function, CONST VOID *notify_context, CONST EFI_GUID *event_group, EFI_EVENT *event)
Wrap CreateEventEx()
static EFI_STATUS EFIAPI efi_set_wakeup_time_wrapper(BOOLEAN enable, EFI_TIME *time)
Wrap SetWakeupTime()
static EFI_STATUS EFIAPI efi_disconnect_controller_wrapper(EFI_HANDLE controller_handle, EFI_HANDLE driver_image_handle, EFI_HANDLE child_handle)
Wrap DisconnectController()
static EFI_RUNTIME_SERVICES * efi_rs_orig
Original EFI runtime services table pointer.
#define EFI_WRAP_DUMP_MAX
Maximum size for hex dumps.
static EFI_STATUS EFIAPI efi_allocate_pages_wrapper(EFI_ALLOCATE_TYPE type, EFI_MEMORY_TYPE memory_type, UINTN pages, EFI_PHYSICAL_ADDRESS *memory)
Wrap AllocatePages()
static EFI_STATUS EFIAPI efi_set_variable_wrapper(CHAR16 *name, EFI_GUID *guid, UINT32 attrs, UINTN len, VOID *data)
Wrap SetVariable()
static EFI_STATUS EFIAPI efi_locate_handle_wrapper(EFI_LOCATE_SEARCH_TYPE search_type, EFI_GUID *protocol, VOID *search_key, UINTN *buffer_size, EFI_HANDLE *buffer)
Wrap LocateHandle()
static EFI_RUNTIME_SERVICES efi_rs_copy
Backup of original EFI runtime services table.
static void efi_dump_image(EFI_HANDLE handle)
Dump information about a loaded image.
static const char * efi_reset_type(EFI_RESET_TYPE type)
Convert EFI reset type to text.
void efi_wrap_image(EFI_HANDLE handle)
Wrap calls made by a newly loaded image.
static EFI_STATUS EFIAPI efi_set_time_wrapper(EFI_TIME *time)
Wrap SetTime()
static EFI_STATUS EFIAPI efi_get_wakeup_time_wrapper(BOOLEAN *enabled, BOOLEAN *pending, EFI_TIME *time)
Wrap GetWakeupTime()
static EFI_STATUS EFIAPI efi_reinstall_protocol_interface_wrapper(EFI_HANDLE handle, EFI_GUID *protocol, VOID *old_interface, VOID *new_interface)
Wrap ReinstallProtocolInterface()
static EFI_BOOT_SERVICES efi_bs_copy
Backup of original EFI boot services table.
static EFI_STATUS EFIAPI efi_protocols_per_handle_wrapper(EFI_HANDLE handle, EFI_GUID ***protocol_buffer, UINTN *protocol_buffer_count)
Wrap ProtocolsPerHandle()
static VOID EFIAPI efi_reset_system_wrapper(EFI_RESET_TYPE type, EFI_STATUS status, UINTN len, VOID *data)
Wrap ResetSystem()
static EFI_STATUS EFIAPI efi_install_multiple_protocol_interfaces_wrapper(EFI_HANDLE *handle,...)
Wrap InstallMultipleProtocolInterfaces()
static EFI_STATUS EFIAPI efi_get_memory_map_wrapper(UINTN *memory_map_size, EFI_MEMORY_DESCRIPTOR *memory_map, UINTN *map_key, UINTN *descriptor_size, UINT32 *descriptor_version)
Wrap GetMemoryMap()
static EFI_STATUS EFIAPI efi_open_protocol_wrapper(EFI_HANDLE handle, EFI_GUID *protocol, VOID **interface, EFI_HANDLE agent_handle, EFI_HANDLE controller_handle, UINT32 attributes)
Wrap OpenProtocol()
static EFI_STATUS EFIAPI efi_exit_boot_services_wrapper(EFI_HANDLE image_handle, UINTN map_key)
Wrap ExitBootServices()
static EFI_STATUS EFIAPI efi_get_next_variable_name_wrapper(UINTN *len, CHAR16 *name, EFI_GUID *guid)
Wrap GetNextVariableName()
static int efi_prescroll(unsigned int lines)
Pre-scroll display to create space for output lines.
static EFI_STATUS EFIAPI efi_locate_handle_buffer_wrapper(EFI_LOCATE_SEARCH_TYPE search_type, EFI_GUID *protocol, VOID *search_key, UINTN *no_handles, EFI_HANDLE **buffer)
Wrap LocateHandleBuffer()
static EFI_STATUS EFIAPI efi_load_image_wrapper(BOOLEAN boot_policy, EFI_HANDLE parent_image_handle, EFI_DEVICE_PATH_PROTOCOL *device_path, VOID *source_buffer, UINTN source_size, EFI_HANDLE *image_handle)
Wrap LoadImage()
static EFI_STATUS EFIAPI efi_install_configuration_table_wrapper(EFI_GUID *guid, VOID *table)
Wrap InstallConfigurationTable()
static EFI_STATUS EFIAPI efi_uninstall_multiple_protocol_interfaces_wrapper(EFI_HANDLE handle,...)
Wrap UninstallMultipleProtocolInterfaces()
static EFI_STATUS EFIAPI efi_locate_protocol_wrapper(EFI_GUID *protocol, VOID *registration, VOID **interface)
Wrap LocateProtocol()
static EFI_STATUS EFIAPI efi_exit_wrapper(EFI_HANDLE image_handle, EFI_STATUS exit_status, UINTN exit_data_size, CHAR16 *exit_data)
Wrap Exit()
uint32_t type
Operating system type.
uint8_t data[48]
Additional event data.
uint16_t enabled
Single-entry bitmask of the enabled option value.
struct ena_llq_option desc
Descriptor counts.
uint16_t size
Buffer size.
static unsigned int count
Number of entries.
uint32_t buffer
Buffer index (or NETVSC_RNDIS_NO_BUFFER)
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
#define efi_open(handle, protocol, interface)
Open protocol for ephemeral use.
#define DBGC_EFI_PROTOCOLS(...)
EFI_SYSTEM_TABLE * efi_systab
uint32_t pending
Pending events.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
void * memset(void *dest, int character, size_t len) __nonnull
UINT16_t buffer_size
UDP payload buffer size.
uint16_t protocol
Protocol ID.
char * strerror(int errno)
Retrieve string representation of error number.
EFI_ALLOCATE_PAGES AllocatePages
EFI_INSTALL_CONFIGURATION_TABLE InstallConfigurationTable
EFI_RESTORE_TPL RestoreTPL
EFI_IMAGE_START StartImage
EFI_LOCATE_HANDLE LocateHandle
EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation
EFI_CREATE_EVENT CreateEvent
EFI_IMAGE_UNLOAD UnloadImage
EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface
EFI_PROTOCOLS_PER_HANDLE ProtocolsPerHandle
EFI_INSTALL_PROTOCOL_INTERFACE InstallProtocolInterface
EFI_DISCONNECT_CONTROLLER DisconnectController
EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES UninstallMultipleProtocolInterfaces
EFI_LOCATE_PROTOCOL LocateProtocol
EFI_CLOSE_EVENT CloseEvent
EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES InstallMultipleProtocolInterfaces
EFI_CLOSE_PROTOCOL CloseProtocol
EFI_SET_WATCHDOG_TIMER SetWatchdogTimer
EFI_HANDLE_PROTOCOL HandleProtocol
EFI_EXIT_BOOT_SERVICES ExitBootServices
EFI_ALLOCATE_POOL AllocatePool
EFI_LOCATE_DEVICE_PATH LocateDevicePath
EFI_CREATE_EVENT_EX CreateEventEx
EFI_GET_MEMORY_MAP GetMemoryMap
EFI_REGISTER_PROTOCOL_NOTIFY RegisterProtocolNotify
EFI_OPEN_PROTOCOL OpenProtocol
EFI_SIGNAL_EVENT SignalEvent
EFI_WAIT_FOR_EVENT WaitForEvent
EFI_LOCATE_HANDLE_BUFFER LocateHandleBuffer
EFI_CHECK_EVENT CheckEvent
EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount
EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProtocolInterface
EFI_CONNECT_CONTROLLER ConnectController
This protocol can be used on any device handle to obtain generic path/location information concerning...
Can be used on any image handle to obtain information about the loaded image.
EFI_DEVICE_PATH_PROTOCOL * FilePath
A pointer to the file path portion specific to DeviceHandle that the EFI Image was loaded from.
EFI_HANDLE DeviceHandle
The device handle that the EFI Image was loaded from.
EFI_HANDLE ParentHandle
Parent image's image handle.
VOID * ImageBase
The base address at which the image was loaded.
Definition of an EFI memory descriptor.
EFI Oprn Protocol Information Entry.
EFI Runtime Services Table.
EFI_SET_VARIABLE SetVariable
EFI_SET_WAKEUP_TIME SetWakeupTime
EFI_GET_WAKEUP_TIME GetWakeupTime
EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName
EFI_GET_VARIABLE GetVariable
EFI_RESET_SYSTEM ResetSystem
INT32 CursorRow
The cursor's row.
INT32 Mode
The text mode of the output device(s).
This provides the capabilities of the real time clock device as exposed through the EFI interfaces.
EFI Time Abstraction: Year: 1900 - 9999 Month: 1 - 12 Day: 1 - 31 Hour: 0 - 23 Minute: 0 - 59 Second:...
EFI_TEXT_STRING OutputString
EFI_TEXT_SET_CURSOR_POSITION SetCursorPosition
EFI_SIMPLE_TEXT_OUTPUT_MODE * Mode
Pointer to SIMPLE_TEXT_OUTPUT_MODE data.
EFI_TEXT_QUERY_MODE QueryMode
int snprintf(char *buf, size_t size, const char *fmt,...)
Write a formatted string to a buffer.