From: Ayan Kumar Halder <ayan.kumar.halder@amd.com>
To: <xen-devel@lists.xenproject.org>
Cc: Ayan Kumar Halder <ayan.kumar.halder@amd.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Julien Grall <julien@xen.org>,
Bertrand Marquis <bertrand.marquis@arm.com>,
Michal Orzel <michal.orzel@amd.com>,
"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>
Subject: [PATCH 1/5] xen/arm: mpu: Ensure that the page size is 4KB (arm32)
Date: Tue, 4 Feb 2025 19:23:53 +0000 [thread overview]
Message-ID: <20250204192357.1862264-2-ayan.kumar.halder@amd.com> (raw)
In-Reply-To: <20250204192357.1862264-1-ayan.kumar.halder@amd.com>
Similar to "xen/arm: mpu: Define Xen start address for MPU systems", added
a build assertion to ensure that the page size is 4KB.
Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@amd.com>
---
xen/arch/arm/arm32/Makefile | 1 +
xen/arch/arm/arm32/mpu/Makefile | 1 +
xen/arch/arm/arm32/mpu/mm.c | 15 +++++++++++++++
3 files changed, 17 insertions(+)
create mode 100644 xen/arch/arm/arm32/mpu/Makefile
create mode 100644 xen/arch/arm/arm32/mpu/mm.c
diff --git a/xen/arch/arm/arm32/Makefile b/xen/arch/arm/arm32/Makefile
index 40a2b4803f..537969d753 100644
--- a/xen/arch/arm/arm32/Makefile
+++ b/xen/arch/arm/arm32/Makefile
@@ -1,5 +1,6 @@
obj-y += lib/
obj-$(CONFIG_MMU) += mmu/
+obj-$(CONFIG_MPU) += mpu/
obj-$(CONFIG_EARLY_PRINTK) += debug.o
obj-y += domctl.o
diff --git a/xen/arch/arm/arm32/mpu/Makefile b/xen/arch/arm/arm32/mpu/Makefile
new file mode 100644
index 0000000000..b18cec4836
--- /dev/null
+++ b/xen/arch/arm/arm32/mpu/Makefile
@@ -0,0 +1 @@
+obj-y += mm.o
diff --git a/xen/arch/arm/arm32/mpu/mm.c b/xen/arch/arm/arm32/mpu/mm.c
new file mode 100644
index 0000000000..0b8748e575
--- /dev/null
+++ b/xen/arch/arm/arm32/mpu/mm.c
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <xen/lib.h>
+#include <xen/init.h>
+#include <xen/sizes.h>
+
+static void __init __maybe_unused build_assertions(void)
+{
+ /*
+ * Unlike MMU, MPU does not use pages for translation. However, we continue
+ * to use PAGE_SIZE to denote 4KB. This is so that the existing memory
+ * management based on pages, continue to work for now.
+ */
+ BUILD_BUG_ON(PAGE_SIZE != SZ_4K);
+}
--
2.25.1
next prev parent reply other threads:[~2025-02-04 19:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-04 19:23 [PATCH 0/5] Enable early bootup of AArch32 MPU systems Ayan Kumar Halder
2025-02-04 19:23 ` Ayan Kumar Halder [this message]
2025-02-06 14:35 ` [PATCH 1/5] xen/arm: mpu: Ensure that the page size is 4KB (arm32) Luca Fancellu
2025-02-25 16:16 ` Julien Grall
2025-02-04 19:23 ` [PATCH 2/5] xen/arm: mpu: Enclose access to MMU specific registers under CONFIG_MMU (arm32) Ayan Kumar Halder
2025-02-06 14:48 ` Luca Fancellu
2025-02-25 16:24 ` Julien Grall
2025-02-04 19:23 ` [PATCH 3/5] xen/arm: mpu: Move some of the definitions to common file Ayan Kumar Halder
2025-02-06 15:01 ` Luca Fancellu
2025-02-25 22:08 ` Julien Grall
2025-02-26 8:28 ` Luca Fancellu
2025-02-28 9:22 ` Julien Grall
2025-02-28 10:34 ` Ayan Kumar Halder
2025-03-04 13:09 ` Luca Fancellu
2025-02-04 19:23 ` [PATCH 4/5] xen/arm: mpu: Create boot-time MPU protection regions (arm32) Ayan Kumar Halder
2025-02-06 15:29 ` Luca Fancellu
2025-02-06 17:34 ` Ayan Kumar Halder
2025-02-04 19:23 ` [PATCH 5/5] xen/arm: mpu: Implement a dummy enable_secondary_cpu_mm (arm32) Ayan Kumar Halder
2025-02-06 15:30 ` Luca Fancellu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250204192357.1862264-2-ayan.kumar.halder@amd.com \
--to=ayan.kumar.halder@amd.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=bertrand.marquis@arm.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.