forked from pool/u-boot
c5a1053428
1 OBS-URL: https://build.opensuse.org/request/show/405463 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/u-boot?expand=0&rev=76
46 lines
1.4 KiB
Diff
46 lines
1.4 KiB
Diff
From 9f23c6ee2d69f89b353483dfa887414dd8c8b73b Mon Sep 17 00:00:00 2001
|
|
From: Alexander Graf <agraf@suse.de>
|
|
Date: Wed, 18 May 2016 00:51:35 +0200
|
|
Subject: [PATCH] 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>
|
|
---
|
|
lib/efi_loader/efi_runtime.c | 16 ++++++++++++++++
|
|
1 file changed, 16 insertions(+)
|
|
|
|
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,
|
|
},
|
|
};
|
|
|