On 06.03.2026 14:29, Soumyajyotii Ssarkar wrote:
> As described in the task, BGRT preservation is now enabled by default to fix 
> ACPI corruption
> for desktop/workstation systems (similar to ESRT).

What's "the task"?

> Add an opt-out parameter 'efi=no-bgrt' to allow disabling BGRT
> preservation on systems where the ~1MB memory overhead is not
> desired.

This looks to contradict ...

> The parameter is parsed during normal Xen boot (not during EFI
> phase), so it only affects diagnostic logging.

... this. For xen.efi you want to add code to the command line parsing
near the top of efi_start(). What to do for the MB2 boot path perhaps
the only thing there is to peek into the command line (see
arch/x86/boot/cmdline.c).

> @@ -1873,6 +1877,10 @@ static int __init cf_check parse_efi_param(const char 
> *s)
>              else
>                  __clear_bit(EFI_RS, &efi_flags);
>          }
> +        else if ( (ss - s) == 7 && !memcmp(s, "no-bgrt", 7) )

No "no-" prefixes please; you want to use parse_boolean().

> @@ -1968,7 +1976,11 @@ void __init efi_init_memory(void)
>      if ( !efi_enabled(EFI_BOOT) )
>          return;
> 
> -    if ( bgrt_debug_info.preserved )
> +    if ( opt_bgrt_disabled )
> +    {
> +        printk(XENLOG_INFO "EFI: BGRT preservation disabled\n");
> +    }

No need for figure braces here.

Jan

Reply via email to