From patchwork Tue Jul 7 03:11:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 240856 List-Id: U-Boot discussion From: xypron.glpk at gmx.de (Heinrich Schuchardt) Date: Tue, 7 Jul 2020 05:11:59 +0200 Subject: [PATCH v2 16/17] efi_loader: enable UEFI variables at runtime In-Reply-To: <20200707031200.65511-1-xypron.glpk@gmx.de> References: <20200707031200.65511-1-xypron.glpk@gmx.de> Message-ID: <20200707031200.65511-17-xypron.glpk@gmx.de> Enable UEFI variables at runtime. Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_runtime.c | 2 ++ lib/efi_loader/efi_variable.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) -- 2.27.0 diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c index 5b6506fbdc..91a4551448 100644 --- a/lib/efi_loader/efi_runtime.c +++ b/lib/efi_loader/efi_runtime.c @@ -121,6 +121,8 @@ efi_status_t efi_init_runtime_supported(void) rt_table->version = EFI_RT_PROPERTIES_TABLE_VERSION; rt_table->length = sizeof(struct efi_rt_properties_table); rt_table->runtime_services_supported = + EFI_RT_SUPPORTED_GET_VARIABLE | + EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME | EFI_RT_SUPPORTED_SET_VIRTUAL_ADDRESS_MAP | EFI_RT_SUPPORTED_CONVERT_POINTER; diff --git a/lib/efi_loader/efi_variable.c b/lib/efi_loader/efi_variable.c index 13123e7e41..c472a054d0 100644 --- a/lib/efi_loader/efi_variable.c +++ b/lib/efi_loader/efi_variable.c @@ -672,7 +672,8 @@ 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; + return efi_get_variable_int(variable_name, vendor, attributes, + data_size, data, NULL); } /** @@ -688,7 +689,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); } /**