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

Re: [PATCH v2 03/10] xen/arm: add CONFIG_ARM_EFI to stub EFI API


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Wei Chen <Wei.Chen@xxxxxxx>
  • Date: Thu, 21 Apr 2022 15:01:23 +0800
  • 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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4xIcU96ZbrD7FqvIuy4Xpm+ZwhPyAu1JGyRqhzRBv9s=; b=NbqChWjWnts/Y6DdWPkkQElroN6LfDW+hySGaQDFlk6xyqCwDSDOtoFUIeYE6suGQpLPSt6NNv8QuxeBaBlGQYOtiInbbSyl9JbEasdjN2U8yqEze7xN23jvItujM9OK0NueYn9x8AnMDln3CDnIyJrMjyfv8fIrChOnOeUO2nwSQLitKIHFq4grkAiuAXj3ZmeXO1JvuP6daxilpVdFPz38j+OaFNMRKkNY6BR7QurDHyW+k0UvKyBD98clVmJsbFrLRBEYeHM0hnkmhq8jXH4hoYTAxGU+kzHdjDQfz4clwA0x8a8bWg0EpFUV//GS7RoEn91ua96LHUtWOznFKA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Mu1D85Cl6qaURPK5Q8vq6R/0QfziuqrW5h9DuIHBlpuvQSHeIG6WYrWjzoEm4dP+GeG0/v5OgGJUZqEZEIQuqB5/q9WStJfS/i4atnBgsO0Ok1LBBplRJ+XMy1F9oJW7qDNMU+mk7/ABrs9RE2nO0nmaXqn0keKZpvWB2bbKPZxXwPCybseUaTlWU4pdQoQB7CKY2Sge7tw/BhaQb6fMyreu1qFO8ucG8g4c/gwxATcsE1n91vGofs/MJGe46CtC2TmvMwG5bo5KetP2CfNEJc9Oi2NtP3+lETgAwBAV8icBKrgJY0A4c/xTrYkJ1uDoLByhZdMcFfS9uunI6IzNVA==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, nd@xxxxxxx, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 21 Apr 2022 07:01:50 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;

Hi Stefano,

On 2022/4/21 8:25, Stefano Stabellini wrote:
On Mon, 18 Apr 2022, Wei Chen wrote:
x86 is using compiler feature testing to decide EFI
build enable or not. When EFI build is disabled, x86
will use a efi/stub.c file to replace efi/runtime.c
for build objects. Following this idea, we introduce
a stub file for Arm, but use CONFIG_ARM_EFI to decide
EFI build enable or not.

Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
---
v1 -> v2:
1. Use CONFIG_ARM_EFI to replace CONFIG_EFI
2. Remove help text and make CONFIG_ARM_EFI invisible.
3. Merge one following patch:
    xen/arm: introduce a stub file for non-EFI architectures
4. Use the common stub.c instead of creating new one.
---
  xen/arch/arm/Kconfig      | 5 +++++
  xen/arch/arm/Makefile     | 2 +-
  xen/arch/arm/efi/Makefile | 5 +++++
  3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index ecfa6822e4..5f1b0121b0 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 ARM_EFI
        select HAS_FAST_MULTIPLY
config ARM
@@ -33,6 +34,10 @@ config ACPI
          Advanced Configuration and Power Interface (ACPI) support for Xen is
          an alternative to device tree on ARM64.
+config ARM_EFI
+       bool
+       depends on ARM_64

As ARM_EFI is selected by ARM_64 and it cannot be enable via a menu (it
is hidden) there is no need for the "depends" line here


Ok, I will remove it.


  config GICV3
        bool "GICv3 driver"
        depends on ARM_64 && !NEW_VGIC
diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
index 1d862351d1..bb7a6151c1 100644
--- a/xen/arch/arm/Makefile
+++ b/xen/arch/arm/Makefile
@@ -1,6 +1,5 @@
  obj-$(CONFIG_ARM_32) += arm32/
  obj-$(CONFIG_ARM_64) += arm64/
-obj-$(CONFIG_ARM_64) += efi/
  obj-$(CONFIG_ACPI) += acpi/
  obj-$(CONFIG_HAS_PCI) += pci/
  ifneq ($(CONFIG_NO_PLAT),y)
@@ -20,6 +19,7 @@ obj-y += domain.o
  obj-y += domain_build.init.o
  obj-y += domctl.o
  obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
+obj-y += efi/
  obj-y += gic.o
  obj-y += gic-v2.o
  obj-$(CONFIG_GICV3) += gic-v3.o
diff --git a/xen/arch/arm/efi/Makefile b/xen/arch/arm/efi/Makefile
index 4313c39066..75ef180233 100644
--- a/xen/arch/arm/efi/Makefile
+++ b/xen/arch/arm/efi/Makefile
@@ -1,4 +1,9 @@
  include $(srctree)/common/efi/efi-common.mk
+ifeq ($(CONFIG_ARM_EFI),y)
  obj-y += $(EFIOBJ-y)
  obj-$(CONFIG_ACPI) +=  efi-dom0.init.o
+else
+EFIOBJ-y += stub.o
+obj-y += stub.o

The change to EFIOBJ-y is not needed here as EFIOBJ-y is not used.
Only obj-y += stub.o should be enough


I add stub.o to EFIOBJ-y that's because I want to use the clean-files
in efi-common.mk. Otherwise the link of stub.c in arm/efi will not
be cleaned in "make clean".

+endif
--
2.25.1




 


Rackspace

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