For AArch32, refer to ARM DDI 0568A.c ID110520.
MPU_REGION_SHIFT is same between AArch32 and AArch64 (HPRBAR).
Also, NUM_MPU_REGIONS_SHIFT is same between AArch32 and AArch64
(HMPUIR).
Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@amd.com>
Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
Acked-by: Michal Orzel <michal.orzel@amd.com>
* Start-of-day code for an Armv8-R MPU system.
*/
-#include <asm/arm64/mpu.h>
#include <asm/early_printk.h>
+#include <asm/mpu.h>
/* Backgroud region enable/disable */
#define SCTLR_ELx_BR BIT(17, UL)
+++ /dev/null
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * mpu.h: Arm Memory Protection Unit definitions.
- */
-
-#ifndef __ARM64_MPU_H__
-#define __ARM64_MPU_H__
-
-#define MPU_REGION_SHIFT 6
-#define MPU_REGION_ALIGN (_AC(1, UL) << MPU_REGION_SHIFT)
-#define MPU_REGION_MASK (~(MPU_REGION_ALIGN - 1))
-
-#define NUM_MPU_REGIONS_SHIFT 8
-#define NUM_MPU_REGIONS (_AC(1, UL) << NUM_MPU_REGIONS_SHIFT)
-#define NUM_MPU_REGIONS_MASK (NUM_MPU_REGIONS - 1)
-#endif /* __ARM64_MPU_H__ */
-
-/*
- * Local variables:
- * mode: C
- * c-file-style: "BSD"
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */
#define __ARM_EARLY_PRINTK_H__
#include <xen/page-size.h>
-#include <asm/arm64/mpu.h>
#include <asm/fixmap.h>
+#include <asm/mpu.h>
#ifdef CONFIG_EARLY_PRINTK
--- /dev/null
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * mpu.h: Arm Memory Protection Unit definitions.
+ */
+
+#ifndef __ARM_MPU_H__
+#define __ARM_MPU_H__
+
+#define MPU_REGION_SHIFT 6
+#define MPU_REGION_ALIGN (_AC(1, UL) << MPU_REGION_SHIFT)
+#define MPU_REGION_MASK (~(MPU_REGION_ALIGN - 1))
+
+#define NUM_MPU_REGIONS_SHIFT 8
+#define NUM_MPU_REGIONS (_AC(1, UL) << NUM_MPU_REGIONS_SHIFT)
+#define NUM_MPU_REGIONS_MASK (NUM_MPU_REGIONS - 1)
+
+#endif /* __ARM_MPU_H__ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */