mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/arm: mpu: Move some of the definitions to common file
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>
This commit is contained in:
1 parent
15fe2eb5f1
commit
9e6c7b78f2
3 files changed
+6
-5
No files matched your search
@@ -3,8 +3,8 @@
|
||||
* 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)
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
#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
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* mpu.h: Arm Memory Protection Unit definitions.
|
||||
*/
|
||||
|
||||
#ifndef __ARM64_MPU_H__
|
||||
#define __ARM64_MPU_H__
|
||||
#ifndef __ARM_MPU_H__
|
||||
#define __ARM_MPU_H__
|
||||
|
||||
#define MPU_REGION_SHIFT 6
|
||||
#define MPU_REGION_ALIGN (_AC(1, UL) << MPU_REGION_SHIFT)
|
||||
@@ -13,7 +13,8 @@
|
||||
#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__ */
|
||||
|
||||
#endif /* __ARM_MPU_H__ */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||