public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: u-boot@lists.denx.de
Subject: [PATCH 1/1] efi_loader: make memory store size customizable
Date: Sun, 20 Dec 2020 12:33:26 +0200	[thread overview]
Message-ID: <X98odi81AujPb9gl@apalos.home> (raw)
In-Reply-To: <20201220101702.14342-1-xypron.glpk@gmx.de>

On Sun, Dec 20, 2020 at 11:17:02AM +0100, Heinrich Schuchardt wrote:
> Currently the size of the buffer to keep UEFI variables in memory is fixed
> at 16384 bytes. This size has proven to be too small for some use cases.
> 
> Make the size of the memory buffer for UEFI variables customizable.
> 
> Reported-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  include/efi_variable.h | 2 +-
>  lib/efi_loader/Kconfig | 8 ++++++++
>  2 files changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/include/efi_variable.h b/include/efi_variable.h
> index 4704a3c16e..bf5076233e 100644
> --- a/include/efi_variable.h
> +++ b/include/efi_variable.h
> @@ -91,7 +91,7 @@ efi_status_t efi_query_variable_info_int(u32 attributes,
> 
>  #define EFI_VAR_FILE_NAME "ubootefi.var"
> 
> -#define EFI_VAR_BUF_SIZE 0x4000
> +#define EFI_VAR_BUF_SIZE CONFIG_EFI_VAR_BUF_SIZE
> 
>  /*
>   * This constant identifies the file format for storing UEFI variables in
> diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
> index 7fd3a3c90c..deb86a335a 100644
> --- a/lib/efi_loader/Kconfig
> +++ b/lib/efi_loader/Kconfig
> @@ -77,6 +77,14 @@ config EFI_VAR_SEED_FILE
> 
>  endif
> 
> +config EFI_VAR_BUF_SIZE
> +	int "Memory size of the UEFI variable store"
> +	default 16384
> +	range 4096 2147483647
> +	help
> +	  This defines the memory area reserved for keeping UEFI variables.
> +	  Minimum value 4096.
> +
>  config EFI_GET_TIME
>  	bool "GetTime() runtime service"
>  	depends on DM_RTC
> --
> 2.29.2
> 
That being said the RPMB variant also uses 0x4000, but that's not configurable
by U-Boot. It's a compilation option for StandAloneMM

Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>

      reply	other threads:[~2020-12-20 10:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-20 10:17 [PATCH 1/1] efi_loader: make memory store size customizable Heinrich Schuchardt
2020-12-20 10:33 ` Ilias Apalodimas [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=X98odi81AujPb9gl@apalos.home \
    --to=ilias.apalodimas@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox