|
iPXE
|
EFI image wrapping. More...
#include <string.h>#include <stdio.h>#include <errno.h>#include <ipxe/efi/efi.h>#include <ipxe/efi/Protocol/LoadedImage.h>#include <ipxe/efi/efi_wrap.h>Go to the source code of this file.
Macros | |
| #define | colour &efi_systab |
| Colour for debug messages. More... | |
| #define | EFI_WRAP_PRESCROLL 16 |
| Number of lines to prescroll when needed. More... | |
| #define | MAX_WRAP_MULTI 20 |
| Maximum number of interfaces for wrapped ...MultipleProtocolInterfaces() More... | |
Variables | |
| static EFI_SYSTEM_TABLE * | efi_systab_pub |
| Public EFI system table pointer. More... | |
| static EFI_SYSTEM_TABLE | efi_systab_priv |
| Private EFI system table used while wrapping is active. More... | |
| static EFI_BOOT_SERVICES * | efi_bs_orig |
| Original EFI boot services table pointer. More... | |
| static EFI_BOOT_SERVICES | efi_bs_copy |
| Backup of original EFI boot services table. More... | |
EFI image wrapping.
Definition in file efi_wrap.c.
| #define colour &efi_systab |
Colour for debug messages.
Definition at line 41 of file efi_wrap.c.
| #define EFI_WRAP_PRESCROLL 16 |
Number of lines to prescroll when needed.
Definition at line 44 of file efi_wrap.c.
| #define MAX_WRAP_MULTI 20 |
Maximum number of interfaces for wrapped ...MultipleProtocolInterfaces()
Definition at line 1073 of file efi_wrap.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Convert EFI status code to text.
| efirc | EFI status code |
| text | EFI status code text |
Definition at line 64 of file efi_wrap.c.
References EFI_ABORTED, EFI_ACCESS_DENIED, EFI_ALREADY_STARTED, EFI_BAD_BUFFER_SIZE, EFI_BUFFER_TOO_SMALL, EFI_COMPROMISED_DATA, EFI_CRC_ERROR, EFI_DEVICE_ERROR, EFI_END_OF_FILE, EFI_END_OF_MEDIA, EFI_ICMP_ERROR, EFI_INCOMPATIBLE_VERSION, EFI_INVALID_LANGUAGE, EFI_INVALID_PARAMETER, EFI_LOAD_ERROR, EFI_MEDIA_CHANGED, EFI_NO_MAPPING, EFI_NO_MEDIA, EFI_NO_RESPONSE, EFI_NOT_FOUND, EFI_NOT_READY, EFI_NOT_STARTED, EFI_OUT_OF_RESOURCES, EFI_PROTOCOL_ERROR, EFI_SECURITY_VIOLATION, EFI_SUCCESS, EFI_TFTP_ERROR, EFI_TIMEOUT, EFI_UNSUPPORTED, EFI_VOLUME_CORRUPTED, EFI_VOLUME_FULL, EFI_WARN_BUFFER_TOO_SMALL, EFI_WARN_DELETE_FAILURE, EFI_WARN_STALE_DATA, EFI_WARN_UNKNOWN_GLYPH, EFI_WARN_WRITE_FAILURE, EFI_WRITE_PROTECTED, and snprintf().
Referenced by efi_allocate_pages_wrapper(), efi_allocate_pool_wrapper(), efi_check_event_wrapper(), efi_close_event_wrapper(), efi_close_protocol_wrapper(), efi_connect_controller_wrapper(), efi_create_event_ex_wrapper(), efi_create_event_wrapper(), efi_disconnect_controller_wrapper(), efi_exit_boot_services_wrapper(), efi_exit_wrapper(), efi_free_pages_wrapper(), efi_free_pool_wrapper(), efi_get_memory_map_wrapper(), efi_get_next_monotonic_count_wrapper(), efi_handle_protocol_wrapper(), efi_install_configuration_table_wrapper(), efi_install_multiple_protocol_interfaces_wrapper(), efi_install_protocol_interface_wrapper(), efi_load_image_wrapper(), efi_locate_device_path_wrapper(), efi_locate_handle_buffer_wrapper(), efi_locate_handle_wrapper(), efi_locate_protocol_wrapper(), efi_open_protocol_information_wrapper(), efi_open_protocol_wrapper(), efi_protocols_per_handle_wrapper(), efi_register_protocol_notify_wrapper(), efi_reinstall_protocol_interface_wrapper(), efi_set_timer_wrapper(), efi_set_watchdog_timer_wrapper(), efi_signal_event_wrapper(), efi_stall_wrapper(), efi_start_image_wrapper(), efi_uninstall_multiple_protocol_interfaces_wrapper(), efi_uninstall_protocol_interface_wrapper(), efi_unload_image_wrapper(), and efi_wait_for_event_wrapper().
|
static |
Convert EFI boolean to text.
| boolean | Boolean value |
| text | Boolean value text |
Definition at line 118 of file efi_wrap.c.
Referenced by efi_connect_controller_wrapper(), and efi_load_image_wrapper().
|
static |
Convert EFI allocation type to text.
| type | Allocation type |
| text | Allocation type as text |
Definition at line 129 of file efi_wrap.c.
References AllocateAddress, AllocateAnyPages, AllocateMaxAddress, snprintf(), and type.
Referenced by efi_allocate_pages_wrapper().
|
static |
Convert EFI memory type to text.
| type | Memory type |
| text | Memory type as text |
Definition at line 148 of file efi_wrap.c.
References EfiACPIMemoryNVS, EfiACPIReclaimMemory, EfiBootServicesCode, EfiBootServicesData, EfiConventionalMemory, EfiLoaderCode, EfiLoaderData, EfiMemoryMappedIO, EfiMemoryMappedIOPortSpace, EfiPalCode, EfiPersistentMemory, EfiReservedMemoryType, EfiRuntimeServicesCode, EfiRuntimeServicesData, EfiUnusableMemory, snprintf(), and type.
Referenced by efi_allocate_pages_wrapper(), efi_allocate_pool_wrapper(), and efi_get_memory_map_wrapper().
|
static |
Convert EFI timer delay type to text.
| type | Timer delay type |
| text | Timer delay type as text |
Definition at line 179 of file efi_wrap.c.
References snprintf(), TimerCancel, TimerPeriodic, TimerRelative, and type.
Referenced by efi_set_timer_wrapper().
|
static |
Pre-scroll display to create space for output lines.
| lines | Number of lines required |
| efirc | EFI status code |
Definition at line 198 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::ConOut, EFI_SIMPLE_TEXT_OUTPUT_MODE::CursorRow, efi_systab, EFI_SIMPLE_TEXT_OUTPUT_MODE::Mode, _EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL::Mode, _EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL::OutputString, _EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL::QueryMode, and _EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL::SetCursorPosition.
Referenced by efi_exit_boot_services_wrapper().
|
static |
Dump information about a loaded image.
| handle | Image handle |
Definition at line 229 of file efi_wrap.c.
References colour, DBGC, DBGC_EFI_PROTOCOLS, EFI_LOADED_IMAGE_PROTOCOL::DeviceHandle, efi_devpath_text(), efi_handle_name(), efi_loaded_image_protocol_guid, efi_open, EFI_LOADED_IMAGE_PROTOCOL::FilePath, handle, EFI_LOADED_IMAGE_PROTOCOL::ImageBase, EFI_LOADED_IMAGE_PROTOCOL::ParentHandle, rc, and strerror().
Referenced by efi_load_image_wrapper(), and efi_wrap_image().
Wrap RaiseTPL()
Definition at line 258 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGCP, efi_systab, efi_tpl_name(), and EFI_BOOT_SERVICES::RaiseTPL.
Referenced by efi_wrap_bs().
Wrap RestoreTPL()
Definition at line 274 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGCP, efi_systab, efi_tpl_name(), and EFI_BOOT_SERVICES::RestoreTPL.
Referenced by efi_wrap_bs().
|
static |
Wrap AllocatePages()
Definition at line 288 of file efi_wrap.c.
References EFI_BOOT_SERVICES::AllocatePages, EFI_SYSTEM_TABLE::BootServices, colour, DBGC2, efi_allocate_type(), efi_memory_type(), efi_status(), efi_systab, and type.
Referenced by efi_wrap_bs().
|
static |
Wrap FreePages()
Definition at line 310 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGC2, efi_status(), efi_systab, and EFI_BOOT_SERVICES::FreePages.
Referenced by efi_wrap_bs().
|
static |
Wrap GetMemoryMap()
Definition at line 328 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBG_EXTRA, DBGC, DBGC2, desc, efi_memory_type(), EFI_PAGE_SIZE, efi_status(), efi_systab, and EFI_BOOT_SERVICES::GetMemoryMap.
Referenced by efi_wrap_bs().
|
static |
Wrap AllocatePool()
Definition at line 372 of file efi_wrap.c.
References EFI_BOOT_SERVICES::AllocatePool, EFI_SYSTEM_TABLE::BootServices, buffer, colour, DBGC2, efi_memory_type(), efi_status(), efi_systab, and size.
Referenced by efi_wrap_bs().
|
static |
Wrap FreePool()
Definition at line 392 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, buffer, colour, DBGC2, efi_status(), efi_systab, and EFI_BOOT_SERVICES::FreePool.
Referenced by efi_wrap_bs().
|
static |
Wrap CreateEvent()
Definition at line 408 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, EFI_BOOT_SERVICES::CreateEvent, DBGC, efi_status(), efi_systab, efi_tpl_name(), and type.
Referenced by efi_wrap_bs().
|
static |
Wrap SetTimer()
Definition at line 429 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGC, efi_status(), efi_systab, efi_timer_delay(), EFI_BOOT_SERVICES::SetTimer, and type.
Referenced by efi_wrap_bs().
|
static |
Wrap WaitForEvent()
Definition at line 449 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGC, efi_status(), efi_systab, index, and EFI_BOOT_SERVICES::WaitForEvent.
Referenced by efi_wrap_bs().
|
static |
Wrap SignalEvent()
Definition at line 473 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGC2, efi_status(), efi_systab, and EFI_BOOT_SERVICES::SignalEvent.
Referenced by efi_wrap_bs().
|
static |
Wrap CloseEvent()
Definition at line 489 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, EFI_BOOT_SERVICES::CloseEvent, colour, DBGC, efi_status(), and efi_systab.
Referenced by efi_wrap_bs().
|
static |
Wrap CheckEvent()
Definition at line 504 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, EFI_BOOT_SERVICES::CheckEvent, colour, DBGCP, efi_status(), and efi_systab.
Referenced by efi_wrap_bs().
|
static |
Wrap InstallProtocolInterface()
Definition at line 520 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGC, efi_guid_ntoa(), efi_handle_name(), efi_status(), efi_systab, handle, EFI_BOOT_SERVICES::InstallProtocolInterface, interface_type, and protocol.
Referenced by efi_wrap_bs().
|
static |
Wrap ReinstallProtocolInterface()
Definition at line 542 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGC, efi_guid_ntoa(), efi_handle_name(), efi_status(), efi_systab, handle, protocol, and EFI_BOOT_SERVICES::ReinstallProtocolInterface.
Referenced by efi_wrap_bs().
|
static |
Wrap UninstallProtocolInterface()
Definition at line 564 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGC, efi_guid_ntoa(), efi_handle_name(), efi_status(), efi_systab, handle, protocol, and EFI_BOOT_SERVICES::UninstallProtocolInterface.
Referenced by efi_wrap_bs().
|
static |
Wrap HandleProtocol()
Definition at line 584 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGC, efi_guid_ntoa(), efi_handle_name(), efi_status(), efi_systab, handle, EFI_BOOT_SERVICES::HandleProtocol, and protocol.
Referenced by efi_wrap_bs().
|
static |
Wrap RegisterProtocolNotify()
Definition at line 603 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGC, efi_guid_ntoa(), efi_status(), efi_systab, protocol, and EFI_BOOT_SERVICES::RegisterProtocolNotify.
Referenced by efi_wrap_bs().
|
static |
Wrap LocateHandle()
Definition at line 622 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, buffer, buffer_size, colour, DBGC, efi_guid_ntoa(), efi_handle_name(), efi_locate_search_type_name(), efi_status(), efi_systab, EFI_BOOT_SERVICES::LocateHandle, and protocol.
Referenced by efi_wrap_bs().
|
static |
Wrap LocateDevicePath()
Definition at line 655 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGC, device_path, efi_devpath_text(), efi_guid_ntoa(), efi_handle_name(), efi_status(), efi_systab, EFI_BOOT_SERVICES::LocateDevicePath, and protocol.
Referenced by efi_wrap_bs().
|
static |
Wrap InstallConfigurationTable()
Definition at line 676 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGC, efi_guid_ntoa(), efi_status(), efi_systab, guid, and EFI_BOOT_SERVICES::InstallConfigurationTable.
Referenced by efi_wrap_bs().
|
static |
Wrap LoadImage()
Definition at line 693 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGC, device_path, efi_boolean(), efi_devpath_text(), efi_dump_image(), efi_handle_name(), efi_status(), efi_systab, EFI_BOOT_SERVICES::LoadImage, and source_size.
Referenced by efi_wrap_bs().
|
static |
Wrap StartImage()
Definition at line 725 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGC, DBGC_HD, efi_handle_name(), efi_status(), efi_systab, and EFI_BOOT_SERVICES::StartImage.
Referenced by efi_wrap_bs().
|
static |
Wrap Exit()
Definition at line 747 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGC, DBGC_HD, efi_handle_name(), efi_status(), efi_systab, and EFI_BOOT_SERVICES::Exit.
Referenced by efi_wrap_bs().
|
static |
Wrap UnloadImage()
Definition at line 771 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGC, efi_handle_name(), efi_status(), efi_systab, and EFI_BOOT_SERVICES::UnloadImage.
Referenced by efi_wrap_bs().
|
static |
Wrap ExitBootServices()
Definition at line 788 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGC, efi_handle_name(), efi_prescroll(), efi_status(), efi_systab, EFI_WRAP_PRESCROLL, and EFI_BOOT_SERVICES::ExitBootServices.
Referenced by efi_wrap_bs().
|
static |
Wrap GetNextMonotonicCount()
Definition at line 818 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, count, DBGCP, efi_status(), efi_systab, and EFI_BOOT_SERVICES::GetNextMonotonicCount.
Referenced by efi_wrap_bs().
|
static |
Wrap Stall()
Definition at line 835 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGC2, efi_status(), efi_systab, and EFI_BOOT_SERVICES::Stall.
Referenced by efi_wrap_bs().
|
static |
Wrap SetWatchdogTimer()
Definition at line 853 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGC, efi_status(), efi_systab, EFI_BOOT_SERVICES::SetWatchdogTimer, and timeout().
Referenced by efi_wrap_bs().
|
static |
Wrap ConnectController()
Definition at line 873 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, EFI_BOOT_SERVICES::ConnectController, DBGC, efi_boolean(), efi_devpath_text(), efi_handle_name(), efi_status(), efi_systab, and tmp.
Referenced by efi_wrap_bs().
|
static |
Wrap DisconnectController()
Definition at line 904 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGC, EFI_BOOT_SERVICES::DisconnectController, efi_handle_name(), efi_status(), and efi_systab.
Referenced by efi_wrap_bs().
|
static |
Wrap OpenProtocol()
Definition at line 927 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGC, efi_guid_ntoa(), efi_handle_name(), efi_open_attributes_name(), efi_status(), efi_systab, handle, EFI_BOOT_SERVICES::OpenProtocol, and protocol.
Referenced by efi_wrap_bs().
|
static |
Wrap CloseProtocol()
Definition at line 951 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, EFI_BOOT_SERVICES::CloseProtocol, colour, DBGC, efi_guid_ntoa(), efi_handle_name(), efi_status(), efi_systab, handle, and protocol.
Referenced by efi_wrap_bs().
|
static |
Wrap OpenProtocolInformation()
Definition at line 974 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGC, efi_guid_ntoa(), efi_handle_name(), efi_status(), efi_systab, handle, EFI_BOOT_SERVICES::OpenProtocolInformation, and protocol.
Referenced by efi_wrap_bs().
|
static |
Wrap ProtocolsPerHandle()
Definition at line 997 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGC, efi_guid_ntoa(), efi_handle_name(), efi_status(), efi_systab, handle, and EFI_BOOT_SERVICES::ProtocolsPerHandle.
Referenced by efi_wrap_bs().
|
static |
Wrap LocateHandleBuffer()
Definition at line 1027 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, buffer, colour, DBGC, efi_guid_ntoa(), efi_handle_name(), efi_locate_search_type_name(), efi_status(), efi_systab, EFI_BOOT_SERVICES::LocateHandleBuffer, and protocol.
Referenced by efi_wrap_bs().
|
static |
Wrap LocateProtocol()
Definition at line 1058 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGC, efi_guid_ntoa(), efi_status(), efi_systab, EFI_BOOT_SERVICES::LocateProtocol, and protocol.
Referenced by efi_wrap_bs().
|
static |
Wrap InstallMultipleProtocolInterfaces()
Definition at line 1080 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGC, efi_guid_ntoa(), efi_handle_name(), EFI_OUT_OF_RESOURCES, efi_status(), efi_systab, handle, EFI_BOOT_SERVICES::InstallMultipleProtocolInterfaces, MAX_WRAP_MULTI, memset(), NULL, protocol, va_arg, va_end, va_start, and VOID.
Referenced by efi_wrap_bs().
|
static |
Wrap UninstallMultipleProtocolInterfaces()
Definition at line 1130 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGC, efi_guid_ntoa(), efi_handle_name(), EFI_OUT_OF_RESOURCES, efi_status(), efi_systab, handle, MAX_WRAP_MULTI, memset(), NULL, protocol, EFI_BOOT_SERVICES::UninstallMultipleProtocolInterfaces, va_arg, va_end, va_start, and VOID.
Referenced by efi_wrap_bs().
|
static |
Wrap CreateEventEx()
Definition at line 1180 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, EFI_BOOT_SERVICES::CreateEventEx, DBGC, efi_guid_ntoa(), efi_status(), efi_systab, efi_tpl_name(), and type.
Referenced by efi_wrap_bs().
| void efi_wrap_bs | ( | EFI_BOOT_SERVICES * | wrapper | ) |
Wrap a boot services table.
| wrapper | Boot services table to wrap |
Definition at line 1203 of file efi_wrap.c.
References EFI_BOOT_SERVICES::AllocatePages, EFI_BOOT_SERVICES::AllocatePool, EFI_SYSTEM_TABLE::BootServices, EFI_BOOT_SERVICES::CheckEvent, EFI_BOOT_SERVICES::CloseEvent, EFI_BOOT_SERVICES::CloseProtocol, EFI_BOOT_SERVICES::ConnectController, EFI_BOOT_SERVICES::CreateEvent, EFI_BOOT_SERVICES::CreateEventEx, DBG_LOG, EFI_BOOT_SERVICES::DisconnectController, efi_allocate_pages_wrapper(), efi_allocate_pool_wrapper(), efi_check_event_wrapper(), efi_close_event_wrapper(), efi_close_protocol_wrapper(), efi_connect_controller_wrapper(), efi_create_event_ex_wrapper(), efi_create_event_wrapper(), efi_disconnect_controller_wrapper(), efi_exit_boot_services_wrapper(), efi_exit_wrapper(), efi_free_pages_wrapper(), efi_free_pool_wrapper(), efi_get_memory_map_wrapper(), efi_get_next_monotonic_count_wrapper(), efi_handle_protocol_wrapper(), efi_install_configuration_table_wrapper(), efi_install_multiple_protocol_interfaces_wrapper(), efi_install_protocol_interface_wrapper(), efi_load_image_wrapper(), efi_locate_device_path_wrapper(), efi_locate_handle_buffer_wrapper(), efi_locate_handle_wrapper(), efi_locate_protocol_wrapper(), efi_open_protocol_information_wrapper(), efi_open_protocol_wrapper(), efi_protocols_per_handle_wrapper(), efi_raise_tpl_wrapper(), efi_register_protocol_notify_wrapper(), efi_reinstall_protocol_interface_wrapper(), efi_restore_tpl_wrapper(), efi_set_timer_wrapper(), efi_set_watchdog_timer_wrapper(), efi_signal_event_wrapper(), efi_stall_wrapper(), efi_start_image_wrapper(), efi_systab, efi_uninstall_multiple_protocol_interfaces_wrapper(), efi_uninstall_protocol_interface_wrapper(), efi_unload_image_wrapper(), efi_wait_for_event_wrapper(), EFI_BOOT_SERVICES::Exit, EFI_BOOT_SERVICES::ExitBootServices, EFI_BOOT_SERVICES::FreePages, EFI_BOOT_SERVICES::FreePool, EFI_BOOT_SERVICES::GetMemoryMap, EFI_BOOT_SERVICES::GetNextMonotonicCount, EFI_BOOT_SERVICES::HandleProtocol, EFI_BOOT_SERVICES::InstallConfigurationTable, EFI_BOOT_SERVICES::InstallMultipleProtocolInterfaces, EFI_BOOT_SERVICES::InstallProtocolInterface, EFI_BOOT_SERVICES::LoadImage, EFI_BOOT_SERVICES::LocateDevicePath, EFI_BOOT_SERVICES::LocateHandle, EFI_BOOT_SERVICES::LocateHandleBuffer, EFI_BOOT_SERVICES::LocateProtocol, memcpy(), EFI_BOOT_SERVICES::OpenProtocol, EFI_BOOT_SERVICES::OpenProtocolInformation, EFI_BOOT_SERVICES::ProtocolsPerHandle, EFI_BOOT_SERVICES::RaiseTPL, EFI_BOOT_SERVICES::RegisterProtocolNotify, EFI_BOOT_SERVICES::ReinstallProtocolInterface, EFI_BOOT_SERVICES::RestoreTPL, EFI_BOOT_SERVICES::SetTimer, EFI_BOOT_SERVICES::SetWatchdogTimer, EFI_BOOT_SERVICES::SignalEvent, EFI_BOOT_SERVICES::Stall, EFI_BOOT_SERVICES::StartImage, EFI_BOOT_SERVICES::UninstallMultipleProtocolInterfaces, EFI_BOOT_SERVICES::UninstallProtocolInterface, EFI_BOOT_SERVICES::UnloadImage, and EFI_BOOT_SERVICES::WaitForEvent.
Referenced by efi_wrap_systab().
| void efi_wrap_systab | ( | int | global | ) |
Wrap the public EFI system table.
| global | Patch global boot services table in-place |
Definition at line 1266 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBG_LOG, DBGC, efi_bs_copy, efi_bs_orig, efi_systab, efi_systab_priv, efi_systab_pub, efi_wrap_bs(), and memcpy().
Referenced by efi_wrap_image().
| void efi_unwrap | ( | void | ) |
Remove boot services table wrapper.
Definition at line 1301 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBG_LOG, DBGC, efi_bs_copy, efi_bs_orig, efi_systab, efi_systab_pub, and memcpy().
Referenced by efi_image_exec().
| void efi_wrap_image | ( | EFI_HANDLE | handle | ) |
Wrap calls made by a newly loaded image.
| handle | Image handle |
Definition at line 1325 of file efi_wrap.c.
References DBG_LOG, efi_dump_image(), efi_wrap_systab(), and handle.
Referenced by efi_image_exec().
|
static |
Public EFI system table pointer.
Definition at line 47 of file efi_wrap.c.
Referenced by efi_unwrap(), and efi_wrap_systab().
|
static |
Private EFI system table used while wrapping is active.
Definition at line 50 of file efi_wrap.c.
Referenced by efi_wrap_systab().
|
static |
Original EFI boot services table pointer.
Definition at line 53 of file efi_wrap.c.
Referenced by efi_unwrap(), and efi_wrap_systab().
|
static |
Backup of original EFI boot services table.
Definition at line 56 of file efi_wrap.c.
Referenced by efi_unwrap(), and efi_wrap_systab().
1.8.15