[PATCH 02/16] lmb: add a flag to allow suppressing memory map change notification
Heinrich Schuchardt
xypron.glpk at gmx.de
Sat Sep 14 16:44:41 CEST 2024
On 9/5/24 10:27, Sughosh Ganu wrote:
> Add a flag LMB_NONOTIFY that can be passed to the LMB API's for
> reserving memory. This will then result in no notification being sent
> from the LMB module for the changes to the LMB's memory map.
You seem to be using this in patch 3 and 7.
Please, describe in this patch why you want to be able to suppress
notification.
In the EFI context we should use LMB notification to notify the
EFI_EVENT_GROUP_MEMORY_MAP_CHANGE event.
See chapter 7.1.2 EFI_BOOT_SERVICES.CreateEventEx() in the UEFI
specification.
Best regards
Heinrich
>
> Signed-off-by: Sughosh Ganu <sughosh.ganu at linaro.org>
> ---
> include/lmb.h | 1 +
> lib/lmb.c | 2 +-
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/include/lmb.h b/include/lmb.h
> index 45a06c3b99..ffba7e2889 100644
> --- a/include/lmb.h
> +++ b/include/lmb.h
> @@ -23,6 +23,7 @@ enum lmb_flags {
> LMB_NONE = 0,
> LMB_NOMAP = BIT(1),
> LMB_NOOVERWRITE = BIT(2),
> + LMB_NONOTIFY = BIT(3),
> };
>
> /**
> diff --git a/lib/lmb.c b/lib/lmb.c
> index da6a1595cc..419b31a651 100644
> --- a/lib/lmb.c
> +++ b/lib/lmb.c
> @@ -30,7 +30,7 @@ static struct lmb lmb;
> static void lmb_print_region_flags(enum lmb_flags flags)
> {
> u64 bitpos;
> - const char *flag_str[] = { "none", "no-map", "no-overwrite" };
> + const char *flag_str[] = { "none", "no-map", "no-overwrite", "no-notify" };
>
> do {
> bitpos = flags ? fls(flags) - 1 : 0;
More information about the U-Boot
mailing list