41 #define colour &efi_systab 44 #define EFI_WRAP_DUMP_MAX 128 47 #define EFI_WRAP_PRESCROLL 16 74 static char buf[ 19 ];
115 snprintf ( buf,
sizeof ( buf ),
"%#lx",
116 (
unsigned long ) efirc );
129 return (
boolean ?
"TRUE" :
"FALSE" );
139 static char buf[ 11 ];
158 static char buf[ 11 ];
189 static char buf[ 11 ];
208 static char buf[ 20 ];
212 snprintf ( buf,
sizeof ( buf ),
"%04d-%02d-%02d %02d:%02d:%02d",
225 static char buf[ 11 ];
253 &columns, &rows ) ) != 0 )
260 while ( space++ < lines )
282 DBGC (
colour,
"WRAP %s could not get loaded image protocol: " 288 DBGC (
colour,
"WRAP %s at base %p has protocols:\n",
306 void *retaddr = __builtin_return_address ( 0 );
322 void *retaddr = __builtin_return_address ( 0 );
338 void *retaddr = __builtin_return_address ( 0 );
341 DBGC2 (
colour,
"AllocatePages ( %s, %s, %#llx, %#llx ) ",
343 ( (
unsigned long long ) pages ),
344 ( (
unsigned long long ) *memory ) );
347 ( (
unsigned long long ) *memory ), retaddr );
358 void *retaddr = __builtin_return_address ( 0 );
362 ( (
unsigned long long ) memory ),
363 ( (
unsigned long long ) pages ) );
376 UINTN *descriptor_size,
377 UINT32 *descriptor_version ) {
379 void *retaddr = __builtin_return_address ( 0 );
385 ( (
unsigned long long ) *memory_map_size ), memory_map );
386 efirc = bs->
GetMemoryMap ( memory_map_size, memory_map, map_key,
387 descriptor_size, descriptor_version );
388 DBGC (
colour,
"= %s ( %#llx, %#llx, %#llx, v%d",
390 ( (
unsigned long long ) *memory_map_size ),
391 ( (
unsigned long long ) *map_key ),
392 ( (
unsigned long long ) *descriptor_size ),
393 *descriptor_version );
396 for (
desc = memory_map, remaining = *memory_map_size ;
397 remaining >= *descriptor_size ;
398 desc = ( ( (
void * )
desc ) + *descriptor_size ),
399 remaining -= *descriptor_size ) {
401 "%s\n",
desc->PhysicalStart,
421 void *retaddr = __builtin_return_address ( 0 );
426 ( (
unsigned long long )
size ) );
440 void *retaddr = __builtin_return_address ( 0 );
458 void *retaddr = __builtin_return_address ( 0 );
462 efi_tpl_name ( notify_tpl ), notify_function, notify_context );
464 notify_context, event );
478 void *retaddr = __builtin_return_address ( 0 );
481 DBGC (
colour,
"SetTimer ( %p, %s, %ld.%07ld00s ) ",
483 ( (
unsigned long ) ( trigger_time / 10000000 ) ),
484 ( (
unsigned long ) ( trigger_time % 10000000 ) ) );
498 void *retaddr = __builtin_return_address ( 0 );
503 for ( i = 0 ; i < number_of_events ; i++ )
521 void *retaddr = __builtin_return_address ( 0 );
537 void *retaddr = __builtin_return_address ( 0 );
552 void *retaddr = __builtin_return_address ( 0 );
570 void *retaddr = __builtin_return_address ( 0 );
573 DBGC (
colour,
"InstallProtocolInterface ( %s, %s, %d, %p ) ",
591 VOID *new_interface ) {
593 void *retaddr = __builtin_return_address ( 0 );
596 DBGC (
colour,
"ReinstallProtocolInterface ( %s, %s, %p, %p ) ",
598 old_interface, new_interface );
600 old_interface, new_interface );
614 void *retaddr = __builtin_return_address ( 0 );
617 DBGC (
colour,
"UninstallProtocolInterface ( %s, %s, %p ) ",
633 void *retaddr = __builtin_return_address ( 0 );
650 VOID **registration ) {
652 void *retaddr = __builtin_return_address ( 0 );
655 DBGC (
colour,
"RegisterProtocolNotify ( %s, %p ) ",
659 efi_status ( efirc ), *registration, retaddr );
672 void *retaddr = __builtin_return_address ( 0 );
676 DBGC (
colour,
"LocateHandle ( %s, %s, %p, %zd ) ",
705 void *retaddr = __builtin_return_address ( 0 );
708 DBGC (
colour,
"LocateDevicePath ( %s, %s ) ",
724 void *retaddr = __builtin_return_address ( 0 );
727 DBGC (
colour,
"InstallConfigurationTable ( %s, %p ) ",
744 void *retaddr = __builtin_return_address ( 0 );
774 void *retaddr = __builtin_return_address ( 0 );
778 efirc = bs->
StartImage ( image_handle, exit_data_size, exit_data );
780 if ( ( efirc != 0 ) && exit_data && *exit_data_size )
783 if ( ( efirc != 0 ) && exit_data && *exit_data_size )
796 void *retaddr = __builtin_return_address ( 0 );
799 if ( ( exit_status != 0 ) && exit_data && exit_data_size )
803 if ( ( exit_status != 0 ) && exit_data && exit_data_size )
806 efirc = bs->
Exit ( image_handle, exit_status, exit_data_size,
819 void *retaddr = __builtin_return_address ( 0 );
836 void *retaddr = __builtin_return_address ( 0 );
839 DBGC (
colour,
"ExitBootServices ( %s, %#llx ) -> %p\n",
841 ( (
unsigned long long ) map_key ), retaddr );
844 DBGC (
colour,
"ExitBootServices ( ... ) = %s -> %p\n",
866 void *retaddr = __builtin_return_address ( 0 );
883 void *retaddr = __builtin_return_address ( 0 );
887 ( (
unsigned long ) ( microseconds / 1000000 ) ),
888 ( (
unsigned long ) ( microseconds % 1000000 ) ) );
889 efirc = bs->
Stall ( microseconds );
902 void *retaddr = __builtin_return_address ( 0 );
905 DBGC (
colour,
"SetWatchdogTimer ( %lds, %#llx, %#llx, %p ) ",
906 ( (
unsigned long )
timeout ), watchdog_code,
907 ( (
unsigned long long ) data_size ), watchdog_data );
924 void *retaddr = __builtin_return_address ( 0 );
930 if ( driver_image_handle ) {
931 for (
tmp = driver_image_handle ; *
tmp ;
tmp++ ) {
933 ( (
tmp == driver_image_handle ) ?
" " :
", " ),
940 remaining_path, recursive );
954 void *retaddr = __builtin_return_address ( 0 );
977 void *retaddr = __builtin_return_address ( 0 );
986 controller_handle, attributes );
1001 void *retaddr = __builtin_return_address ( 0 );
1009 controller_handle );
1023 UINTN *entry_count ) {
1025 void *retaddr = __builtin_return_address ( 0 );
1028 DBGC (
colour,
"OpenProtocolInformation ( %s, %s ) ",
1034 ( (
unsigned long long ) *entry_count ), retaddr );
1045 UINTN *protocol_buffer_count ) {
1047 void *retaddr = __builtin_return_address ( 0 );
1054 protocol_buffer_count );
1058 for ( i = 0 ; i < *protocol_buffer_count ; i++ ) {
1077 void *retaddr = __builtin_return_address ( 0 );
1081 DBGC (
colour,
"LocateHandleBuffer ( %s, %s, %p ) ",
1088 DBGC (
colour,
" ( %d, {", ( (
unsigned int ) *no_handles ) );
1089 for ( i = 0 ; i < *no_handles ; i++ ) {
1107 void *retaddr = __builtin_return_address ( 0 );
1119 #define MAX_WRAP_MULTI 20 1128 void *retaddr = __builtin_return_address ( 0 );
1135 DBGC (
colour,
"InstallMultipleProtocolInterfaces ( %s",
1144 DBGC (
colour,
"<FATAL: too many arguments> ) = %s " 1178 void *retaddr = __builtin_return_address ( 0 );
1185 DBGC (
colour,
"UninstallMultipleProtocolInterfaces ( %s",
1194 DBGC (
colour,
"<FATAL: too many arguments> ) = %s " 1231 void *retaddr = __builtin_return_address ( 0 );
1234 DBGC (
colour,
"CreateEventEx ( %#x, %s, %p, %p, %s ) ",
1238 notify_context, event_group, event );
1251 void *retaddr = __builtin_return_address ( 0 );
1255 efirc = rs->
GetTime ( time, cap );
1268 void *retaddr = __builtin_return_address ( 0 );
1285 void *retaddr = __builtin_return_address ( 0 );
1303 void *retaddr = __builtin_return_address ( 0 );
1321 void *retaddr = __builtin_return_address ( 0 );
1325 DBGC (
colour,
"GetVariable ( %s:%ls, %#llx ) ",
1336 if ( dumplen != *
len )
1353 void *retaddr = __builtin_return_address ( 0 );
1356 DBGC (
colour,
"GetNextVariableName ( %#llx, %s:%ls ) ",
1373 void *retaddr = __builtin_return_address ( 0 );
1376 DBGC (
colour,
"SetVariable ( %s:%ls, %#02x",
1384 ( (
unsigned long long )
len ),
data );
1399 void *retaddr = __builtin_return_address ( 0 );
1401 DBGC (
colour,
"ResetSystem ( %s, %s, %#llx, %p ) -> %p\n",
1403 ( (
unsigned long long )
len ),
data, retaddr );
1420 memcpy ( wrapper, bs,
sizeof ( *wrapper ) );
1483 memcpy ( wrapper, rs,
sizeof ( *wrapper ) );
1534 DBGC (
colour,
"WRAP installed %s wrappers\n",
1535 ( global ?
"global" :
"local" ) );
1558 DBGC (
colour,
"WRAP uninstalled wrappers\n" );
static EFI_STATUS EFIAPI efi_set_wakeup_time_wrapper(BOOLEAN enable, EFI_TIME *time)
Wrap SetWakeupTime()
union edd_device_path device_path
Device path.
void efi_wrap_bs(EFI_BOOT_SERVICES *wrapper)
Wrap a boot services table.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
static const char * efi_boolean(BOOLEAN boolean)
Convert EFI boolean to text.
EFI_BOOT_SERVICES * BootServices
A pointer to the EFI Boot Services Table.
#define EFI_UNSUPPORTED
Enumeration of EFI_STATUS.
#define EFI_VOLUME_CORRUPTED
Enumeration of EFI_STATUS.
static EFI_BOOT_SERVICES efi_bs_copy
Backup of original EFI boot services table.
static EFI_STATUS EFIAPI efi_set_timer_wrapper(EFI_EVENT event, EFI_TIMER_DELAY type, UINT64 trigger_time)
Wrap SetTimer()
static VOID EFIAPI efi_restore_tpl_wrapper(EFI_TPL old_tpl)
Wrap RestoreTPL()
struct arbelprm_rc_send_wqe rc
EFI_SET_WATCHDOG_TIMER SetWatchdogTimer
#define EFI_WARN_BUFFER_TOO_SMALL
Enumeration of EFI_STATUS.
#define EFI_ICMP_ERROR
Enumeration of EFI_STATUS.
EFI_GET_WAKEUP_TIME GetWakeupTime
EFI Oprn Protocol Information Entry.
#define EFI_WRAP_DUMP_MAX
Maximum size for hex dumps.
#define EFI_NO_RESPONSE
Enumeration of EFI_STATUS.
EFI_TEXT_SET_CURSOR_POSITION SetCursorPosition
An event is to be signaled periodically at a specified interval from the current time.
#define VA_END(Marker)
Terminates the use of a variable argument list.
#define EFI_ALREADY_STARTED
Enumeration of EFI_STATUS.
static const char * efi_status(EFI_STATUS efirc)
Convert EFI status code to text.
static EFI_STATUS EFIAPI efi_set_time_wrapper(EFI_TIME *time)
Wrap SetTime()
EFI_LOCATE_PROTOCOL LocateProtocol
An event is to be signaled once at a specified interval from the current time.
static EFI_STATUS EFIAPI efi_reinstall_protocol_interface_wrapper(EFI_HANDLE handle, EFI_GUID *protocol, VOID *old_interface, VOID *new_interface)
Wrap ReinstallProtocolInterface()
Definition of an EFI memory descriptor.
#define EFI_CRC_ERROR
Enumeration of EFI_STATUS.
128 bit buffer containing a unique identifier value.
#define EFI_BAD_BUFFER_SIZE
Enumeration of EFI_STATUS.
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_STATUS EFIAPI efi_register_protocol_notify_wrapper(EFI_GUID *protocol, EFI_EVENT event, VOID **registration)
Wrap RegisterProtocolNotify()
#define DBGC_EFI_PROTOCOLS(...)
EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface
EFI_EXIT_BOOT_SERVICES ExitBootServices
EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProtocolInterface
EFI_RESET_TYPE
Enumeration of reset types.
uint32_t type
Operating system type.
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_protocols_per_handle_wrapper(EFI_HANDLE handle, EFI_GUID ***protocol_buffer, UINTN *protocol_buffer_count)
Wrap ProtocolsPerHandle()
uint16_t size
Buffer size.
#define EFI_PROTOCOL_ERROR
Enumeration of EFI_STATUS.
EFI_GUID efi_loaded_image_protocol_guid
Loaded image protocol GUID.
EFI_DEVICE_PATH_PROTOCOL * FilePath
A pointer to the file path portion specific to DeviceHandle that the EFI Image was loaded from.
A memory region that operates as EfiConventionalMemory, however it happens to also support byte-addre...
static EFI_STATUS EFIAPI efi_get_wakeup_time_wrapper(BOOLEAN *enabled, BOOLEAN *pending, EFI_TIME *time)
Wrap GetWakeupTime()
static EFI_STATUS EFIAPI efi_handle_protocol_wrapper(EFI_HANDLE handle, EFI_GUID *protocol, VOID **interface)
Wrap HandleProtocol()
EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES InstallMultipleProtocolInterfaces
static EFI_STATUS EFIAPI efi_install_configuration_table_wrapper(EFI_GUID *guid, VOID *table)
Wrap InstallConfigurationTable()
EFI_CLOSE_EVENT CloseEvent
static void efi_dump_image(EFI_HANDLE handle)
Dump information about a loaded image.
static EFI_STATUS EFIAPI efi_signal_event_wrapper(EFI_EVENT event)
Wrap SignalEvent()
uint32_t buffer
Buffer index (or NETVSC_RNDIS_NO_BUFFER)
EFI_LOCATE_HANDLE LocateHandle
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()
EFI_IMAGE_UNLOAD UnloadImage
VOID * ImageBase
The base address at which the image was loaded.
This protocol can be used on any device handle to obtain generic path/location information concerning...
#define EFI_BUFFER_TOO_SMALL
Enumeration of EFI_STATUS.
VOID(EFIAPI * EFI_EVENT_NOTIFY)(IN EFI_EVENT Event, IN VOID *Context)
Invoke a notification event.
static EFI_STATUS EFIAPI efi_get_next_monotonic_count_wrapper(UINT64 *count)
Wrap GetNextMonotonicCount()
EFI_CLOSE_PROTOCOL CloseProtocol
EFI_CREATE_EVENT_EX CreateEventEx
UINT64 EFI_PHYSICAL_ADDRESS
64-bit physical memory address.
uint16_t enabled
Single-entry bitmask of the enabled option value.
#define EFI_NO_MEDIA
Enumeration of EFI_STATUS.
#define EFI_OUT_OF_RESOURCES
Enumeration of EFI_STATUS.
static EFI_STATUS EFIAPI efi_get_time_wrapper(EFI_TIME *time, EFI_TIME_CAPABILITIES *cap)
Wrap GetTime()
The SIMPLE_TEXT_OUTPUT protocol is used to control text-based output devices.
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()
Used to induce a system-wide reset.
uint32_t pending
Pending events.
#define EFI_DEVICE_ERROR
Enumeration of EFI_STATUS.
UEFI 2.0 Loaded image protocol definition.
The code portions of a loaded application.
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()
#define EFI_LOAD_ERROR
Enumeration of EFI_STATUS.
struct ena_llq_option desc
Descriptor counts.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
void efi_wrap_systab(int global)
Wrap the public EFI system table.
An event's timer settings is to be cancelled and not trigger time is to be set/.
Can be used on any image handle to obtain information about the loaded image.
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * ConOut
A pointer to the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL interface that is associated with ConsoleOutHandle.
Used to induce a system-wide reset.
Used to induce a system-wide initialization.
#define EFI_VOLUME_FULL
Enumeration of EFI_STATUS.
EFI_MEMORY_TYPE
Enumeration of memory types introduced in UEFI.
#define EFI_ACCESS_DENIED
Enumeration of EFI_STATUS.
static EFI_RUNTIME_SERVICES efi_rs_copy
Backup of original EFI runtime services table.
Address space reserved by the firmware for code that is part of the processor.
Used by system firmware to request that a memory-mapped IO region be mapped by the OS to a virtual ad...
#define EFI_COMPROMISED_DATA
Enumeration of EFI_STATUS.
static EFI_STATUS EFIAPI efi_set_variable_wrapper(CHAR16 *name, EFI_GUID *guid, UINT32 attrs, UINTN len, VOID *data)
Wrap SetVariable()
EFI_SET_VARIABLE SetVariable
Allocate pages at a specified address.
EFI_INSTALL_PROTOCOL_INTERFACE InstallProtocolInterface
EFI_CREATE_EVENT CreateEvent
#define VA_ARG(Marker, TYPE)
Returns an argument of a specified type from a variable argument list and updates the pointer to the ...
static unsigned int count
Number of entries.
const char * efi_locate_search_type_name(EFI_LOCATE_SEARCH_TYPE search_type)
Name locate search type.
EFI_HANDLE_PROTOCOL HandleProtocol
EFI_REGISTER_PROTOCOL_NOTIFY RegisterProtocolNotify
Memory that holds the ACPI tables.
void efi_wrap_rs(EFI_RUNTIME_SERVICES *wrapper)
Wrap a runtime services table.
EFI_GET_VARIABLE GetVariable
INT32 Mode
The text mode of the output device(s).
const char * efi_devpath_text(EFI_DEVICE_PATH_PROTOCOL *path)
Get textual representation of device path.
EFI_SIMPLE_TEXT_OUTPUT_MODE * Mode
Pointer to SIMPLE_TEXT_OUTPUT_MODE data.
static EFI_SYSTEM_TABLE efi_systab_priv
Private EFI system table used while wrapping is active.
static EFI_STATUS EFIAPI efi_free_pages_wrapper(EFI_PHYSICAL_ADDRESS memory, UINTN pages)
Wrap FreePages()
The code portions of a loaded Boot Services Driver.
#define EFI_NOT_STARTED
Enumeration of EFI_STATUS.
const char * efi_handle_name(EFI_HANDLE handle)
Get name of an EFI handle.
static EFI_STATUS EFIAPI efi_start_image_wrapper(EFI_HANDLE image_handle, UINTN *exit_data_size, CHAR16 **exit_data)
Wrap StartImage()
EFI_SIGNAL_EVENT SignalEvent
#define EFI_WRITE_PROTECTED
Enumeration of EFI_STATUS.
Free (unallocated) memory.
EFI Runtime Services Table.
EFI_RESET_SYSTEM ResetSystem
Allocate any available range of pages whose uppermost address is less than or equal to a specified ma...
char * strerror(int errno)
Retrieve string representation of error number.
static EFI_STATUS EFIAPI efi_set_watchdog_timer_wrapper(UINTN timeout, UINT64 watchdog_code, UINTN data_size, CHAR16 *watchdog_data)
Wrap SetWatchdogTimer()
EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount
static EFI_STATUS EFIAPI efi_install_protocol_interface_wrapper(EFI_HANDLE *handle, EFI_GUID *protocol, EFI_INTERFACE_TYPE interface_type, VOID *interface)
Wrap InstallProtocolInterface()
Used to induce an entry into a power state equivalent to the ACPI G2/S5 or G3 state.
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 EFI_STATUS EFIAPI efi_wait_for_event_wrapper(UINTN number_of_events, EFI_EVENT *event, UINTN *index)
Wrap WaitForEvent()
static EFI_BOOT_SERVICES * efi_bs_orig
Original EFI boot services table pointer.
EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES UninstallMultipleProtocolInterfaces
EFI_CONNECT_CONTROLLER ConnectController
#define efi_open(handle, protocol, interface)
Open protocol for ephemeral use.
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 EFI_STATUS EFIAPI efi_locate_protocol_wrapper(EFI_GUID *protocol, VOID *registration, VOID **interface)
Wrap LocateProtocol()
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()
EFI_IMAGE_START StartImage
UINT64 UINTN
Unsigned value of native width.
#define VA_START(Marker, Parameter)
Retrieves a pointer to the beginning of a variable argument list, based on the name of the parameter ...
#define EFI_NOT_READY
Enumeration of EFI_STATUS.
static EFI_TPL EFIAPI efi_raise_tpl_wrapper(EFI_TPL new_tpl)
Wrap RaiseTPL()
static EFI_STATUS EFIAPI efi_install_multiple_protocol_interfaces_wrapper(EFI_HANDLE *handle,...)
Wrap InstallMultipleProtocolInterfaces()
#define EFI_INVALID_PARAMETER
Enumeration of EFI_STATUS.
#define EFI_END_OF_FILE
Enumeration of EFI_STATUS.
static EFI_STATUS EFIAPI efi_unload_image_wrapper(EFI_HANDLE image_handle)
Wrap UnloadImage()
const char * efi_guid_ntoa(CONST EFI_GUID *guid)
Convert GUID to a printable string.
#define VOID
Undeclared type.
unsigned long long UINT64
System memory-mapped IO region that is used to translate memory cycles to IO cycles by the processor.
EFI_WAIT_FOR_EVENT WaitForEvent
void efi_wrap_image(EFI_HANDLE handle)
Wrap calls made by a newly loaded image.
#define EFI_INVALID_LANGUAGE
Enumeration of EFI_STATUS.
#define EFI_WARN_STALE_DATA
Enumeration of EFI_STATUS.
EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation
#define EFI_WARN_DELETE_FAILURE
Enumeration of EFI_STATUS.
EFI Time Abstraction: Year: 1900 - 9999 Month: 1 - 12 Day: 1 - 31 Hour: 0 - 23 Minute: 0 - 59 Second:...
static EFI_STATUS EFIAPI efi_uninstall_protocol_interface_wrapper(EFI_HANDLE handle, EFI_GUID *protocol, VOID *interface)
Wrap UninstallProtocolInterface()
#define EFI_SECURITY_VIOLATION
Enumeration of EFI_STATUS.
static const char * efi_time(EFI_TIME *time)
Convert EFI time to text.
EFI_ALLOCATE_TYPE
Enumeration of EFI memory allocation types.
struct edd_interface_type interface_type
Interface type.
#define EFI_MEDIA_CHANGED
Enumeration of EFI_STATUS.
EFI_GET_MEMORY_MAP GetMemoryMap
EFI_ALLOCATE_PAGES AllocatePages
static EFI_STATUS EFIAPI efi_allocate_pool_wrapper(EFI_MEMORY_TYPE pool_type, UINTN size, VOID **buffer)
Wrap AllocatePool()
EFI_SET_WAKEUP_TIME SetWakeupTime
EFI_RUNTIME_SERVICES * RuntimeServices
A pointer to the EFI Runtime Services Table.
The data portions of a loaded Runtime Services Driver and the default data allocation type used by a ...
static unsigned int source_size
#define EFI_NOT_FOUND
Enumeration of EFI_STATUS.
UINTN EFI_TPL
Task priority level.
EFI_PROTOCOLS_PER_HANDLE ProtocolsPerHandle
EFI_TEXT_QUERY_MODE QueryMode
#define CONST
Datum is read-only.
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()
#define EFI_INCOMPATIBLE_VERSION
Enumeration of EFI_STATUS.
#define EFI_SUCCESS
Enumeration of EFI_STATUS.
#define EFI_WARN_UNKNOWN_GLYPH
Enumeration of EFI_STATUS.
EFI_TIMER_DELAY
Timer delay types.
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()
#define EFI_NO_MAPPING
Enumeration of EFI_STATUS.
EFI_CHECK_EVENT CheckEvent
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName
The code portions of a loaded Runtime Services Driver.
static EFI_RUNTIME_SERVICES * efi_rs_orig
Original EFI runtime services table pointer.
static EFI_STATUS EFIAPI efi_close_event_wrapper(EFI_EVENT event)
Wrap CloseEvent()
Allocate any available range of pages that satisfies the request.
static VOID EFIAPI efi_reset_system_wrapper(EFI_RESET_TYPE type, EFI_STATUS status, UINTN len, VOID *data)
Wrap ResetSystem()
uint8_t data[48]
Additional event data.
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 const char * efi_timer_delay(EFI_TIMER_DELAY type)
Convert EFI timer delay type to text.
const char * efi_open_attributes_name(unsigned int attributes)
Name protocol open attributes.
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_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_exit_boot_services_wrapper(EFI_HANDLE image_handle, UINTN map_key)
Wrap ExitBootServices()
int snprintf(char *buf, size_t size, const char *fmt,...)
Write a formatted string to a buffer.
static EFI_STATUS EFIAPI efi_get_variable_wrapper(CHAR16 *name, EFI_GUID *guid, UINT32 *attrs, UINTN *len, VOID *data)
Wrap GetVariable()
EFI_SYSTEM_TABLE * efi_systab
EFI_OPEN_PROTOCOL OpenProtocol
static EFI_STATUS EFIAPI efi_exit_wrapper(EFI_HANDLE image_handle, EFI_STATUS exit_status, UINTN exit_data_size, CHAR16 *exit_data)
Wrap Exit()
uint16_t protocol
Protocol ID.
EFI_LOCATE_SEARCH_TYPE
Enumeration of EFI Locate Search Types.
Address space reserved for use by the firmware.
EFI_INTERFACE_TYPE
Enumeration of EFI Interface Types.
static int efi_prescroll(unsigned int lines)
Pre-scroll display to create space for output lines.
EFI_RESTORE_TPL RestoreTPL
The data portions of a loaded Boot Serves Driver, and the default data allocation type used by a Boot...
static const char * efi_allocate_type(EFI_ALLOCATE_TYPE type)
Convert EFI allocation type to text.
static EFI_STATUS EFIAPI efi_stall_wrapper(UINTN microseconds)
Wrap Stall()
INT32 CursorRow
The cursor's row.
static EFI_STATUS EFIAPI efi_uninstall_multiple_protocol_interfaces_wrapper(EFI_HANDLE handle,...)
Wrap UninstallMultipleProtocolInterfaces()
#define EFI_WARN_WRITE_FAILURE
Enumeration of EFI_STATUS.
#define EFI_END_OF_MEDIA
Enumeration of EFI_STATUS.
static EFI_STATUS EFIAPI efi_check_event_wrapper(EFI_EVENT event)
Wrap CheckEvent()
#define EFI_ABORTED
Enumeration of EFI_STATUS.
#define colour
Colour for debug messages.
EFI_TEXT_STRING OutputString
void efi_unwrap(void)
Remove boot services table wrapper.
#define EFI_TFTP_ERROR
Enumeration of EFI_STATUS.
static EFI_SYSTEM_TABLE * efi_systab_pub
Public EFI system table pointer.
static const char * efi_memory_type(EFI_MEMORY_TYPE type)
Convert EFI memory type to text.
#define EFI_WRAP_PRESCROLL
Number of lines to prescroll when needed.
#define NULL
NULL pointer (VOID *)
UINT16_t buffer_size
UDP payload buffer size.
#define MAX_WRAP_MULTI
Maximum number of interfaces for wrapped ...MultipleProtocolInterfaces()
static EFI_STATUS EFIAPI efi_get_next_variable_name_wrapper(UINTN *len, CHAR16 *name, EFI_GUID *guid)
Wrap GetNextVariableName()
EFI_HANDLE ParentHandle
Parent image's image handle.
CHAR8 * VA_LIST
Variable used to traverse the list of arguments.
The data portions of a loaded application and the default data allocation type used by an application...
EFI_LOCATE_HANDLE_BUFFER LocateHandleBuffer
static const char * efi_reset_type(EFI_RESET_TYPE type)
Convert EFI reset type to text.
EFI_INSTALL_CONFIGURATION_TABLE InstallConfigurationTable
EFI_LOCATE_DEVICE_PATH LocateDevicePath
#define EFI_TIMEOUT
Enumeration of EFI_STATUS.
EFI_HANDLE DeviceHandle
The device handle that the EFI Image was loaded from.
const char * efi_tpl_name(EFI_TPL tpl)
Name EFI TPL.
Memory in which errors have been detected.
static EFI_STATUS EFIAPI efi_free_pool_wrapper(VOID *buffer)
Wrap FreePool()
EFI_ALLOCATE_POOL AllocatePool
void * memset(void *dest, int character, size_t len) __nonnull
This provides the capabilities of the real time clock device as exposed through the EFI interfaces.
EFI_DISCONNECT_CONTROLLER DisconnectController