Skip to contentSkip to conversation

Enable early bootup of Armv8-R AArch32 systems

PATCH In review Ayan Kumar Halder 4 participants 9 messages Apr 14, 2025 – Apr 16, 2025

lore
Share & tools
lore
#0 lore raw

v7 cover Enable early bootup of Armv8-R AArch32 systems

Enable early booting of Armv8-R AArch32 based systems.

Added Luca's R-b in all the patches.
Added Michal's R-b in patch 1 and 3.

Ayan Kumar Halder (3):
xen/arm: Move some of the functions to common file xen/arm32: Create the same boot-time MPU regions as arm64 xen/arm32: mpu: Stubs to build MPU for arm32

 xen/arch/arm/arm32/Makefile              |   1 +
 xen/arch/arm/arm32/mpu/Makefile          |   3 +
 xen/arch/arm/arm32/mpu/head.S            | 104 +++++++++++++++++++++++
 xen/arch/arm/arm32/mpu/p2m.c             |  19 +++++
 xen/arch/arm/arm32/mpu/smpboot.c         |  26 ++++++
 xen/arch/arm/arm64/mpu/head.S            |  78 +----------------
 xen/arch/arm/include/asm/arm32/sysregs.h |  13 ++-
 xen/arch/arm/include/asm/arm64/sysregs.h |  13 +++
 xen/arch/arm/include/asm/cpregs.h        |   2 +
 xen/arch/arm/include/asm/mm.h            |   9 +-
 xen/arch/arm/include/asm/mmu/mm.h        |   7 ++
 xen/arch/arm/include/asm/mpu/cpregs.h    |  32 +++++++
 xen/arch/arm/include/asm/mpu/mm.h        |   5 ++
 xen/arch/arm/include/asm/mpu/regions.inc |  79 +++++++++++++++++
 xen/arch/arm/mpu/Makefile                |   1 +
 xen/arch/arm/mpu/domain_page.c           |  45 ++++++++++
 16 files changed, 350 insertions(+), 87 deletions(-)
 create mode 100644 xen/arch/arm/arm32/mpu/Makefile
 create mode 100644 xen/arch/arm/arm32/mpu/head.S
 create mode 100644 xen/arch/arm/arm32/mpu/p2m.c
 create mode 100644 xen/arch/arm/arm32/mpu/smpboot.c
 create mode 100644 xen/arch/arm/include/asm/mpu/cpregs.h
 create mode 100644 xen/arch/arm/include/asm/mpu/regions.inc
 create mode 100644 xen/arch/arm/mpu/domain_page.c
Signature · 1 line
2.25.1
#1 lore raw

PATCH v7 1/3 xen/arm: Move some of the functions to common file

regions.inc is added to hold the common earlyboot MPU regions configurations between arm64 and arm32.

prepare_xen_region, fail_insufficient_regions() will be used by both arm32 and arm64. Thus, they have been moved to regions.inc.

*_PRBAR are moved to arm64/sysregs.h.
*_PRLAR are moved to regions.inc as they are common between arm32 and arm64.

Introduce WRITE_SYSREG_ASM to write to the system registers from regions.inc.

---

Changes from

v1 -

1. enable_mpu() now sets HMAIR{0,1} registers. This is similar to what is being done in enable_mmu(). All the mm related configurations happen in this function.

2. Fixed some typos.

v2 -
1. Extracted the arm64 head.S functions/macros in a common file.

v3 -
1. Moved *_PRLAR are moved to prepare_xen_region.inc

2. enable_boot_cpu_mm() is preserved in mpu/head.S.

3. STORE_SYSREG is renamed as WRITE_SYSREG_ASM()

4. LOAD_SYSREG is removed.

5. No need to save/restore lr in enable_boot_cpu_mm(). IOW, keep it as it was in the original code.

v4 -
1. Rename prepare_xen_region.inc to common.inc

2. enable_secondary_cpu_mm() is moved back to mpu/head.S.

v5 -
1. Rename common.inc to regions.inc.

2. WRITE_SYSREG_ASM() in enclosed within #ifdef __ASSEMBLY__.

