summaryrefslogtreecommitdiff
path: root/lib/efi_loader
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2016-05-17 22:54:47 (GMT)
committerTom Rini <trini@konsulko.com>2016-05-27 19:39:56 (GMT)
commitae87440578369456b55e54125e101d27c332bc5a (patch)
treedcb30269c22f8c2ea3ad1e63b8b20fd04ba5a565 /lib/efi_loader
parent81974f4479d19c441c4a089aedd238c251626b3e (diff)
downloadu-boot-ae87440578369456b55e54125e101d27c332bc5a.tar.xz
efi_loader: Clean up system table on exit
We put the system table into our runtime services data section so that payloads may still access it after exit_boot_services. However, most fields in it are quite useless once we're in that state, so let's just patch them out. With this patch we don't get spurious warnings when running EFI binaries anymore. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'lib/efi_loader')
-rw-r--r--lib/efi_loader/efi_runtime.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c
index 3ee27ca..11d0126 100644
--- a/lib/efi_loader/efi_runtime.c
+++ b/lib/efi_loader/efi_runtime.c
@@ -125,6 +125,22 @@ static const struct efi_runtime_detach_list_struct efi_runtime_detach_list[] = {
/* RTC accessors are gone */
.ptr = &efi_runtime_services.get_time,
.patchto = &efi_device_error,
+ }, {
+ /* Clean up system table */
+ .ptr = &systab.con_in,
+ .patchto = NULL,
+ }, {
+ /* Clean up system table */
+ .ptr = &systab.con_out,
+ .patchto = NULL,
+ }, {
+ /* Clean up system table */
+ .ptr = &systab.std_err,
+ .patchto = NULL,
+ }, {
+ /* Clean up system table */
+ .ptr = &systab.boottime,
+ .patchto = NULL,
},
};