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

[XEN v2 09/11] xen/arm: Introduce ARM_PA_32 to support 32 bit physical address


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
  • Date: Tue, 17 Jan 2023 17:43:56 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.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=ALYkcOUMY24lQgvkESpS4YUl/I55d3ApiAMvpoBf2ic=; b=X6iMR4or+kTbuc13hnjlxl0EzqeL9jZP5R8p6LXbDdNYvjvxS1w37jNheSBr5dMsMpzmFli1+xEw6etNE2V86XGBWGV/Oqt/cA/DMNrmXml9MjQX6QLwMVsxIHZsQyYKeToH+lfdkt/Bw7akIU8UNliLNCdMuHWPMZmdGs0rsxnBhPGQ51YOrtVcnlsh1pMPmakh8AHQX6JMC94P8NQkkho/MPoOoht3pVo9Gmbhu/HjqTGpeTMaojj8/T+5wjtuh2GEwPNtIVdJoSC629sFIeZWskAIRBHF7JFjNvSJ20XySFuucU3jxFdmguBhPyLDAyOw3fPoXEg+HGkf1Dsjbw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fyKg/SiuLnNtr++MQj90BxMCE6x/hgp7vK5l4EdSPCwZxEvQ+sU93aJq3SdSYZ+OK4u9lHdkUrgtQogzD48IwtHu/ELjpg04fM85kxQe22JGtdu+y/WqCmTMOimWNd7n/y/T82aPcET0Leu4uhnfcn6I5ifBeKoNWdbYHxtmqhMz67x+ZP9U3PPNnnLsAnYokiqiELC6PTPycYTKEp7R1Bo270rlG5MA2ChOhv6LMnjaN37z7XZfexjWQXGE76szgJTI+L0+t8j/FOP8etVOuIOsRlqLXUruggvCppWQACh+ORFmQGia8NGlFUm9Jb64VqRHuP0gki6hJkDlAMZTLg==
  • Cc: <sstabellini@xxxxxxxxxx>, <stefano.stabellini@xxxxxxx>, <julien@xxxxxxx>, <Volodymyr_Babchuk@xxxxxxxx>, <bertrand.marquis@xxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
  • Delivery-date: Tue, 17 Jan 2023 17:45:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

We have introduced a new config option to support 32 bit physical address.
By default, it is disabled.
ARM_PA_32 cannot be enabled on ARM_64 as the memory management unit works
on 48bit physical addresses.
On ARM_32, it can be used on systems where large page address extension is
not supported.

Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
---
Changes from -

v1 - 1. No changes.

 xen/arch/arm/Kconfig                 | 9 +++++++++
 xen/arch/arm/include/asm/page-bits.h | 2 ++
 xen/arch/arm/include/asm/types.h     | 7 +++++++
 3 files changed, 18 insertions(+)

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index 239d3aed3c..aeb0f7252e 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -39,6 +39,15 @@ config ACPI
 config ARM_EFI
        bool
 
+config ARM_PA_32
+       bool "32 bit Physical Address"
+       depends on ARM_32
+       default n
+       ---help---
+
+         Support 32 bit physical addresses.
+         If unsure, say N
+
 config GICV3
        bool "GICv3 driver"
        depends on !NEW_VGIC
diff --git a/xen/arch/arm/include/asm/page-bits.h 
b/xen/arch/arm/include/asm/page-bits.h
index 5d6477e599..8f4dcebcfd 100644
--- a/xen/arch/arm/include/asm/page-bits.h
+++ b/xen/arch/arm/include/asm/page-bits.h
@@ -5,6 +5,8 @@
 
 #ifdef CONFIG_ARM_64
 #define PADDR_BITS              48
+#elif CONFIG_ARM_PA_32
+#define PADDR_BITS              32
 #else
 #define PADDR_BITS              40
 #endif
diff --git a/xen/arch/arm/include/asm/types.h b/xen/arch/arm/include/asm/types.h
index 083acbd151..f9595b9098 100644
--- a/xen/arch/arm/include/asm/types.h
+++ b/xen/arch/arm/include/asm/types.h
@@ -37,9 +37,16 @@ typedef signed long long s64;
 typedef unsigned long long u64;
 typedef u32 vaddr_t;
 #define PRIvaddr PRIx32
+#if defined(CONFIG_ARM_PA_32)
+typedef u32 paddr_t;
+#define INVALID_PADDR (~0UL)
+#define PADDR_SHIFT BITS_PER_LONG
+#define PRIpaddr PRIx32
+#else
 typedef u64 paddr_t;
 #define INVALID_PADDR (~0ULL)
 #define PRIpaddr "016llx"
+#endif
 typedef u32 register_t;
 #define PRIregister "08x"
 #elif defined (CONFIG_ARM_64)
-- 
2.17.1




 


Rackspace

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