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

[PATCH v1 1/4] xen/arm: mpu: Introduce choice between MMU and MPU


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
  • Date: Fri, 23 Aug 2024 17:31:24 +0100
  • 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 (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=Nx/VzbkSyae2KVO1umnmm7DGWwCikaMWrTbOm87/DJ8=; b=PYmUhQ+VnfEE/IsznSkowyTVxjQEDqLEqxKcUJ8yzLcJ/pZBqsYrJdJhH2R9n9pGf9YEAS3f+kuoEADMGB+NPihvoeJfy9jGegNdtFivCjuMfOWGJtZUqKOMfh2w48RIEDIq5XA76DhIkZNYF0cgIQuf5PMUcKpAupztKxFL3YofadCEtwFHUQuVDJ1bgiXR0CX9A4OlhnahbI9a49SxSxWNOBHrNt2c2aWTOAFNOBNjEdRr50fq25QsumUkIoyDewZvap7xjhMJwX64vivf6Sm9Ulf3A829UrbRuNWic3DozqfcqyZGBPohqh8MlVyHNE8Xbl1f5leNheRt/DtVAw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lQ4k1SLFw4OR+hAEQv1VLlhoG38JSAWdEWDYMipMNMOl8pbqvZdmRjVW6f82is2QPvtm0aSM3xYmFgXHAhNiRVxEedRI6zhN8kxgpt0HmlpJnsA0pSt9RdA32qr5vqTyBflepRtmX0ghYZyUQSiEtLD6mVfvAnpX+OR3v9ucK9ifxtBNs+2T4CQEtdM+3x8u4eWz3FfYQ+Ot3EP4P2hnYAoAwWbHbTLPsf2sL7LQHSXIUqc7rqdWP54OdRSwzz4Wn/M+p58dsJsgtzvAPq/1UENd33rJH0WNVX31O15XuaNQkM+78k1QC1TF91QyvriKaCgzuyyz7FOwAIcZnOkLLA==
  • Cc: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Fri, 23 Aug 2024 16:31:55 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

There are features in the forthcoming patches which are dependent on
MPU. For eg fixed start address.
Also, some of the Xen features (eg STATIC_MEMORY) will be selected
by the MPU configuration.

Thus, this patch introduces a choice between MMU and MPU for the type
of memory management system. By default, MMU is selected.
All the current platforms are now made dependent on MMU.

Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
---
 xen/arch/arm/Kconfig           | 17 ++++++++++++++++-
 xen/arch/arm/platforms/Kconfig |  2 +-
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index 323c967361..686948cefd 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -58,10 +58,25 @@ config PADDR_BITS
        default 40 if ARM_PA_BITS_40
        default 48 if ARM_64
 
+choice
+       prompt "Memory management system"
+       default MMU if ARM
+       help
+         User can choose between the different forms of memory management 
system.
+         Most of the Arm based systems support MMU.
+
 config MMU
-       def_bool y
+       bool "MMU"
        select HAS_PMAP
        select HAS_VMAP
+       help
+         Memory management unit is supported on most Arm based systems.
+
+config MPU
+       bool "MPU"
+       help
+         Memory protection unit is supported on some Cortex-R systems.
+endchoice
 
 source "arch/Kconfig"
 
diff --git a/xen/arch/arm/platforms/Kconfig b/xen/arch/arm/platforms/Kconfig
index 76f7e76b1b..02322c259c 100644
--- a/xen/arch/arm/platforms/Kconfig
+++ b/xen/arch/arm/platforms/Kconfig
@@ -1,5 +1,5 @@
 choice
-       prompt "Platform Support"
+       prompt "Platform Support" if MMU
        default ALL_PLAT
        help
        Choose which hardware platform to enable in Xen.
-- 
2.25.1




 


Rackspace

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