v6 -
1. Add Michal's R-b and Luca's T-b.

 xen/arch/arm/arm64/mpu/head.S            | 78 +----------------------
 xen/arch/arm/include/asm/arm64/sysregs.h | 13 ++++
 xen/arch/arm/include/asm/mpu/regions.inc | 79 ++++++++++++++++++++++++
 3 files changed, 93 insertions(+), 77 deletions(-)
 create mode 100644 xen/arch/arm/include/asm/mpu/regions.inc
xen/arch/arm/arm64/mpu/head.S +1 -77
index ed01993d85..6d336cafbb 100644
@@ -3,83 +3,7 @@
  * Start-of-day code for an Armv8-R MPU system.
  */
 
-#include <asm/early_printk.h>
-#include <asm/mpu.h>
-
-/* Backgroud region enable/disable */
-#define SCTLR_ELx_BR    BIT(17, UL)
-
-#define REGION_TEXT_PRBAR       0x38    /* SH=11 AP=10 XN=00 */
-#define REGION_RO_PRBAR         0x3A    /* SH=11 AP=10 XN=10 */
-#define REGION_DATA_PRBAR       0x32    /* SH=11 AP=00 XN=10 */
-#define REGION_DEVICE_PRBAR     0x22    /* SH=10 AP=00 XN=10 */
-
-#define REGION_NORMAL_PRLAR     0x0f    /* NS=0 ATTR=111 EN=1 */
-#define REGION_DEVICE_PRLAR     0x09    /* NS=0 ATTR=100 EN=1 */
-
-/*
- * Macro to prepare and set a EL2 MPU memory region.
- * We will also create an according MPU memory region entry, which
- * is a structure of pr_t,  in table \prmap.
- *
- * sel:         region selector
- * base:        reg storing base address
- * limit:       reg storing limit address
- * prbar:       store computed PRBAR_EL2 value
- * prlar:       store computed PRLAR_EL2 value
- * maxcount:    maximum number of EL2 regions supported
- * attr_prbar:  PRBAR_EL2-related memory attributes. If not specified it will be
- *              REGION_DATA_PRBAR
- * attr_prlar:  PRLAR_EL2-related memory attributes. If not specified it will be
- *              REGION_NORMAL_PRLAR
- *
- * Preserves \maxcount
- * Output:
- *  \sel: Next available region selector index.
- * Clobbers \base, \limit, \prbar, \prlar
- *
- * Note that all parameters using registers should be distinct.
- */
-.macro prepare_xen_region, sel, base, limit, prbar, prlar, maxcount, attr_prbar=REGION_DATA_PRBAR, attr_prlar=REGION_NORMAL_PRLAR
-    /* Check if the region is empty */
-    cmp   \base, \limit
-    beq   1f
-
-    /* Check if the number of regions exceeded the count specified in MPUIR_EL2 */
-    cmp   \sel, \maxcount
-    bge   fail_insufficient_regions
-
-    /* Prepare value for PRBAR_EL2 reg and preserve it in \prbar.*/
-    and   \base, \base, #MPU_REGION_MASK
-    mov   \prbar, #\attr_prbar
-    orr   \prbar, \prbar, \base
-
-    /* Limit address should be inclusive */
-    sub   \limit, \limit, #1
-    and   \limit, \limit, #MPU_REGION_MASK
-    mov   \prlar, #\attr_prlar
-    orr   \prlar, \prlar, \limit
-
-    msr   PRSELR_EL2, \sel
-    isb
-    msr   PRBAR_EL2, \prbar
-    msr   PRLAR_EL2, \prlar
-    dsb   sy
-    isb
-
-    add   \sel, \sel, #1
-
-1:
-.endm
-
-/*
- * Failure caused due to insufficient MPU regions.
- */
-FUNC_LOCAL(fail_insufficient_regions)
-    PRINT("- Selected MPU region is above the implemented number in MPUIR_EL2 -\r\n")
-1:  wfe
-    b   1b
-END(fail_insufficient_regions)
+#include <asm/mpu/regions.inc>
 
 /*
  * Enable EL2 MPU and data cache
xen/arch/arm/include/asm/arm64/sysregs.h +13 -0
index b593e4028b..7440d495e4 100644
@@ -462,6 +462,17 @@
 #define ZCR_ELx_LEN_SIZE             9
 #define ZCR_ELx_LEN_MASK             0x1ff
 
+#define REGION_TEXT_PRBAR       0x38    /* SH=11 AP=10 XN=00 */
+#define REGION_RO_PRBAR         0x3A    /* SH=11 AP=10 XN=10 */
+#define REGION_DATA_PRBAR       0x32    /* SH=11 AP=00 XN=10 */
+#define REGION_DEVICE_PRBAR     0x22    /* SH=10 AP=00 XN=10 */
+
+#ifdef __ASSEMBLY__
+
+#define WRITE_SYSREG_ASM(v, name) "msr " __stringify(name,) #v
+
+#else /* __ASSEMBLY__ */
+
 /* Access to system registers */
 
 #define WRITE_SYSREG64(v, name) do {                    \
