diff options
-rw-r--r-- | include/efi_loader.h | 2 | ||||
-rw-r--r-- | lib/efi_loader/efi_boottime.c | 3 | ||||
-rw-r--r-- | lib/efi_loader/efi_runtime.c | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/include/efi_loader.h b/include/efi_loader.h index 8d75dde569..db4763fc9b 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -333,6 +333,8 @@ void efi_variables_boot_exit_notify(void); efi_status_t efi_root_node_register(void); /* Called by bootefi to initialize runtime */ efi_status_t efi_initialize_system_table(void); +/* efi_runtime_detach() - detach unimplemented runtime functions */ +void efi_runtime_detach(void); /* Called by bootefi to make console interface available */ efi_status_t efi_console_register(void); /* Called by bootefi to make all disk storage accessible as EFI objects */ diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index ba4c1e5765..c2f89805c7 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -1973,6 +1973,9 @@ static efi_status_t EFIAPI efi_exit_boot_services(efi_handle_t image_handle, board_quiesce_devices(); + /* Patch out unsupported runtime function */ + efi_runtime_detach(); + /* Fix up caches for EFI payloads if necessary */ efi_exit_caches(); diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c index dcbe824451..7a64dd42ca 100644 --- a/lib/efi_loader/efi_runtime.c +++ b/lib/efi_loader/efi_runtime.c @@ -398,7 +398,7 @@ static bool efi_is_runtime_service_pointer(void *p) /** * efi_runtime_detach() - detach unimplemented runtime functions */ -static __efi_runtime void efi_runtime_detach(void) +void efi_runtime_detach(void) { efi_runtime_services.reset_system = efi_reset_system; efi_runtime_services.get_time = efi_get_time; |