grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 07/18] efi: run EFI specific code on EFI platform only


From: Jan Beulich
Subject: Re: [PATCH 07/18] efi: run EFI specific code on EFI platform only
Date: Fri, 20 Feb 2015 16:47:25 +0000

>>> On 30.01.15 at 18:54, <address@hidden> wrote:
> --- a/xen/arch/x86/shutdown.c
> +++ b/xen/arch/x86/shutdown.c
> @@ -504,7 +504,8 @@ void machine_restart(unsigned int delay_millisecs)
>          tboot_shutdown(TB_SHUTDOWN_REBOOT);
>      }
>  
> -    efi_reset_system(reboot_mode != 0);
> +    if ( efi_platform )
> +        efi_reset_system(reboot_mode != 0);

Please sync with Konrad on this one - it's supposed to get moved
and conditionalized anyway.

> --- a/xen/common/efi/boot.c
> +++ b/xen/common/efi/boot.c
> @@ -1154,6 +1154,11 @@ void __init efi_init_memory(void)
>      } *extra, *extra_head = NULL;
>  #endif
>  
> +#ifndef CONFIG_ARM /* TODO - disabled until implemented on ARM */
> +    if ( !efi_platform )
> +        return;
> +#endif

At least for this one I'd rather see the call site to have the
conditional.

> --- a/xen/common/efi/runtime.c
> +++ b/xen/common/efi/runtime.c
> @@ -164,6 +164,9 @@ int efi_get_info(uint32_t idx, union xenpf_efi_info *info)
>  {
>      unsigned int i, n;
>  
> +    if ( !efi_platform )
> +        return -ENOSYS;
> +
>      switch ( idx )
>      {
>      case XEN_FW_EFI_VERSION:
> @@ -298,6 +301,9 @@ int efi_runtime_call(struct xenpf_efi_runtime_call *op)
>      EFI_STATUS status = EFI_NOT_STARTED;
>      int rc = 0;
>  
> +    if ( !efi_platform )
> +        return -ENOSYS;

EOPNOTSUPP in both cases please, consistent with when runtime
service use is disabled.

Jan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]