@@ -481,6 +492,8 @@
 #define WRITE_SYSREG_LR(v, index)  WRITE_SYSREG(v, ICH_LR_REG(index))
 #define READ_SYSREG_LR(index)      READ_SYSREG(ICH_LR_REG(index))
 
+#endif /* !__ASSEMBLY__ */
+
 #endif /* _ASM_ARM_ARM64_SYSREGS_H */
 
 /*
xen/arch/arm/include/asm/mpu/regions.inc new file +79 -0

79 lines not on this page · raw message

Signature · 1 line
2.25.1
#2 lore raw

Re: [PATCH v7 1/3] xen/arm: Move some of the functions to common file

Quoted 5 lines · Ayan Kumar Halder

regions.inc is added to hold the common earlyboot MPU regions configurations between arm64 and arm32.

prepare_xen_region, fail_insufficient_regions() will be used by both arm32 and arm64. Thus, they have been moved to regions.inc.

Despite my numerous remarks about the commit message style, you did not change it in this patch even though you were respinning the series. For the future, please fix remarks in all the patches.

The series is now reviewed. I'll wait a day before committing.

~Michal

#3 lore raw

PATCH v7 2/3 xen/arm32: Create the same boot-time MPU regions as arm64

In reply to Ayan Kumar Halder

Create Boot-time MPU protection regions (similar to Armv8-R AArch64) for Armv8-R AArch32.
Also, defined *_PRBAR macros for arm32. The only difference from arm64 is that XN is 1-bit for arm32.
Define the system registers and macros in mpu/cpregs.h.

Introduce WRITE_SYSREG_ASM() to write to system registers in assembly.

---
Changes from

v1 -

1. enable_mpu() now sets HMAIR{0,1} registers. This is similar to what is being done in enable_mmu(). All the mm related configurations happen in this function.

2. Fixed some typos.

v2 -
1. Include the common prepare_xen_region.inc in head.S.

2. Define LOAD_SYSREG()/STORE_SYSREG() for arm32.

v3 -
1. Rename STORE_SYSREG() as WRITE_SYSREG_ASM()

2. enable_boot_cpu_mm() is defined in head.S

v4 -
1. *_PRBAR is moved to arm32/sysregs.h.

2. MPU specific CP15 system registers are defined in mpu/cpregs.h.

v5 -
1. WRITE_SYSREG_ASM is enclosed within #ifdef __ASSEMBLY__

2. enable_mpu() clobbers r0 only.

3. Definitions in mpu/cpregs.h in enclosed within ARM_32.

4. Removed some #ifdefs and style changes.

v6 -
1. Coding style issues.

2. Kept Luca's R-b and T-b as the changes should not impact the behavior.

3. Added alias and renamed the sysregs as it is named in the specs.

 xen/arch/arm/arm32/Makefile              |   1 +
 xen/arch/arm/arm32/mpu/Makefile          |   1 +
 xen/arch/arm/arm32/mpu/head.S            | 104 +++++++++++++++++++++++
 xen/arch/arm/include/asm/arm32/sysregs.h |  13 ++-
 xen/arch/arm/include/asm/cpregs.h        |   2 +
 xen/arch/arm/include/asm/mpu/cpregs.h    |  32 +++++++
 6 files changed, 151 insertions(+), 2 deletions(-)
 create mode 100644 xen/arch/arm/arm32/mpu/Makefile
 create mode 100644 xen/arch/arm/arm32/mpu/head.S
 create mode 100644 xen/arch/arm/include/asm/mpu/cpregs.h
xen/arch/arm/arm32/Makefile +1 -0
index 40a2b4803f..537969d753 100644
@@ -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
xen/arch/arm/arm32/mpu/Makefile new file +1 -0
new file mode 100644
index 0000000000..3340058c08
@@ -0,0 +1 @@
+obj-y += head.o
xen/arch/arm/arm32/mpu/head.S new file +104 -0

104 lines not on this page · raw message

xen/arch/arm/include/asm/arm32/sysregs.h +11 -2
index 22871999af..ef1a870fd6 100644
@@ -20,7 +20,16 @@
  * uses r0 as a placeholder register. */
 #define CMD_CP32(name...)      "mcr " __stringify(CP32(r0, name)) ";"
 
