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

[PATCH v4 02/13] xen/arm: Introduce 'choice' for memory system architecture



There are two types of memory system architectures available for
Arm-based systems, namely the Virtual Memory System Architecture (VMSA)
and the Protected Memory System Architecture (PMSA). According to
ARM DDI 0487G.a, A VMSA provides a Memory Management Unit (MMU) that
controls address translation, access permissions, and memory attribute
determination and checking, for memory accesses made by the PE. And
refer to ARM DDI 0600A.c, the PMSA supports a unified memory protection
scheme where an Memory Protection Unit (MPU) manages instruction and
data access. Currently, Xen only suuports VMSA.

As a preparation of the Xen MPU (PMSA) support. Introduce a Kconfig
choice under the "Architecture Features" menu for user to choose the
memory system architecture for the system. Since currently only VMSA
is supported, only add the bool CONFIG_HAS_MMU to keep consistent with
the default behavior. User can choose either VMSA or PMSA but not both
in the future after PMSA/MPU is supported in Xen.

Suggested-by: Julien Grall <jgrall@xxxxxxxxxx>
Signed-off-by: Henry Wang <Henry.Wang@xxxxxxx>
---
v4:
- Completely rework "[v3,06/52] xen/arm: introduce CONFIG_HAS_MMU"
---
 xen/arch/arm/Kconfig | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index fd57a82dd2..0e38e9ba17 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -59,6 +59,20 @@ config PADDR_BITS
        default 40 if ARM_PA_BITS_40
        default 48 if ARM_64
 
+choice
+       prompt "Memory system architecture"
+       default HAS_MMU
+       help
+         User can choose the memory system architecture.
+         A Virtual Memory System Architecture (VMSA) provides a Memory 
Management
+         Unit (MMU) that controls address translation, access permissions, and
+         memory attribute determination and checking, for memory accesses made 
by
+         the PE.
+
+config HAS_MMU
+       bool "MMU for a VMSA system"
+endchoice
+
 source "arch/Kconfig"
 
 config ACPI
-- 
2.25.1




 


Rackspace

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