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

RE: [PATCH 20/37] xen: introduce CONFIG_EFI to stub API for non-EFI architecture


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Wei Chen <Wei.Chen@xxxxxxx>
  • Date: Fri, 24 Sep 2021 04:34:26 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=kbxhEwLcYaFANGdHa6f541Zk8Gg8706fzHfZtEIl7r4=; b=Yf/0OsRJV1z4RadadI+pEkYC7zmokTB6jqv0UPAKbT+IMhnl2s7cdpty02UEOSUCXs2Tkt/TGoLv9Xw6JoK4Lls+1UgdLJ/lnSCgUCbKOrO+guQgeKNsmZ/DptJoNq38kripM7/ORsxrFdst+Ft3ojcEXh1XevDFTtvWeNJuekT4S4AbrMs5dwbS3UCfcvm6+LU2bOlkUXpczhGYHU/7EYDwm1oCk3ddTg9JHrbSZJ2dYPdrDUQEUfrWZtEl4t86jGUnY74y7RRVgm7gCnqV/Dvnexea1CwJN9dW7z83vC0HKfSIiBVrr+4/Wzjg+wcJBVWzIvJfMGbwn/SpmbXlXQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Oq+cm7MyXGl3aR90QcBxZHqUWOj4B9VMgPNnjFa6D9UlDhTfIl4aIi4g2iVWsVQz6f03afd8NwRsnyuWdZ7LdNstKNZHqv6HcPNJcqBY0L4EArjhCPl54buqAmXyrJkq8mY6W4B61oSb+e9rFL6NOAQTbYkjaH1d66WqLq8Gak5O9hkLo7yRWLnjuyJehogHKm3hRqUgLxCyKN8OSoK1mQyB1Poo4osQMtNGFnCDWgJ2ik1uxTpSUqyGB034dRSwGwqIRb2oDqLxlcN61oejQcZ0Bh9fGcKl2Chuxt5hECxXU8LmJYWqnXrB4+5li6mTqea1zeaZdFdo8bPWzpec/w==
  • Authentication-results-original: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Delivery-date: Fri, 24 Sep 2021 04:35:15 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHXsHMtR+l18+MmpE6rl/RjSXTBgquyYmkAgAA2xQA=
  • Thread-topic: [PATCH 20/37] xen: introduce CONFIG_EFI to stub API for non-EFI architecture

Hi Stefano,

> -----Original Message-----
> From: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> Sent: 2021年9月24日 9:15
> To: Wei Chen <Wei.Chen@xxxxxxx>
> Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx; sstabellini@xxxxxxxxxx; julien@xxxxxxx;
> Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
> Subject: Re: [PATCH 20/37] xen: introduce CONFIG_EFI to stub API for non-
> EFI architecture
> 
> On Thu, 23 Sep 2021, Wei Chen wrote:
> > Some architectures do not support EFI, but EFI API will be used
> > in some common features. Instead of spreading #ifdef ARCH, we
> > introduce this Kconfig option to give Xen the ability of stubing
> > EFI API for non-EFI supported architectures.
> >
> > Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
> > ---
> >  xen/arch/arm/Kconfig  |  1 +
> >  xen/arch/arm/Makefile |  2 +-
> >  xen/arch/x86/Kconfig  |  1 +
> >  xen/common/Kconfig    | 11 +++++++++++
> >  xen/include/xen/efi.h |  4 ++++
> >  5 files changed, 18 insertions(+), 1 deletion(-)
> >
> > diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
> > index ecfa6822e4..865ad83a89 100644
> > --- a/xen/arch/arm/Kconfig
> > +++ b/xen/arch/arm/Kconfig
> > @@ -6,6 +6,7 @@ config ARM_64
> >     def_bool y
> >     depends on !ARM_32
> >     select 64BIT
> > +   select EFI
> >     select HAS_FAST_MULTIPLY
> >
> >  config ARM
> > diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
> > index 3d3b97b5b4..ae4efbf76e 100644
> > --- a/xen/arch/arm/Makefile
> > +++ b/xen/arch/arm/Makefile
> > @@ -1,6 +1,6 @@
> >  obj-$(CONFIG_ARM_32) += arm32/
> >  obj-$(CONFIG_ARM_64) += arm64/
> > -obj-$(CONFIG_ARM_64) += efi/
> > +obj-$(CONFIG_EFI) += efi/
> >  obj-$(CONFIG_ACPI) += acpi/
> >  ifneq ($(CONFIG_NO_PLAT),y)
> >  obj-y += platforms/
> > diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
> > index 28d13b9705..b9ed187f6b 100644
> > --- a/xen/arch/x86/Kconfig
> > +++ b/xen/arch/x86/Kconfig
> > @@ -10,6 +10,7 @@ config X86
> >     select ALTERNATIVE_CALL
> >     select ARCH_SUPPORTS_INT128
> >     select CORE_PARKING
> > +   select EFI
> >     select HAS_ALTERNATIVE
> >     select HAS_COMPAT
> >     select HAS_CPUFREQ
> > diff --git a/xen/common/Kconfig b/xen/common/Kconfig
> > index 9ebb1c239b..f998746a1a 100644
> > --- a/xen/common/Kconfig
> > +++ b/xen/common/Kconfig
> > @@ -11,6 +11,16 @@ config COMPAT
> >  config CORE_PARKING
> >     bool
> >
> > +config EFI
> > +   bool
> 
> Without the title the option is not user-selectable (or de-selectable).
> So the help message below can never be seen.
> 
> Either add a title, e.g.:
> 
> bool "EFI support"
> 
> Or fully make the option a silent option by removing the help text.
> 
> 

OK, in current Xen code, EFI is unconditionally compiled. Before
we change related code, I prefer to remove the help text.

> 
> > +   ---help---
> > +      This option provides support for runtime services provided
> > +      by UEFI firmware (such as non-volatile variables, realtime
> > +      clock, and platform reset). A UEFI stub is also provided to
> > +      allow the kernel to be booted as an EFI application. This
> > +      is only useful for kernels that may run on systems that have
> > +      UEFI firmware.
> > +
> >  config GRANT_TABLE
> >     bool "Grant table support" if EXPERT
> >     default y
> > @@ -196,6 +206,7 @@ config KEXEC
> >
> >  config EFI_SET_VIRTUAL_ADDRESS_MAP
> >      bool "EFI: call SetVirtualAddressMap()" if EXPERT
> > +    depends on EFI
> >      ---help---
> >        Call EFI SetVirtualAddressMap() runtime service to setup memory
> map for
> >        further runtime services. According to UEFI spec, it isn't
> strictly
> > diff --git a/xen/include/xen/efi.h b/xen/include/xen/efi.h
> > index 94a7e547f9..661a48286a 100644
> > --- a/xen/include/xen/efi.h
> > +++ b/xen/include/xen/efi.h
> > @@ -25,6 +25,8 @@ extern struct efi efi;
> >
> >  #ifndef __ASSEMBLY__
> >
> > +#ifdef CONFIG_EFI
> > +
> >  union xenpf_efi_info;
> >  union compat_pf_efi_info;
> >
> > @@ -45,6 +47,8 @@ int efi_runtime_call(struct xenpf_efi_runtime_call *);
> >  int efi_compat_get_info(uint32_t idx, union compat_pf_efi_info *);
> >  int efi_compat_runtime_call(struct compat_pf_efi_runtime_call *);
> >
> > +#endif /* CONFIG_EFI*/
> > +
> >  #endif /* !__ASSEMBLY__ */
> >
> >  #endif /* __XEN_EFI_H__ */
> > --
> > 2.25.1
> >

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.