From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>,
qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH for-8.2 2/3] hw/arm/armv7m: Add mpu-ns-regions and mpu-s-regions properties
Date: Mon, 24 Jul 2023 21:25:47 +0200 [thread overview]
Message-ID: <94f8f34f-5399-db60-734b-4833a231a287@linaro.org> (raw)
In-Reply-To: <20230724174335.2150499-3-peter.maydell@linaro.org>
On 24/7/23 19:43, Peter Maydell wrote:
> M-profile CPUs generally allow configuration of the number of MPU
> regions that they have. We don't currently model this, so our
> implementations of some of the board models provide CPUs with the
> wrong number of regions. RTOSes like Zephyr that hardcode the
> expected number of regions may therefore not run on the model if they
> are set up to run on real hardware.
>
> Add properties mpu-ns-regions and mpu-s-regions to the ARMV7M object,
> matching the ability of hardware to configure the number of Secure
> and NonSecure regions separately. Our actual CPU implementation
> doesn't currently support that, and it happens that none of the MPS
> boards we model set the number of regions differently for Secure vs
> NonSecure, so we provide an interface to the boards and SoCs that
> won't need to change if we ever do add that functionality in future,
> but make it an error to configure the two properties to different
> values.
>
> (The property name on the CPU is the somewhat misnamed-for-M-profile
> "pmsav7-dregion", so we don't follow that naming convention for
> the properties here. The TRM doesn't say what the CPU configuration
> variable names are, so we pick something, and follow the lowercase
> convention we already have for properties here.)
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> include/hw/arm/armv7m.h | 8 ++++++++
> hw/arm/armv7m.c | 21 +++++++++++++++++++++
> 2 files changed, 29 insertions(+)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
next prev parent reply other threads:[~2023-07-24 19:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-24 17:43 [PATCH for-8.2 0/3] arm: Use correct number of MPU regions on mps2-tz boards Peter Maydell
2023-07-24 17:43 ` [PATCH for-8.2 1/3] target/arm: Do all "ARM_FEATURE_X implies Y" checks in post_init Peter Maydell
2023-07-25 23:32 ` Richard Henderson
2023-07-24 17:43 ` [PATCH for-8.2 2/3] hw/arm/armv7m: Add mpu-ns-regions and mpu-s-regions properties Peter Maydell
2023-07-24 19:25 ` Philippe Mathieu-Daudé [this message]
2023-07-24 17:43 ` [PATCH for-8.2 3/3] hw/arm: Set number of MPU regions correctly for an505, an521, an524 Peter Maydell
2023-08-29 17:26 ` Richard Henderson
2023-08-30 8:33 ` Philippe Mathieu-Daudé
2023-07-25 15:42 ` [PATCH for-8.2 0/3] arm: Use correct number of MPU regions on mps2-tz boards Peter Maydell
2023-08-29 15:53 ` Peter Maydell
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=94f8f34f-5399-db60-734b-4833a231a287@linaro.org \
--to=philmd@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).