-#ifndef __ASSEMBLY__
+#define REGION_TEXT_PRBAR       0x18    /* SH=11 AP=10 XN=0 */
+#define REGION_RO_PRBAR         0x1D    /* SH=11 AP=10 XN=1 */
+#define REGION_DATA_PRBAR       0x19    /* SH=11 AP=00 XN=1 */
+#define REGION_DEVICE_PRBAR     0x11    /* SH=10 AP=00 XN=1 */
+
+#ifdef __ASSEMBLY__
+
+#define WRITE_SYSREG_ASM(v, name) mcr CP32(v, name)
+
+#else /* __ASSEMBLY__ */
 
 /* C wrappers */
 #define READ_CP32(name...) ({                                   \
@@ -84,7 +93,7 @@
 /* MVFR2 is not defined on ARMv7 */
 #define MVFR2_MAYBE_UNDEFINED
 
-#endif /* __ASSEMBLY__ */
+#endif /* !__ASSEMBLY__ */
 
 #endif /* __ASM_ARM_ARM32_SYSREGS_H */
 /*
xen/arch/arm/include/asm/cpregs.h +2 -0
index aec9e8f329..a7503a190f 100644
@@ -1,6 +1,8 @@
 #ifndef __ASM_ARM_CPREGS_H
 #define __ASM_ARM_CPREGS_H
 
+#include <asm/mpu/cpregs.h>
+
 /*
  * AArch32 Co-processor registers.
  *
xen/arch/arm/include/asm/mpu/cpregs.h new file +32 -0
new file mode 100644
index 0000000000..d5cd0e04d5
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef __ARM_MPU_CPREGS_H
+#define __ARM_MPU_CPREGS_H
+
+/* CP15 CR0: MPU Type Register */
+#define HMPUIR          p15,4,c0,c0,4
+
+/* CP15 CR6: MPU Protection Region Base/Limit/Select Address Register */
+#define HPRSELR         p15,4,c6,c2,1
+#define HPRBAR          p15,4,c6,c3,0
+#define HPRLAR          p15,4,c6,c8,1
+
+/* Aliases of AArch64 names for use in common code */
+#ifdef CONFIG_ARM_32
+/* Alphabetically... */
+#define MPUIR_EL2       HMPUIR
+#define PRBAR_EL2       HPRBAR
+#define PRLAR_EL2       HPRLAR
+#define PRSELR_EL2      HPRSELR
+#endif /* CONFIG_ARM_32 */
+
+#endif /* __ARM_MPU_CPREGS_H */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
Signature · 1 line
2.25.1
Reviewed-by on v7 2/3
#4 lore raw

Re: [PATCH v7 2/3] xen/arm32: Create the same boot-time MPU regions as arm64

Quoted 42 lines · Ayan Kumar Halder

Create Boot-time MPU protection regions (similar to Armv8-R AArch64) for Armv8-R AArch32.
Also, defined *_PRBAR macros for arm32. The only difference from arm64 is that XN is 1-bit for arm32.
Define the system registers and macros in mpu/cpregs.h.

Introduce WRITE_SYSREG_ASM() to write to system registers in assembly.

---
Changes from

v1 -

1. enable_mpu() now sets HMAIR{0,1} registers. This is similar to what is being done in enable_mmu(). All the mm related configurations happen in this function.

2. Fixed some typos.

v2 -
1. Include the common prepare_xen_region.inc in head.S.

2. Define LOAD_SYSREG()/STORE_SYSREG() for arm32.

