From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [PATCH v2 0/3] mps3-an524: support memory remapping
Date: Tue, 4 May 2021 13:09:09 +0100 [thread overview]
Message-ID: <20210504120912.23094-1-peter.maydell@linaro.org> (raw)
The AN524 FPGA image supports two memory maps, which differ
in where the QSPI and BRAM are. In the default map, the BRAM
is at 0x0000_0000, and the QSPI at 0x2800_0000. In the second
map, they are the other way around.
In hardware, the initial mapping can be selected by the user
by writing either "REMAP: BRAM" (the default) or "REMAP: QSPI"
in the board configuration file. The guest can also dynamically
change the mapping via the SCC CFG_REG0 register.
This patchset adds support for the feature to QEMU's model;
the user-sets-the-initial-mapping part is a new machine property
which can be set with "-M remap=QSPI".
This is needed for some guest images -- for instance the
Arm TF-M binaries -- which assume they have the QSPI layout.
Changes v1->v2: all in patch 3
* tweaked commit message to clarify that the MCC is external
* use memory_region_transaction_begin/commit
* make remap be bool rather than int
(All patches are reviewed, I'm just posting v2 because it
has changes made in response to the v1 review.)
thanks
-- PMM
Peter Maydell (3):
hw/misc/mps2-scc: Add "QEMU interface" comment
hw/misc/mps2-scc: Support using CFG0 bit 0 for remapping
hw/arm/mps2-tz: Implement AN524 memory remapping via machine property
docs/system/arm/mps2.rst | 10 ++++
include/hw/misc/mps2-scc.h | 21 ++++++++
hw/arm/mps2-tz.c | 108 ++++++++++++++++++++++++++++++++++++-
hw/misc/mps2-scc.c | 13 +++--
4 files changed, 148 insertions(+), 4 deletions(-)
--
2.20.1
next reply other threads:[~2021-05-04 12:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-04 12:09 Peter Maydell [this message]
2021-05-04 12:09 ` [PATCH v2 1/3] hw/misc/mps2-scc: Add "QEMU interface" comment Peter Maydell
2021-05-04 12:09 ` [PATCH v2 2/3] hw/misc/mps2-scc: Support using CFG0 bit 0 for remapping Peter Maydell
2021-05-04 12:09 ` [PATCH v2 3/3] hw/arm/mps2-tz: Implement AN524 memory remapping via machine property 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=20210504120912.23094-1-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=f4bug@amsat.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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).