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

[PATCH v6 03/11] xen/arm: disable EFI boot services for MPU systems


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Wei Chen <wei.chen@xxxxxxx>
  • Date: Fri, 4 Nov 2022 18:07:33 +0800
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com])
  • 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=2; 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=CpCwe/YQuh8dExFgUjQ64iwotcXpfBD1fxeA2Xv10i4=; b=bh4GlclJbGbqS2LcpTMIx6kPQLdJzWvfdM8zme5aX+wQFi3iLgUS4/I5YrxxYqqnOwRGXoin/dpmpKxndpNWcFEqtmNFNWNBEXtV/Sf84rkRMHosd83xExRL7WAVvxnTfIMbcvTEyTjf6+aAzDSjdUkXFYzaqN7lM9Ze/eLfPV8K7t2E6FB98e0bDeR+nFAZ6pYbDGBy/9jPP7hcph42xbNFZtMloYn+tfrXrU/2QCHY/a3sM9Ocg8IFRZX1el4M5NV0e5kgno47PwefmNQgZG7prx2VKAOE9JLbaAt2sepDeSHr4sjcovV+zIgy2/kAALw4UuX1Erjc12Jc4hLs/w==
  • 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=CpCwe/YQuh8dExFgUjQ64iwotcXpfBD1fxeA2Xv10i4=; b=VmDVTf2vYWOsmjj+Z3ZOUSoBFOULj7f/SRL0Xq+2CFOQ0PKkMGqoQXyPEiTRKaFKeMht4SW9gwvMyvefwEEAFJWcst4OUiF/AD7NSlYsVeykcgccs9Jr0Zv2vY63rsp/5MiHAXsX7TCAmqOMYww8r8htzKSqZEMOiHHD4wKY3PbWxidxOE86Hzh4gVH4y18+dJfSXlmgQW71YgTug0mFoKcpMSZbsWQMorZ6oJkljx9VWcfWTtutQgjbTiVjpyHZI9/wYBOixuF/mQtx2anpN9UxkLR0av0+YtZhR5aPchgLXcii17fNpoL/oi9N4TPI9V+6ZV+vOf87bD9HRkKeUQ==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=DcuOjZu+sXs8x3P8xHmd8WpIkprp03QJhbKSWHXEPR0aob9Z0fQSQ0Ok32jHQFnrJ1/f5vduviQceNoxk0H6IvSvg44LMSA03S7oZsOeYv7XTnDde/PSQPOpsDdKVN5gVvfWiwyOCz4YQZjp7ZC1KPjkuccJIfBQJC83eGSdemKWPBMRIxPGr0A3Gsks2VTtpwYoCKi36sRVg1qyC3yGkp9QimICWGtwEcs3cIcZdzrrUIDSRraSgJNLex/jHkEy2m/VVJz6gCjpEs949kxRrKKkRqhXDjCz5C/kVC6ZdGPIK+UKxFE/PriSuKWRHK1vkx/U54CG7ouL9JAHIVY+jg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m1zenx/ZRrnl1J615gNg0oEqTCZeEd0rCB1BRGty+DFfOXgFBOQ7powMloU5hhpny4VfWJjJYmrrsAKGO3sCGqoqNfcKQBNfMUroXw4BO+wPpLQk0w4WkRBMB5MG8uTsjZOAsB/eLFeSUIxRO/emQgREoRlDz7GL1Vn0nTTWWVM/E/FzeCrGORbprin02t1LlWi0CXzUz/5x/gYib+Dp0IvPh6wBGV+3kXZneNPJ+YmYMeQviyO0AbA18rQLO/J22uIK4caCByTwnw1DzVESu1VO+3DPBgUEJXixFRvp/YJCFa2C08vdJ94USg585yJjYf934CiSmOYAnMgg0HKtjw==
  • 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: Fri, 04 Nov 2022 10:08:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true

Current EFI boot services support of Arm64 could not
work well for Armv8-R64 system that only has MPU in
EL2. That is because EFI boot services may need some
relocation support or partial PIE/PIC support. But
these will not be supported in the initial stage of
porting Xen to MPU systems. So in this patch, we
disable EFI boot services support for Arm MPU systems.

Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
---
 xen/arch/arm/Kconfig      | 2 +-
 xen/arch/arm/arm64/head.S | 8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index 1fe5faf847..ad592367bd 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -7,7 +7,7 @@ config ARM_64
        def_bool y
        depends on !ARM_32
        select 64BIT
-       select ARM_EFI
+       select ARM_EFI if !HAS_MPU
        select HAS_FAST_MULTIPLY
 
 config ARM
diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
index ad014716db..ccedf20dc7 100644
--- a/xen/arch/arm/arm64/head.S
+++ b/xen/arch/arm/arm64/head.S
@@ -172,8 +172,10 @@ efi_head:
         .byte   0x52
         .byte   0x4d
         .byte   0x64
-        .long   pe_header - efi_head        /* Offset to the PE header. */
-
+#ifndef CONFIG_ARM_EFI
+        .long   0                    /* 0 means no PE header. */
+#else
+        .long   pe_header - efi_head /* Offset to the PE header. */
         /*
          * Add the PE/COFF header to the file.  The address of this header
          * is at offset 0x3c in the file, and is part of Linux "Image"
@@ -279,6 +281,8 @@ section_table:
         .short  0                /* NumberOfLineNumbers  (0 for executables) */
         .long   0xe0500020       /* Characteristics (section flags) */
         .align  5
+#endif /* CONFIG_ARM_EFI */
+
 real_start:
         /* BSS should be zeroed when booting without EFI */
         mov   x26, #0                /* x26 := skip_zero_bss */
-- 
2.25.1




 


Rackspace

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