All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: Simon Glass <sjg@chromium.org>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Tom Rini <trini@konsulko.com>,
	Christian Melki <christian.melki@t2data.com>,
	Bin Meng <bmeng.cn@gmail.com>, Alexander Graf <agraf@csgraf.de>,
	U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [PATCH v4 07/34] efi: Add a way to obtain boot services in the app
Date: Sun, 7 Nov 2021 09:06:34 +0100	[thread overview]
Message-ID: <04decffe-3a42-b1db-37c3-e078a56f1422@gmx.de> (raw)
In-Reply-To: <20211103210920.v4.7.I72ca3496a359815552442fccbd017f0474108e28@changeid>

On 11/4/21 04:09, Simon Glass wrote:
> Add a function to return this information along with a stub for the
> efi_info_get() function, since calling it otherwise hangs U-Boot.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> (no changes since v1)
>
>   include/efi.h     |  8 +++++++-

efi.h is used both by efi_loader as well as efi_app.
At long term it would make sense to move efi_app specific stuff to a
separate include like we did for efi_loader using efi_loader.h

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

>   lib/efi/efi_app.c | 10 ++++++++++
>   2 files changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/include/efi.h b/include/efi.h
> index 18c13e0370a..b5835422b95 100644
> --- a/include/efi.h
> +++ b/include/efi.h
> @@ -444,9 +444,15 @@ extern char _binary_u_boot_bin_start[], _binary_u_boot_bin_end[];
>    *
>    * @return pointer to EFI system table
>    */
> -
>   struct efi_system_table *efi_get_sys_table(void);
>
> +/**
> + * efi_get_boot() - Get access to the EFI boot services table
> + *
> + * @return pointer to EFI boot services table
> + */
> +struct efi_boot_services *efi_get_boot(void);
> +
>   /**
>    * efi_get_ram_base() - Find the base of RAM
>    *
> diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c
> index 907bacd716a..f61665686c5 100644
> --- a/lib/efi/efi_app.c
> +++ b/lib/efi/efi_app.c
> @@ -31,11 +31,21 @@ struct efi_system_table *efi_get_sys_table(void)
>   	return global_priv->sys_table;
>   }
>
> +struct efi_boot_services *efi_get_boot(void)
> +{
> +	return global_priv->boot;
> +}
> +
>   unsigned long efi_get_ram_base(void)
>   {
>   	return global_priv->ram_base;
>   }
>
> +int efi_info_get(enum efi_entry_t type, void **datap, int *sizep)
> +{
> +	return -ENOSYS;
> +}
> +
>   static efi_status_t setup_memory(struct efi_priv *priv)
>   {
>   	struct efi_boot_services *boot = priv->boot;
>

  reply	other threads:[~2021-11-07  8:06 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-04  3:09 [PATCH v4 00/34] efi: Improvements to U-Boot running on top of UEFI Simon Glass
2021-11-04  3:09 ` [PATCH v4 01/34] efi: Add a script to build an image for testing on UEFI Simon Glass
2021-11-07  7:43   ` Heinrich Schuchardt
2021-11-04  3:09 ` [PATCH v4 02/34] efi: Enable DM_ETH for the app Simon Glass
2021-11-04  3:09 ` [PATCH v4 03/34] efi: Drop the OF_EMBED warning for EFI Simon Glass
2021-11-04  3:09 ` [PATCH v4 04/34] x86: Create a 32/64-bit selection for the app Simon Glass
2021-11-04  3:09 ` [PATCH v4 05/34] efi: Create a 64-bit app Simon Glass
2021-11-04  3:09 ` [PATCH v4 06/34] x86: Don't duplicate global_ptr in 64-bit EFI app Simon Glass
2021-11-07  7:59   ` Heinrich Schuchardt
2021-11-04  3:09 ` [PATCH v4 07/34] efi: Add a way to obtain boot services in the app Simon Glass
2021-11-07  8:06   ` Heinrich Schuchardt [this message]
2021-11-04  3:09 ` [PATCH v4 08/34] efi: Add video support to " Simon Glass
2021-11-07  8:10   ` Heinrich Schuchardt
2021-11-04  3:09 ` [PATCH v4 09/34] efi: Add EFI uclass for media Simon Glass
2021-11-07  8:16   ` Heinrich Schuchardt
2021-11-07 16:43     ` Simon Glass
2021-11-08  5:29       ` AKASHI Takahiro
2021-11-08 15:39         ` Heinrich Schuchardt
2021-11-08 15:58           ` Simon Glass
2021-11-13  3:24             ` Simon Glass
2021-11-13  9:23         ` Heinrich Schuchardt
2021-11-13 18:14           ` Simon Glass
2021-12-04 15:28           ` Simon Glass
2021-11-04  3:09 ` [PATCH v4 10/34] efi: Add a media/block driver for EFI block devices Simon Glass
2021-11-04  3:09 ` [PATCH v4 11/34] efi: Locate all block devices in the app Simon Glass
2021-11-04  3:09 ` [PATCH v4 12/34] patman: Use a ValueError exception if tools.Run() fails Simon Glass
2021-11-14  0:34   ` Simon Glass
2021-11-04  3:09 ` [PATCH v4 13/34] binman: Report an error if test files fail to compile Simon Glass
2021-11-14  0:34   ` Simon Glass
2021-11-04  3:09 ` [PATCH v4 14/34] binman: Support reading the offset of an ELF-file symbol Simon Glass
2021-11-14  0:34   ` Simon Glass
2021-11-04  3:09 ` [PATCH v4 15/34] binman: Tidy up comments on _DoTestFile() Simon Glass
2021-11-14  0:34   ` Simon Glass
2021-11-04  3:09 ` [PATCH v4 16/34] binman: Support updating the dtb in an ELF file Simon Glass
2021-11-14  0:34   ` Simon Glass
2021-11-04  3:09 ` [PATCH v4 17/34] efi: serial: Support arrow keys Simon Glass
2021-11-04  3:09 ` [PATCH v4 18/34] bloblist: Support allocating the bloblist Simon Glass
2021-12-05 19:46   ` Simon Glass
2021-11-04  3:09 ` [PATCH v4 19/34] x86: Allow booting a kernel from the EFI app Simon Glass
2021-11-04  3:09 ` [PATCH v4 20/34] x86: Don't process the kernel command line unless enabled Simon Glass
2021-11-04  3:09 ` [PATCH v4 21/34] x86: efi: Add room for the binman definition in the dtb Simon Glass
2021-11-04  3:09 ` [PATCH v4 22/34] efi: Drop device_path from struct efi_priv Simon Glass
2021-11-04  3:09 ` [PATCH v4 23/34] efi: Add comments to " Simon Glass
2021-11-04  3:09 ` [PATCH v4 28/34] efi: Check for failure when initing the app Simon Glass
2021-11-04  3:09 ` [PATCH v4 29/34] efi: Mention that efi_info_get() is only used in the stub Simon Glass
2021-11-04  3:09 ` [PATCH v4 30/34] efi: Show when allocated pages are used Simon Glass
2021-11-04  3:09 ` [PATCH v4 31/34] efi: Allow easy selection of serial-only operation Simon Glass
2021-11-04  3:09 ` [PATCH v4 32/34] efi: Update efi_get_next_mem_desc() to avoid needing a map Simon Glass
2021-11-04  3:09 ` [PATCH v4 33/34] efi: Support the efi command in the app Simon Glass
2021-11-04  3:09 ` [PATCH v4 34/34] efi: Show the system-table revision Simon Glass

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=04decffe-3a42-b1db-37c3-e078a56f1422@gmx.de \
    --to=xypron.glpk@gmx.de \
    --cc=agraf@csgraf.de \
    --cc=bmeng.cn@gmail.com \
    --cc=christian.melki@t2data.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --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.