|
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_DUMP_MAX 128 |
| Maximum size for hex dumps. 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... | |
| static EFI_RUNTIME_SERVICES * | efi_rs_orig |
| Original EFI runtime services table pointer. More... | |
| static EFI_RUNTIME_SERVICES | efi_rs_copy |
| Backup of original EFI runtime 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_DUMP_MAX 128 |
Maximum size for hex dumps.
Definition at line 44 of file efi_wrap.c.
| #define EFI_WRAP_PRESCROLL 16 |
Number of lines to prescroll when needed.
Definition at line 47 of file efi_wrap.c.
| #define MAX_WRAP_MULTI 20 |
Maximum number of interfaces for wrapped ...MultipleProtocolInterfaces()
Definition at line 1119 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 73 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_get_next_variable_name_wrapper(), efi_get_time_wrapper(), efi_get_variable_wrapper(), efi_get_wakeup_time_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_reset_system_wrapper(), efi_set_time_wrapper(), efi_set_timer_wrapper(), efi_set_variable_wrapper(), efi_set_wakeup_time_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 127 of file efi_wrap.c.
Referenced by efi_connect_controller_wrapper(), efi_get_wakeup_time_wrapper(), efi_load_image_wrapper(), and efi_set_wakeup_time_wrapper().
|
static |
Convert EFI allocation type to text.
| type | Allocation type |
| text | Allocation type as text |
Definition at line 138 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 157 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 188 of file efi_wrap.c.
References snprintf(), TimerCancel, TimerPeriodic, TimerRelative, and type.
Referenced by efi_set_timer_wrapper().
|
static |
Convert EFI time to text.
| time | Time, or NULL |
| text | Time as text |
Definition at line 207 of file efi_wrap.c.
References EFI_TIME::Day, EFI_TIME::Hour, EFI_TIME::Minute, EFI_TIME::Month, EFI_TIME::Second, snprintf(), and EFI_TIME::Year.
Referenced by efi_get_time_wrapper(), efi_get_wakeup_time_wrapper(), efi_set_time_wrapper(), and efi_set_wakeup_time_wrapper().
|
static |
Convert EFI reset type to text.
| type | Reset type |
| text | Reset type as text |
Definition at line 224 of file efi_wrap.c.
References EfiResetCold, EfiResetPlatformSpecific, EfiResetShutdown, EfiResetWarm, snprintf(), and type.
Referenced by efi_reset_system_wrapper().
|
static |
Pre-scroll display to create space for output lines.
| lines | Number of lines required |
| efirc | EFI status code |
Definition at line 244 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 275 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 304 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 320 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 334 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 356 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 374 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 418 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 438 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 454 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 475 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 495 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 519 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 535 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 550 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 566 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 588 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 610 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 630 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 649 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 668 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 701 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 722 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 739 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 771 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 793 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 817 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 834 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 864 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 881 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBGCP, efi_status(), efi_systab, and EFI_BOOT_SERVICES::Stall.
Referenced by efi_wrap_bs().
|
static |
Wrap SetWatchdogTimer()
Definition at line 899 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 919 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 950 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 973 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 997 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 1020 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 1043 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 1073 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 1104 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 1126 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 1176 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 1226 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().
|
static |
Wrap GetTime()
Definition at line 1249 of file efi_wrap.c.
References colour, DBGCP, efi_status(), efi_systab, efi_time(), EFI_RUNTIME_SERVICES::GetTime, and EFI_SYSTEM_TABLE::RuntimeServices.
Referenced by efi_wrap_rs().
|
static |
Wrap SetTime()
Definition at line 1266 of file efi_wrap.c.
References colour, DBGC, efi_status(), efi_systab, efi_time(), EFI_SYSTEM_TABLE::RuntimeServices, and EFI_RUNTIME_SERVICES::SetTime.
Referenced by efi_wrap_rs().
|
static |
Wrap GetWakeupTime()
Definition at line 1282 of file efi_wrap.c.
References colour, DBGC, efi_boolean(), efi_status(), efi_systab, efi_time(), enabled, EFI_RUNTIME_SERVICES::GetWakeupTime, pending, and EFI_SYSTEM_TABLE::RuntimeServices.
Referenced by efi_wrap_rs().
|
static |
Wrap SetWakeupTime()
Definition at line 1301 of file efi_wrap.c.
References colour, DBGC, efi_boolean(), efi_status(), efi_systab, efi_time(), EFI_SYSTEM_TABLE::RuntimeServices, and EFI_RUNTIME_SERVICES::SetWakeupTime.
Referenced by efi_wrap_rs().
|
static |
Wrap GetVariable()
Definition at line 1318 of file efi_wrap.c.
References colour, data, DBG_EXTRA, DBGC, DBGC2, DBGC2_HD, efi_guid_ntoa(), efi_status(), efi_systab, EFI_WRAP_DUMP_MAX, EFI_RUNTIME_SERVICES::GetVariable, guid, len, name, and EFI_SYSTEM_TABLE::RuntimeServices.
Referenced by efi_wrap_rs().
|
static |
Wrap GetNextVariableName()
Definition at line 1350 of file efi_wrap.c.
References colour, DBGC, efi_guid_ntoa(), efi_status(), efi_systab, EFI_RUNTIME_SERVICES::GetNextVariableName, guid, len, name, and EFI_SYSTEM_TABLE::RuntimeServices.
Referenced by efi_wrap_rs().
|
static |
Wrap SetVariable()
Definition at line 1370 of file efi_wrap.c.
References colour, data, DBGC, DBGC_HD, efi_guid_ntoa(), efi_status(), efi_systab, guid, len, name, EFI_SYSTEM_TABLE::RuntimeServices, and EFI_RUNTIME_SERVICES::SetVariable.
Referenced by efi_wrap_rs().
|
static |
Wrap ResetSystem()
Definition at line 1396 of file efi_wrap.c.
References colour, data, DBGC, efi_reset_type(), efi_status(), efi_systab, len, EFI_RUNTIME_SERVICES::ResetSystem, EFI_SYSTEM_TABLE::RuntimeServices, status, and type.
Referenced by efi_wrap_rs().
| void efi_wrap_bs | ( | EFI_BOOT_SERVICES * | wrapper | ) |
Wrap a boot services table.
| wrapper | Boot services table to wrap |
Definition at line 1412 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_rs | ( | EFI_RUNTIME_SERVICES * | wrapper | ) |
Wrap a runtime services table.
| wrapper | Runtime services table to wrap |
Definition at line 1475 of file efi_wrap.c.
References DBG_LOG, efi_get_next_variable_name_wrapper(), efi_get_time_wrapper(), efi_get_variable_wrapper(), efi_get_wakeup_time_wrapper(), efi_reset_system_wrapper(), efi_set_time_wrapper(), efi_set_variable_wrapper(), efi_set_wakeup_time_wrapper(), efi_systab, EFI_RUNTIME_SERVICES::GetNextVariableName, EFI_RUNTIME_SERVICES::GetTime, EFI_RUNTIME_SERVICES::GetVariable, EFI_RUNTIME_SERVICES::GetWakeupTime, memcpy(), EFI_RUNTIME_SERVICES::ResetSystem, EFI_SYSTEM_TABLE::RuntimeServices, EFI_RUNTIME_SERVICES::SetTime, EFI_RUNTIME_SERVICES::SetVariable, and EFI_RUNTIME_SERVICES::SetWakeupTime.
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 1499 of file efi_wrap.c.
References EFI_SYSTEM_TABLE::BootServices, colour, DBG_LOG, DBGC, efi_bs_copy, efi_bs_orig, efi_rs_copy, efi_rs_orig, efi_systab, efi_systab_priv, efi_systab_pub, efi_wrap_bs(), efi_wrap_rs(), memcpy(), and EFI_SYSTEM_TABLE::RuntimeServices.
Referenced by efi_wrap_image().
| void efi_unwrap | ( | void | ) |
Remove boot services table wrapper.
Definition at line 1542 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_block_exec(), and efi_image_exec().
| void efi_wrap_image | ( | EFI_HANDLE | handle | ) |
Wrap calls made by a newly loaded image.
| handle | Image handle |
Definition at line 1566 of file efi_wrap.c.
References DBG_LOG, efi_dump_image(), efi_wrap_systab(), and handle.
Referenced by efi_block_exec(), and efi_image_exec().
|
static |
Public EFI system table pointer.
Definition at line 50 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 53 of file efi_wrap.c.
Referenced by efi_wrap_systab().
|
static |
Original EFI boot services table pointer.
Definition at line 56 of file efi_wrap.c.
Referenced by efi_unwrap(), and efi_wrap_systab().
|
static |
Backup of original EFI boot services table.
Definition at line 59 of file efi_wrap.c.
Referenced by efi_unwrap(), and efi_wrap_systab().
|
static |
Original EFI runtime services table pointer.
Definition at line 62 of file efi_wrap.c.
Referenced by efi_wrap_systab().
|
static |
Backup of original EFI runtime services table.
Definition at line 65 of file efi_wrap.c.
Referenced by efi_wrap_systab().
1.8.15