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

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


  • To: <--to=xen-devel@xxxxxxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Wei Chen <wei.chen@xxxxxxx>
  • Date: Mon, 18 Apr 2022 17:07:28 +0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); 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=tvRkI0wVuOuaZghSz7/nXNikDcYdh4Q7PzQrJ96r9QA=; b=cppydxpY1baLhGESuagiuW5xVhmC++ewa3Xy5fV2ZJjxIXDg7C7qvQR2EBz/7KnzDG3o3sj6rgQncrjqWCB/io7IDkjAlK3gjNxajfb/ARX/gyRPEJ5KXGAf4MiKEDR3E0escmYpB1C8LB1UijEfbweESIjy+XxEiQdKp3yDQbUZiWWbxmSrTSXNxf2q1GTjh4WhJx9pRC1/zO1ZeWADoFlmHiwaBAQVyBBWEweXDOHkF1bHulZkhXRSPrENhibRzBv9+ThqUGxrgmO0m8FuG++2cIKic++PlAT3kJGctMZ8cie4fA7+exh7jHBZD69VA1nLMkCKxSyz2z/ImvqQlw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oPwufD1BqEtiZBCWKPIhWFqRtCR90lYDMkv5Q7vm9rtS8ZOHru/opEfuIBBUlT4KwvLuFtPLBLY+eW0dAHc8HFB7pyEeQujC9B/91CDvdGeKcK9wmSlCf+6QKtGoU4xBHdTqFXIrhAakkezVr68AqiBEjZJFiEZvmpFiY8bOEW+OrzU9kjVB/3hZAHx4jAKE45km6Ly3ZzIneNQPnvSGHn3hmnAZdJIqErLzlRi8sUFX1AJbO3/7Daebwg/0g5Mdijc6b/H2Bk+rkV8Ca/3ZaOralIMneOen6n91rHJ1gC8Z9QGCvBDg5ZsyBrA5c7erNIkLWB5LTicVaxKjZAzG8Q==
  • Cc: <nd@xxxxxxx>, Wei Chen <wei.chen@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Mon, 18 Apr 2022 09:09:21 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true

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
+
 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
+endif
-- 
2.25.1




 


Rackspace

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