lkml.org 
[lkml]   [2023]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] efi: libstub: Fix the retriving of supported rutime services
Date
If retrieving UEFI configuration table is failed, the supported runtime
services mask should be regarded as 0 instead of EFI_RT_SUPPORTED_ALL.
Otherwise efi_novamap might be incorrectly assigned to "false" on the
Ampere Emag server.

Signed-off-by: Jia He <justin.he@arm.com>
---
drivers/firmware/efi/libstub/efi-stub.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/firmware/efi/libstub/efi-stub.c b/drivers/firmware/efi/libstub/efi-stub.c
index 2955c1ac6a36..f24b5436729c 100644
--- a/drivers/firmware/efi/libstub/efi-stub.c
+++ b/drivers/firmware/efi/libstub/efi-stub.c
@@ -111,6 +111,8 @@ static u32 get_supported_rt_services(void)
rt_prop_table = get_efi_config_table(EFI_RT_PROPERTIES_TABLE_GUID);
if (rt_prop_table)
supported &= rt_prop_table->runtime_services_supported;
+ else
+ supported = 0;

return supported;
}
--
2.25.1
\
 
 \ /
  Last update: 2023-03-27 00:02    [W:0.336 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site