aboutsummaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_variable.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2020-03-24 19:54:53 +0000
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2020-07-11 23:14:17 +0200
commitb02a707152dc8046de6777c633f1d719c329a133 (patch)
tree97edc0b37cf52faff79a70d24243edd6fcd74c34 /lib/efi_loader/efi_variable.c
parentab7296c99c273736801f9480cd21fbe862671987 (diff)
downloadu-boot-b02a707152dc8046de6777c633f1d719c329a133.zip
u-boot-b02a707152dc8046de6777c633f1d719c329a133.tar.gz
u-boot-b02a707152dc8046de6777c633f1d719c329a133.tar.bz2
efi_loader: enable UEFI variables at runtime
Enable UEFI variables at runtime. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib/efi_loader/efi_variable.c')
-rw-r--r--lib/efi_loader/efi_variable.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/efi_loader/efi_variable.c b/lib/efi_loader/efi_variable.c
index bbdc071..eab5f00 100644
--- a/lib/efi_loader/efi_variable.c
+++ b/lib/efi_loader/efi_variable.c
@@ -668,7 +668,16 @@ static efi_status_t __efi_runtime EFIAPI
efi_get_variable_runtime(u16 *variable_name, const efi_guid_t *vendor,
u32 *attributes, efi_uintn_t *data_size, void *data)
{
- return EFI_UNSUPPORTED;
+ efi_status_t ret;
+
+ ret = efi_get_variable_int(variable_name, vendor, attributes,
+ data_size, data, NULL);
+
+ /* Remove EFI_VARIABLE_READ_ONLY flag */
+ if (attributes)
+ *attributes &= EFI_VARIABLE_MASK;
+
+ return ret;
}
/**
@@ -684,7 +693,8 @@ static efi_status_t __efi_runtime EFIAPI
efi_get_next_variable_name_runtime(efi_uintn_t *variable_name_size,
u16 *variable_name, efi_guid_t *vendor)
{
- return EFI_UNSUPPORTED;
+ return efi_get_next_variable_name_int(variable_name_size, variable_name,
+ vendor);
}
/**