diff options
author | AKASHI Takahiro <takahiro.akashi@linaro.org> | 2019-04-24 15:30:38 +0900 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-05-02 18:17:49 +0200 |
commit | d40e05ae95cfdf328ed6940fb48e110dc5da0c77 (patch) | |
tree | b214395b16c5168fcad8e78c1ae12dee31154265 /lib/efi_loader | |
parent | e00b82db809725ead77ddfe602c9c8fad1f45ab7 (diff) | |
download | u-boot-d40e05ae95cfdf328ed6940fb48e110dc5da0c77.zip u-boot-d40e05ae95cfdf328ed6940fb48e110dc5da0c77.tar.gz u-boot-d40e05ae95cfdf328ed6940fb48e110dc5da0c77.tar.bz2 |
efi_loader: set OsIndicationsSupported at init
UEFI variables should be installed using well-defined API.
Currently we don't support much, but the value of OsIndicationsSupported
will be updated once some features are added in the future.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Add comments. Rename a variable.
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib/efi_loader')
-rw-r--r-- | lib/efi_loader/efi_setup.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_setup.c b/lib/efi_loader/efi_setup.c index b32a7b3..87db51c 100644 --- a/lib/efi_loader/efi_setup.c +++ b/lib/efi_loader/efi_setup.c @@ -79,6 +79,7 @@ out: */ efi_status_t efi_init_obj_list(void) { + u64 os_indications_supported = 0; /* None */ efi_status_t ret = EFI_SUCCESS; /* Initialize once only */ @@ -90,6 +91,16 @@ efi_status_t efi_init_obj_list(void) if (ret != EFI_SUCCESS) goto out; + /* Indicate supported features */ + ret = EFI_CALL(efi_set_variable(L"OsIndicationsSupported", + &efi_global_variable_guid, + EFI_VARIABLE_BOOTSERVICE_ACCESS | + EFI_VARIABLE_RUNTIME_ACCESS, + sizeof(os_indications_supported), + &os_indications_supported)); + if (ret != EFI_SUCCESS) + goto out; + /* Initialize system table */ ret = efi_initialize_system_table(); if (ret != EFI_SUCCESS) |