From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/1] efi_loader: set OsIndicationsSupported at init
Date: Thu, 25 Apr 2019 09:34:33 +0900 [thread overview]
Message-ID: <20190425003432.GE7158@linaro.org> (raw)
In-Reply-To: <20190424203222.12089-1-xypron.glpk@gmx.de>
On Wed, Apr 24, 2019 at 10:32:22PM +0200, Heinrich Schuchardt wrote:
> From: AKASHI Takahiro <takahiro.akashi@linaro.org>
>
> 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>
> ---
> Applied to efi-2019-07 branch.
> ---
> cmd/bootefi.c | 4 ----
> lib/efi_loader/efi_setup.c | 11 +++++++++++
> 2 files changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/cmd/bootefi.c b/cmd/bootefi.c
> index efaa548be4..b93d8c6a32 100644
> --- a/cmd/bootefi.c
> +++ b/cmd/bootefi.c
> @@ -303,10 +303,6 @@ static efi_status_t do_bootefi_exec(efi_handle_t handle)
> if (ret != EFI_SUCCESS)
> return ret;
>
> - /* we don't support much: */
> - env_set("efi_8be4df61-93ca-11d2-aa0d-00e098032b8c_OsIndicationsSupported",
> - "{ro,boot}(blob)0000000000000000");
> -
> /* Call our payload! */
> ret = EFI_CALL(efi_start_image(handle, NULL, NULL));
>
> diff --git a/lib/efi_loader/efi_setup.c b/lib/efi_loader/efi_setup.c
> index b32a7b3f93..87db51cbb7 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;
> +
Or should we rename efi_init_platform_lang() to, say, efi_init_vars()
and put OsIndcationsSupported in it?
-Takahiro Akashi
> /* Initialize system table */
> ret = efi_initialize_system_table();
> if (ret != EFI_SUCCESS)
> --
> 2.20.1
>
prev parent reply other threads:[~2019-04-25 0:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-24 20:32 [U-Boot] [PATCH v2 1/1] efi_loader: set OsIndicationsSupported at init Heinrich Schuchardt
2019-04-25 0:34 ` AKASHI Takahiro [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190425003432.GE7158@linaro.org \
--to=takahiro.akashi@linaro.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.