v3 -
1. Rename STORE_SYSREG() as WRITE_SYSREG_ASM()

2. enable_boot_cpu_mm() is defined in head.S

v4 -
1. *_PRBAR is moved to arm32/sysregs.h.

2. MPU specific CP15 system registers are defined in mpu/cpregs.h.

v5 -
1. WRITE_SYSREG_ASM is enclosed within #ifdef __ASSEMBLY__

2. enable_mpu() clobbers r0 only.

Quoted 8 lines

3. Definitions in mpu/cpregs.h in enclosed within ARM_32.

4. Removed some #ifdefs and style changes.

v6 -
1. Coding style issues.

2. Kept Luca's R-b and T-b as the changes should not impact the behavior.

Note for the future: Especially for T-b, it's better to drop the tags because the series has not been tested in its current shape.

~Michal

#5 lore raw

PATCH v7 3/3 xen/arm32: mpu: Stubs to build MPU for arm32

In reply to Ayan Kumar Halder

Add stubs to enable compilation.

is_xen_heap_page() and is_xen_heap_mfn() are not implemented for arm32 MPU. Thus, introduce the stubs for these functions in asm/mpu/mm.h and move the original code to asm/mmu/mm.h (as it is used for arm32 MMU based system).

---
Changes from :-

v1, v2 -
1. New patch introduced in v3.
2. Should be applied on top of
https://patchwork.kernel.org/project/xen-devel/cover/[email protected]/

v3 -
1. Add stubs for map_domain_page() and similar functions.

2. 'BUG_ON("unimplemented")' is kept in all the stubs.

v4 -
1. is_xen_heap_mfn() macros are defined across mpu/mm.h (ARM32 specific) , mmu/mm.h (ARM32 specific) and asm/mm.h (ARM64 specific)

2. s/(void*)0/NULL

v5 -
1. Add the headers for smpboot.c, domain_page.c and p2m.c.

2. Inclusion of headers and makefile entries are sorted alphabetically.

3. Update the commit message and style changes.

v6 -
1. Add R-b and T-b.

 xen/arch/arm/arm32/mpu/Makefile   |  2 ++
 xen/arch/arm/arm32/mpu/p2m.c      | 19 +++++++++++++
 xen/arch/arm/arm32/mpu/smpboot.c  | 26 ++++++++++++++++++
 xen/arch/arm/include/asm/mm.h     |  9 +------
 xen/arch/arm/include/asm/mmu/mm.h |  7 +++++
 xen/arch/arm/include/asm/mpu/mm.h |  5 ++++
 xen/arch/arm/mpu/Makefile         |  1 +
 xen/arch/arm/mpu/domain_page.c    | 45 +++++++++++++++++++++++++++++++
 8 files changed, 106 insertions(+), 8 deletions(-)
 create mode 100644 xen/arch/arm/arm32/mpu/p2m.c
 create mode 100644 xen/arch/arm/arm32/mpu/smpboot.c
 create mode 100644 xen/arch/arm/mpu/domain_page.c
xen/arch/arm/arm32/mpu/Makefile +2 -0
index 3340058c08..cf0540aecc 100644
@@ -1 +1,3 @@
 obj-y += head.o
+obj-y += p2m.o
+obj-y += smpboot.o
xen/arch/arm/arm32/mpu/p2m.c new file +19 -0
new file mode 100644
index 0000000000..3d9abe4400
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <asm/p2m.h>
+#include <xen/bug.h>
+#include <xen/init.h>
+
+void __init setup_virt_paging(void)
+{
+    BUG_ON("unimplemented");
+}
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
xen/arch/arm/arm32/mpu/smpboot.c new file +26 -0
new file mode 100644
index 0000000000..5090f443f5
@@ -0,0 +1,26 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <xen/bug.h>
+#include <xen/errno.h>
+#include <xen/mm.h>
+#include <xen/stdbool.h>
+
+int prepare_secondary_mm(int cpu)
+{
+    BUG_ON("unimplemented");
+    return -EINVAL;
+}
+
+void update_boot_mapping(bool enable)
+{
+    BUG_ON("unimplemented");
+}
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
xen/arch/arm/include/asm/mm.h +1 -8
index fbffaccef4..5b67c0f8bb 100644
@@ -170,14 +170,7 @@ struct page_info
 #define _PGC_need_scrub   _PGC_allocated
 #define PGC_need_scrub    PGC_allocated
 
