|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 1/3] arm/mpu: Introduce MPU memory region map structure
On 06/06/2025 18:48, Ayan Kumar Halder wrote:
> Introduce pr_t typedef which is a structure having the prbar and prlar
> members,
> each being structured as the registers of the AArch32 Armv8-R architecture.
>
> Also, define MPU_REGION_RES0 to 0 as there are no reserved 0 bits beyond the
> BASE or LIMIT bitfields in prbar or prlar respectively.
>
> Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
> ---
> Changes from v1 :-
>
> 1. Preserve pr_t typedef in arch specific files.
>
> 2. Fix typo.
>
> xen/arch/arm/include/asm/arm32/mpu.h | 34 ++++++++++++++++++++++++++--
> xen/arch/arm/mpu/mm.c | 2 ++
> 2 files changed, 34 insertions(+), 2 deletions(-)
>
> diff --git a/xen/arch/arm/include/asm/arm32/mpu.h
> b/xen/arch/arm/include/asm/arm32/mpu.h
> index f0d4d4055c..fe139a2abe 100644
> --- a/xen/arch/arm/include/asm/arm32/mpu.h
> +++ b/xen/arch/arm/include/asm/arm32/mpu.h
> @@ -5,10 +5,40 @@
>
> #ifndef __ASSEMBLY__
>
> +/*
> + * Unlike arm64, there are no reserved 0 bits beyond base and limit bitfield
> in
> + * prbar and prlar registers respectively.
> + */
> +#define MPU_REGION_RES0 0x0
> +
> +/* Hypervisor Protection Region Base Address Register */
> +typedef union {
> + struct {
> + unsigned int xn:1; /* Execute-Never */
> + unsigned int ap_0:1; /* Access Permission AP[0] */
> + unsigned long ro:1; /* Access Permission AP[1] */
It should be unsigned int, not long.
With that fixed:
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
~Michal
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |