[PULL 28/36] target/arm: Implement v8.1M REVIDR register

Maintainers: Jason Wang <jasowang@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, Radoslaw Biernacki <rad@semihalf.com>, Vikram Garhwal <fnu.vikram@xilinx.com>, Jean-Christophe Dubois <jcd@tribudubois.net>, Laurent Vivier <lvivier@redhat.com>, Leif Lindholm <leif@nuviainc.com>, Thomas Huth <thuth@redhat.com>, Eric Auger <eric.auger@redhat.com>, Tyrone Ting <kfting@nuvoton.com>, Peter Chubb <peter.chubb@nicta.com.au>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Alistair Francis <alistair@alistair23.me>, Pavel Pisa <pisa@cmp.felk.cvut.cz>, Havard Skinnemoen <hskinnemoen@google.com>, Paolo Bonzini <pbonzini@redhat.com>
There is a newer version of this series
[PULL 28/36] target/arm: Implement v8.1M REVIDR register
Posted by Peter Maydell 5 years, 2 months ago
In v8.1M a REVIDR register is defined, which is at address 0xe00ecfc
and is a read-only IMPDEF register providing implementation specific
minor revision information, like the v8A REVIDR_EL1. Implement this.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20201119215617.29887-19-peter.maydell@linaro.org
---
 hw/intc/armv7m_nvic.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c
index be3bc1f1f45..effc4a784ca 100644
--- a/hw/intc/armv7m_nvic.c
+++ b/hw/intc/armv7m_nvic.c
@@ -1025,6 +1025,11 @@ static uint32_t nvic_readl(NVICState *s, uint32_t offset, MemTxAttrs attrs)
         }
         return val;
     }
+    case 0xcfc:
+        if (!arm_feature(&cpu->env, ARM_FEATURE_V8_1M)) {
+            goto bad_offset;
+        }
+        return cpu->revidr;
     case 0xd00: /* CPUID Base.  */
         return cpu->midr;
     case 0xd04: /* Interrupt Control State (ICSR) */
-- 
2.20.1