[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v2 16/23] efi: split out efi_variables()
From: |
Konrad Rzeszutek Wilk |
Subject: |
Re: [Xen-devel] [PATCH v2 16/23] efi: split out efi_variables() |
Date: |
Mon, 10 Aug 2015 15:34:06 -0400 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Mon, Jul 20, 2015 at 04:29:11PM +0200, Daniel Kiper wrote:
> ..which collects variable store parameters. We want to re-use this
> code to support multiboot2 protocol on EFI platforms.
>
> Signed-off-by: Daniel Kiper <address@hidden>
Reviewed-by: Konrad Rzeszutek Wilk <address@hidden>
> ---
> v2 - suggestions/fixes:
> - improve commit message
> (suggested by Jan Beulich).
> ---
> xen/common/efi/boot.c | 41 ++++++++++++++++++++++++-----------------
> 1 file changed, 24 insertions(+), 17 deletions(-)
>
> diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c
> index fd62125..177697a 100644
> --- a/xen/common/efi/boot.c
> +++ b/xen/common/efi/boot.c
> @@ -837,6 +837,29 @@ static void __init setup_efi_pci(void)
> efi_bs->FreePool(handles);
> }
>
> +static void __init efi_variables(void)
> +{
> + EFI_STATUS status;
> +
> + status = (efi_rs->Hdr.Revision >> 16) >= 2 ?
> + efi_rs->QueryVariableInfo(EFI_VARIABLE_NON_VOLATILE |
> + EFI_VARIABLE_BOOTSERVICE_ACCESS |
> + EFI_VARIABLE_RUNTIME_ACCESS,
> + &efi_boot_max_var_store_size,
> + &efi_boot_remain_var_store_size,
> + &efi_boot_max_var_size) :
> + EFI_INCOMPATIBLE_VERSION;
> + if ( EFI_ERROR(status) )
> + {
> + efi_boot_max_var_store_size = 0;
> + efi_boot_remain_var_store_size = 0;
> + efi_boot_max_var_size = status;
> + PrintStr(L"Warning: Could not query variable store: ");
> + DisplayUint(status, 0);
> + PrintStr(newline);
> + }
> +}
> +
> static int __init __maybe_unused set_color(u32 mask, int bpp, u8 *pos, u8
> *sz)
> {
> if ( bpp < 0 )
> @@ -1078,23 +1101,7 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE
> *SystemTable)
> setup_efi_pci();
>
> /* Get snapshot of variable store parameters. */
> - status = (efi_rs->Hdr.Revision >> 16) >= 2 ?
> - efi_rs->QueryVariableInfo(EFI_VARIABLE_NON_VOLATILE |
> - EFI_VARIABLE_BOOTSERVICE_ACCESS |
> - EFI_VARIABLE_RUNTIME_ACCESS,
> - &efi_boot_max_var_store_size,
> - &efi_boot_remain_var_store_size,
> - &efi_boot_max_var_size) :
> - EFI_INCOMPATIBLE_VERSION;
> - if ( EFI_ERROR(status) )
> - {
> - efi_boot_max_var_store_size = 0;
> - efi_boot_remain_var_store_size = 0;
> - efi_boot_max_var_size = status;
> - PrintStr(L"Warning: Could not query variable store: ");
> - DisplayUint(status, 0);
> - PrintStr(newline);
> - }
> + efi_variables();
>
> efi_arch_memory_setup();
>
> --
> 1.7.10.4
>
>
> _______________________________________________
> Xen-devel mailing list
> address@hidden
> http://lists.xen.org/xen-devel
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Xen-devel] [PATCH v2 16/23] efi: split out efi_variables(),
Konrad Rzeszutek Wilk <=