From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 11/20] hw/intc/armv7m_nvic: Implement v8M CPPWR register
Date: Thu, 15 Feb 2018 18:36:51 +0000 [thread overview]
Message-ID: <20180215183700.26101-12-peter.maydell@linaro.org> (raw)
In-Reply-To: <20180215183700.26101-1-peter.maydell@linaro.org>
The Coprocessor Power Control Register (CPPWR) is new in v8M.
It allows software to control whether coprocessors are allowed
to power down and lose their state. QEMU doesn't have any
notion of power control, so we choose the IMPDEF option of
making the whole register RAZ/WI (indicating that no coprocessors
can ever power down and lose state).
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180209165810.6668-5-peter.maydell@linaro.org
---
hw/intc/armv7m_nvic.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c
index 74b25ce92c..eb49fd77c7 100644
--- a/hw/intc/armv7m_nvic.c
+++ b/hw/intc/armv7m_nvic.c
@@ -776,6 +776,14 @@ static uint32_t nvic_readl(NVICState *s, uint32_t offset, MemTxAttrs attrs)
switch (offset) {
case 4: /* Interrupt Control Type. */
return ((s->num_irq - NVIC_FIRST_IRQ) / 32) - 1;
+ case 0xc: /* CPPWR */
+ if (!arm_feature(&cpu->env, ARM_FEATURE_V8)) {
+ goto bad_offset;
+ }
+ /* We make the IMPDEF choice that nothing can ever go into a
+ * non-retentive power state, which allows us to RAZ/WI this.
+ */
+ return 0;
case 0x380 ... 0x3bf: /* NVIC_ITNS<n> */
{
int startvec = 8 * (offset - 0x380) + NVIC_FIRST_IRQ;
@@ -1175,6 +1183,12 @@ static void nvic_writel(NVICState *s, uint32_t offset, uint32_t value,
ARMCPU *cpu = s->cpu;
switch (offset) {
+ case 0xc: /* CPPWR */
+ if (!arm_feature(&cpu->env, ARM_FEATURE_V8)) {
+ goto bad_offset;
+ }
+ /* Make the IMPDEF choice to RAZ/WI this. */
+ break;
case 0x380 ... 0x3bf: /* NVIC_ITNS<n> */
{
int startvec = 8 * (offset - 0x380) + NVIC_FIRST_IRQ;
--
2.16.1
next prev parent reply other threads:[~2018-02-15 18:37 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-15 18:36 [Qemu-devel] [PULL 00/20] target-arm queue Peter Maydell
2018-02-15 18:36 ` [Qemu-devel] [PULL 01/20] hw/arm/aspeed: directly map the serial device to the system address space Peter Maydell
2018-02-15 18:36 ` [Qemu-devel] [PULL 02/20] hw/arm/aspeed: simplify using the 'unimplemented device' for aspeed_soc.io Peter Maydell
2018-02-15 18:36 ` [Qemu-devel] [PULL 03/20] target/arm: Remove ARM_CP_64BIT from ZCR_EL registers Peter Maydell
2018-02-15 18:36 ` [Qemu-devel] [PULL 04/20] target/arm: Enforce FP access to FPCR/FPSR Peter Maydell
2018-02-15 18:36 ` [Qemu-devel] [PULL 05/20] target/arm: Suppress TB end for FPCR/FPSR Peter Maydell
2018-02-15 18:36 ` [Qemu-devel] [PULL 06/20] target/arm: Enforce access to ZCR_EL at translation Peter Maydell
2018-02-15 18:36 ` [Qemu-devel] [PULL 07/20] target/arm: Handle SVE registers when using clear_vec_high Peter Maydell
2018-02-15 18:36 ` [Qemu-devel] [PULL 08/20] hw/intc/armv7m_nvic: Don't hardcode M profile ID registers in NVIC Peter Maydell
2018-02-15 18:36 ` [Qemu-devel] [PULL 09/20] hw/intc/armv7m_nvic: Fix ICSR PENDNMISET/CLR handling Peter Maydell
2018-02-15 18:36 ` [Qemu-devel] [PULL 10/20] hw/intc/armv7m_nvic: Implement M profile cache maintenance ops Peter Maydell
2018-02-15 18:36 ` Peter Maydell [this message]
2018-02-15 18:36 ` [Qemu-devel] [PULL 12/20] hw/intc/armv7m_nvic: Implement cache ID registers Peter Maydell
2018-02-15 18:36 ` [Qemu-devel] [PULL 13/20] hw/intc/armv7m_nvic: Implement SCR Peter Maydell
2018-02-15 18:36 ` [Qemu-devel] [PULL 14/20] target/arm: Implement writing to CONTROL_NS for v8M Peter Maydell
2018-02-15 18:36 ` [Qemu-devel] [PULL 15/20] hw/intc/armv7m_nvic: Fix byte-to-interrupt number conversions Peter Maydell
2018-02-15 18:36 ` [Qemu-devel] [PULL 16/20] target/arm: Add AIRCR to vmstate struct Peter Maydell
2018-02-15 18:36 ` [Qemu-devel] [PULL 17/20] target/arm: Migrate v7m.other_sp Peter Maydell
2018-02-15 18:36 ` [Qemu-devel] [PULL 18/20] target/arm: Implement v8M MSPLIM and PSPLIM registers Peter Maydell
2018-02-15 18:36 ` [Qemu-devel] [PULL 19/20] bcm2836: Make CPU type configurable Peter Maydell
2018-02-15 18:37 ` [Qemu-devel] [PULL 20/20] raspi: Raspberry Pi 3 support Peter Maydell
2018-02-15 19:41 ` [Qemu-devel] [PULL 00/20] target-arm queue 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=20180215183700.26101-12-peter.maydell@linaro.org \
--to=peter.maydell@linaro.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).