diff options
author | Tom Rini <trini@konsulko.com> | 2020-07-13 11:29:51 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-07-13 11:29:51 -0400 |
commit | 959a481f8f49cb01d757363ae816d83e9c145ab7 (patch) | |
tree | 2536cd6e870df4b797e8da6278d2447abf106197 /lib/efi_selftest/efi_selftest_variables_runtime.c | |
parent | 497c7598c4e713eb9ad88fd7963e57b21b8b35e1 (diff) | |
parent | 4a3155de3dbadfcb933287dbb84c8eff0fd951eb (diff) |
Merge tag 'efi-2020-10-rc1-3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Pull request for UEFI sub-system for efi-2020-10-rc1 (3)
Up to now UEFI variables where stored in U-Boot environment variables.
Saving UEFI variables was not possible without saving the U-Boot
environment variables. With this patch series file ubootefi.var in the
EFI system partition is used for saving UEFI variables. Furthermore the
UEFI variables are exposed for reading at runtime.
Code corrections for UEFI secure boot are provided.
A buffer overrun in the RSA library is fixed.
Diffstat (limited to 'lib/efi_selftest/efi_selftest_variables_runtime.c')
-rw-r--r-- | lib/efi_selftest/efi_selftest_variables_runtime.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/efi_selftest/efi_selftest_variables_runtime.c b/lib/efi_selftest/efi_selftest_variables_runtime.c index b3b40ad2cf..3226069c0b 100644 --- a/lib/efi_selftest/efi_selftest_variables_runtime.c +++ b/lib/efi_selftest/efi_selftest_variables_runtime.c @@ -16,9 +16,7 @@ static struct efi_boot_services *boottime; static struct efi_runtime_services *runtime; -static const efi_guid_t guid_vendor0 = - EFI_GUID(0x67029eb5, 0x0af2, 0xf6b1, - 0xda, 0x53, 0xfc, 0xb5, 0x66, 0xdd, 0x1c, 0xe6); +static const efi_guid_t guid_vendor0 = EFI_GLOBAL_VARIABLE_GUID; /* * Setup unit test. @@ -68,17 +66,18 @@ static int execute(void) efi_st_error("SetVariable failed\n"); return EFI_ST_FAILURE; } - len = 3; - ret = runtime->get_variable(L"efi_st_var0", &guid_vendor0, + len = EFI_ST_MAX_DATA_SIZE; + ret = runtime->get_variable(L"PlatformLangCodes", &guid_vendor0, &attr, &len, data); - if (ret != EFI_UNSUPPORTED) { + if (ret != EFI_SUCCESS) { efi_st_error("GetVariable failed\n"); return EFI_ST_FAILURE; } memset(&guid, 0, 16); *varname = 0; + len = 2 * EFI_ST_MAX_VARNAME_SIZE; ret = runtime->get_next_variable_name(&len, varname, &guid); - if (ret != EFI_UNSUPPORTED) { + if (ret != EFI_SUCCESS) { efi_st_error("GetNextVariableName failed\n"); return EFI_ST_FAILURE; } |