From: Luca Fancellu <Luca.Fancellu@arm.com>
To: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: 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: Re: [PATCH v4 3/7] arm/mpu: Provide and populate MPU C data structures
Date: Wed, 30 Apr 2025 06:56:00 +0000 [thread overview]
Message-ID: <54913278-3076-48AE-950F-D036B830EB8F@arm.com> (raw)
In-Reply-To: <20250429152057.2380536-4-luca.fancellu@arm.com>
Hi all,
> diff --git a/xen/arch/arm/include/asm/mpu/regions.inc b/xen/arch/arm/include/asm/mpu/regions.inc
> index 47868a152662..dc0306f8c5fc 100644
> --- a/xen/arch/arm/include/asm/mpu/regions.inc
> +++ b/xen/arch/arm/include/asm/mpu/regions.inc
> @@ -1,22 +1,50 @@
> /* SPDX-License-Identifier: GPL-2.0-only */
>
> +#include <asm/bitmap-op.inc>
> #include <asm/mpu.h>
> #include <asm/sysregs.h>
>
> /* Backgroud region enable/disable */
> #define SCTLR_ELx_BR BIT(17, UL)
>
> +#define REGION_DISABLED_PRLAR 0x00 /* NS=0 ATTR=000 EN=0 */
> #define REGION_NORMAL_PRLAR 0x0f /* NS=0 ATTR=111 EN=1 */
> #define REGION_DEVICE_PRLAR 0x09 /* NS=0 ATTR=100 EN=1 */
>
> +#define PRLAR_ELx_EN 0x1
> +
> +#ifdef CONFIG_ARM_64
> +#define XEN_MPUMAP_ENTRY_SHIFT 0x4 /* 16 byte structure */
> +
> +.macro store_pair reg1, reg2, dst
> + stp \reg1, \reg2, [\dst]
> +.endm
> +
> +.macro invalidate_dcache_one reg
> + dc ivac, \reg
> +.endm
> +
> +#else
> +#define XEN_MPUMAP_ENTRY_SHIFT 0x2 /* 8 byte structure */
This should be 0x3, my mistake!
Cheers,
Luca
next prev parent reply other threads:[~2025-04-30 6:57 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-29 15:20 [PATCH v4 0/7] First chunk for Arm R82 and MPU support Luca Fancellu
2025-04-29 15:20 ` [PATCH v4 1/7] docs/arm: Document Xen booting protocol on Armv8-R Luca Fancellu
2025-04-29 17:11 ` Ayan Kumar Halder
2025-04-30 6:37 ` Orzel, Michal
2025-04-30 6:58 ` Luca Fancellu
2025-04-30 7:04 ` Orzel, Michal
2025-04-30 7:22 ` Luca Fancellu
2025-05-06 11:44 ` Julien Grall
2025-05-06 12:24 ` Luca Fancellu
2025-05-06 12:29 ` Julien Grall
2025-05-06 12:40 ` Luca Fancellu
2025-04-29 15:20 ` [PATCH v4 2/7] arm/mpu: Introduce MPU memory region map structure Luca Fancellu
2025-04-30 6:50 ` Orzel, Michal
2025-05-06 11:50 ` Julien Grall
2025-04-29 15:20 ` [PATCH v4 3/7] arm/mpu: Provide and populate MPU C data structures Luca Fancellu
2025-04-30 6:56 ` Luca Fancellu [this message]
2025-04-30 10:57 ` Orzel, Michal
2025-04-30 12:22 ` Luca Fancellu
2025-04-29 15:20 ` [PATCH v4 4/7] arm/mpu: Provide access to the MPU region from the C code Luca Fancellu
2025-05-05 11:56 ` Orzel, Michal
2025-05-06 8:45 ` Luca Fancellu
2025-04-29 15:20 ` [PATCH v4 5/7] arm/mpu: Introduce utility functions for the pr_t type Luca Fancellu
2025-05-05 12:08 ` Orzel, Michal
2025-05-06 8:45 ` Luca Fancellu
2025-04-29 15:20 ` [PATCH v4 6/7] arm/mpu: Provide a constructor for " Luca Fancellu
2025-04-29 17:16 ` Ayan Kumar Halder
2025-04-29 19:39 ` Luca Fancellu
2025-05-06 10:06 ` Orzel, Michal
2025-05-06 12:56 ` Luca Fancellu
2025-05-06 13:51 ` Julien Grall
2025-05-06 13:53 ` Luca Fancellu
2025-05-06 13:29 ` Luca Fancellu
2025-04-29 15:20 ` [PATCH v4 7/7] arm/mpu: Introduce MPU memory mapping flags 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=54913278-3076-48AE-950F-D036B830EB8F@arm.com \
--to=luca.fancellu@arm.com \
--cc=Bertrand.Marquis@arm.com \
--cc=Volodymyr_Babchuk@epam.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.