From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
To: Harsimran Singh Tungal <harsimransingh.tungal@arm.com>
Cc: u-boot@lists.denx.de, Tom Rini <trini@konsulko.com>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Hugues Kamba Mpiana <hugues.kambampiana@arm.com>,
Simon Glass <sjg@chromium.org>
Subject: Re: [PATCH v3 01/10] efi_loader: add runtime memset helper
Date: Mon, 29 Jun 2026 19:21:59 +0100 [thread overview]
Message-ID: <akK3x3Ih9NH0Sjje@e130802.arm.com> (raw)
In-Reply-To: <20260627144421.2067410-2-harsimransingh.tungal@arm.com>
On Sat, Jun 27, 2026 at 03:44:12PM +0100, Harsimran Singh Tungal wrote:
> Add efi_memset_runtime() for EFI runtime paths
>
> This keeps buffer initialization in runtime-resident code after
> ExitBootServices() and avoids relying on non-runtime helpers.
>
> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Signed-off-by: Harsimran Singh Tungal <harsimransingh.tungal@arm.com>
> ---
> include/efi_loader.h | 3 +++
> lib/efi_loader/efi_runtime.c | 20 ++++++++++++++++++++
> 2 files changed, 23 insertions(+)
>
> diff --git a/include/efi_loader.h b/include/efi_loader.h
> index 3a4d502631c..9dfea1fd7de 100644
> --- a/include/efi_loader.h
> +++ b/include/efi_loader.h
> @@ -1151,6 +1151,9 @@ void efi_memcpy_runtime(void *dest, const void *src, size_t n);
> /* runtime implementation of memcmp() */
> int efi_memcmp_runtime(const void *s1, const void *s2, size_t n);
>
> +/* runtime implementation of memset() */
> +void *efi_memset_runtime(void *dest, int c, size_t n);
> +
> /* commonly used helper functions */
> u16 *efi_create_indexed_name(u16 *buffer, size_t buffer_size, const char *name,
> unsigned int index);
> diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c
> index 73d4097464c..c0182931c42 100644
> --- a/lib/efi_loader/efi_runtime.c
> +++ b/lib/efi_loader/efi_runtime.c
> @@ -233,6 +233,26 @@ int __efi_runtime efi_memcmp_runtime(const void *s1, const void *s2, size_t n)
> return 0;
> }
>
> +/**
> + * efi_memset_runtime() - fill memory area
> + *
> + * At runtime memset() is not available.
> + *
> + * @dest: destination buffer
> + * @c: byte value used to fill destination buffer
> + * @n: number of bytes to set
> + * Return: pointer to destination buffer
> + */
> +__efi_runtime void *efi_memset_runtime(void *dest, int c, size_t n)
> +{
> + u8 *d = dest;
> +
> + for (; n; --n)
> + *d++ = (u8)c;
> +
> + return dest;
> +}
> +
> /**
> * efi_update_table_header_crc32() - Update crc32 in table header
> *
> --
> 2.34.1
>
Reviewed-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
next prev parent reply other threads:[~2026-06-29 18:22 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-27 14:44 [PATCH v3 00/10] arm64: FF-A runtime transport for EFI variables Harsimran Singh Tungal
2026-06-27 14:44 ` [PATCH v3 01/10] efi_loader: add runtime memset helper Harsimran Singh Tungal
2026-06-29 18:21 ` Abdellatif El Khlifi [this message]
2026-06-27 14:44 ` [PATCH v3 02/10] arm-ffa: add FF-A bus runtime support Harsimran Singh Tungal
2026-06-29 18:12 ` Abdellatif El Khlifi
2026-07-01 12:59 ` Ilias Apalodimas
2026-07-01 13:59 ` Ilias Apalodimas
2026-06-27 14:44 ` [PATCH v3 03/10] efi_loader: add FF-A runtime support in EFI variable TEE driver Harsimran Singh Tungal
2026-06-29 18:40 ` Abdellatif El Khlifi
2026-07-01 13:56 ` Ilias Apalodimas
2026-06-27 14:44 ` [PATCH v3 04/10] efi_loader: enable EFI runtime SetVariable()/GetVariable() using FF-A transport Harsimran Singh Tungal
2026-07-01 13:49 ` Ilias Apalodimas
2026-06-27 14:44 ` [PATCH v3 05/10] charset: mark u16_strsize() as __efi_runtime Harsimran Singh Tungal
2026-06-27 18:50 ` Ilias Apalodimas
2026-06-29 18:28 ` Abdellatif El Khlifi
2026-06-27 14:44 ` [PATCH v3 06/10] corstone1000: enable bootefi selftest Harsimran Singh Tungal
2026-06-29 18:44 ` Abdellatif El Khlifi
2026-06-27 14:44 ` [PATCH v3 07/10] efi: selftest: add runtime variable tests with non-volatile storage Harsimran Singh Tungal
2026-06-27 14:44 ` [PATCH v3 08/10] test: dm: add sandbox FF-A runtime transport tests Harsimran Singh Tungal
2026-06-27 14:44 ` [PATCH v3 09/10] doc: arm64: document FF-A runtime path for EFI variables Harsimran Singh Tungal
2026-06-29 18:15 ` Abdellatif El Khlifi
2026-06-27 14:44 ` [PATCH v3 10/10] doc: bootefi: note two-phase runtime variables selftest Harsimran Singh Tungal
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=akK3x3Ih9NH0Sjje@e130802.arm.com \
--to=abdellatif.elkhlifi@arm.com \
--cc=harsimransingh.tungal@arm.com \
--cc=hugues.kambampiana@arm.com \
--cc=ilias.apalodimas@linaro.org \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.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.