-#ifdef CONFIG_ARM_32
-#define is_xen_heap_page(page) is_xen_heap_mfn(page_to_mfn(page))
-#define is_xen_heap_mfn(mfn) ({                                 \
-    unsigned long mfn_ = mfn_x(mfn);                            \
-    (mfn_ >= mfn_x(directmap_mfn_start) &&                      \
-     mfn_ < mfn_x(directmap_mfn_end));                          \
-})
-#else
+#ifdef CONFIG_ARM_64
 #define is_xen_heap_page(page) ((page)->count_info & PGC_xen_heap)
 #define is_xen_heap_mfn(mfn) \
     (mfn_valid(mfn) && is_xen_heap_page(mfn_to_page(mfn)))
xen/arch/arm/include/asm/mmu/mm.h +7 -0
index caba987edc..7f4d59137d 100644
@@ -27,6 +27,13 @@ extern unsigned long directmap_base_pdx;
 })
 
 #ifdef CONFIG_ARM_32
+#define is_xen_heap_page(page) is_xen_heap_mfn(page_to_mfn(page))
+#define is_xen_heap_mfn(mfn) ({                                 \
+    unsigned long mfn_ = mfn_x(mfn);                            \
+    (mfn_ >= mfn_x(directmap_mfn_start) &&                      \
+     mfn_ < mfn_x(directmap_mfn_end));                          \
+})
+
 /**
  * Find the virtual address corresponding to a machine address
  *
xen/arch/arm/include/asm/mpu/mm.h +5 -0
index 86f33d9836..bfd840fa5d 100644
@@ -13,6 +13,11 @@ extern struct page_info *frame_table;
 
 #define virt_to_maddr(va) ((paddr_t)((vaddr_t)(va) & PADDR_MASK))
 
+#ifdef CONFIG_ARM_32
+#define is_xen_heap_page(page) ({ BUG_ON("unimplemented"); false; })
+#define is_xen_heap_mfn(mfn) ({ BUG_ON("unimplemented"); false; })
+#endif
+
 /* On MPU systems there is no translation, ma == va. */
 static inline void *maddr_to_virt(paddr_t ma)
 {
xen/arch/arm/mpu/Makefile +1 -0
index 21bbc517b5..c7e3aa4d87 100644
@@ -1,3 +1,4 @@
+obj-$(CONFIG_ARM_32) += domain_page.o
 obj-y += mm.o
 obj-y += p2m.o
 obj-y += setup.init.o
xen/arch/arm/mpu/domain_page.c new file +45 -0

45 lines not on this page · raw message

Signature · 1 line
2.25.1
#6 lore raw
In reply to Ayan Kumar Halder
Quoted 26 lines · Ayan Kumar Halder

Enable early booting of Armv8-R AArch32 based systems.

Added Luca's R-b in all the patches.
Added Michal's R-b in patch 1 and 3.

Ayan Kumar Halder (3):
xen/arm: Move some of the functions to common file xen/arm32: Create the same boot-time MPU regions as arm64 xen/arm32: mpu: Stubs to build MPU for arm32

 xen/arch/arm/arm32/Makefile              |   1 +
 xen/arch/arm/arm32/mpu/Makefile          |   3 +
 xen/arch/arm/arm32/mpu/head.S            | 104 +++++++++++++++++++++++
 xen/arch/arm/arm32/mpu/p2m.c             |  19 +++++
 xen/arch/arm/arm32/mpu/smpboot.c         |  26 ++++++
 xen/arch/arm/arm64/mpu/head.S            |  78 +----------------
 xen/arch/arm/include/asm/arm32/sysregs.h |  13 ++-
 xen/arch/arm/include/asm/arm64/sysregs.h |  13 +++
 xen/arch/arm/include/asm/cpregs.h        |   2 +
 xen/arch/arm/include/asm/mm.h            |   9 +-
 xen/arch/arm/include/asm/mmu/mm.h        |   7 ++
 xen/arch/arm/include/asm/mpu/cpregs.h    |  32 +++++++
 xen/arch/arm/include/asm/mpu/mm.h        |   5 ++
 xen/arch/arm/include/asm/mpu/regions.inc |  79 +++++++++++++++++
 xen/arch/arm/mpu/Makefile                |   1 +
 xen/arch/arm/mpu/domain_page.c           |  45 ++++++++++
Quoted 8 lines
 16 files changed, 350 insertions(+), 87 deletions(-)
 create mode 100644 xen/arch/arm/arm32/mpu/Makefile
 create mode 100644 xen/arch/arm/arm32/mpu/head.S
 create mode 100644 xen/arch/arm/arm32/mpu/p2m.c
 create mode 100644 xen/arch/arm/arm32/mpu/smpboot.c
 create mode 100644 xen/arch/arm/include/asm/mpu/cpregs.h
 create mode 100644 xen/arch/arm/include/asm/mpu/regions.inc
 create mode 100644 xen/arch/arm/mpu/domain_page.c

Even if we have files of this name elsewhere, it would imo be nice if new ones still used dash(es) instead of underscore(s) in their names.

Jan

#7 lore raw
Quoted 36 lines · Jan Beulich
Quoted 26 lines · Ayan Kumar Halder

Enable early booting of Armv8-R AArch32 based systems.

Added Luca's R-b in all the patches.
Added Michal's R-b in patch 1 and 3.

Ayan Kumar Halder (3):
xen/arm: Move some of the functions to common file xen/arm32: Create the same boot-time MPU regions as arm64 xen/arm32: mpu: Stubs to build MPU for arm32

 xen/arch/arm/arm32/Makefile              |   1 +
 xen/arch/arm/arm32/mpu/Makefile          |   3 +
 xen/arch/arm/arm32/mpu/head.S            | 104 +++++++++++++++++++++++
 xen/arch/arm/arm32/mpu/p2m.c             |  19 +++++
 xen/arch/arm/arm32/mpu/smpboot.c         |  26 ++++++
 xen/arch/arm/arm64/mpu/head.S            |  78 +----------------
 xen/arch/arm/include/asm/arm32/sysregs.h |  13 ++-
 xen/arch/arm/include/asm/arm64/sysregs.h |  13 +++
 xen/arch/arm/include/asm/cpregs.h        |   2 +
 xen/arch/arm/include/asm/mm.h            |   9 +-
 xen/arch/arm/include/asm/mmu/mm.h        |   7 ++
 xen/arch/arm/include/asm/mpu/cpregs.h    |  32 +++++++
 xen/arch/arm/include/asm/mpu/mm.h        |   5 ++
 xen/arch/arm/include/asm/mpu/regions.inc |  79 +++++++++++++++++
 xen/arch/arm/mpu/Makefile                |   1 +
 xen/arch/arm/mpu/domain_page.c           |  45 ++++++++++
Quoted 8 lines
 16 files changed, 350 insertions(+), 87 deletions(-)
 create mode 100644 xen/arch/arm/arm32/mpu/Makefile
 create mode 100644 xen/arch/arm/arm32/mpu/head.S
 create mode 100644 xen/arch/arm/arm32/mpu/p2m.c
 create mode 100644 xen/arch/arm/arm32/mpu/smpboot.c
 create mode 100644 xen/arch/arm/include/asm/mpu/cpregs.h
 create mode 100644 xen/arch/arm/include/asm/mpu/regions.inc
 create mode 100644 xen/arch/arm/mpu/domain_page.c
Quoted 2 lines

Even if we have files of this name elsewhere, it would imo be nice if new ones still used dash(es) instead of underscore(s) in their names.

I took care of this while committing.

~Michal

Tested-by on the v7 series
#8 lore raw
In reply to Ayan Kumar Halder

Hi Ayan,

Quoted 12 lines · Ayan Kumar Halder

Enable early booting of Armv8-R AArch32 based systems.

Added Luca's R-b in all the patches.
Added Michal's R-b in patch 1 and 3.

Ayan Kumar Halder (3):
xen/arm: Move some of the functions to common file xen/arm32: Create the same boot-time MPU regions as arm64 xen/arm32: mpu: Stubs to build MPU for arm32

I’ve tested again the serie with the latest change, no issues: