[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v7 31/32] target-arm: make MAIR0/1 banked
From: |
Greg Bellows |
Subject: |
[Qemu-devel] [PATCH v7 31/32] target-arm: make MAIR0/1 banked |
Date: |
Tue, 21 Oct 2014 11:55:43 -0500 |
Added CP register info entries for the ARMv7 MAIR0/1 secure banks.
Signed-off-by: Greg Bellows <address@hidden>
==========
v5 -> v6
- Changed _el field variants to be array based
Signed-off-by: Greg Bellows <address@hidden>
---
target-arm/cpu.h | 12 +++++++++++-
target-arm/helper.c | 8 +++++---
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/target-arm/cpu.h b/target-arm/cpu.h
index 82fc018..ebc2931 100644
--- a/target-arm/cpu.h
+++ b/target-arm/cpu.h
@@ -305,7 +305,17 @@ typedef struct CPUARMState {
uint32_t c9_pmxevtyper; /* perf monitor event type */
uint32_t c9_pmuserenr; /* perf monitor user enable */
uint32_t c9_pminten; /* perf monitor interrupt enables */
- uint64_t mair_el1;
+ union { /* Memory attribute redirection */
+ struct {
+ uint64_t _unused_mair_0;
+ uint32_t mair0_ns;
+ uint32_t mair1_ns;
+ uint64_t _unused_mair_1;
+ uint32_t mair0_s;
+ uint32_t mair1_s;
+ };
+ uint64_t mair_el[4];
+ };
union { /* vector base address register */
struct {
uint64_t _unused_vbar;
diff --git a/target-arm/helper.c b/target-arm/helper.c
index f8e2eed..9cbea28 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -952,7 +952,7 @@ static const ARMCPRegInfo v7_cp_reginfo[] = {
*/
{ .name = "MAIR_EL1", .state = ARM_CP_STATE_AA64,
.opc0 = 3, .opc1 = 0, .crn = 10, .crm = 2, .opc2 = 0,
- .access = PL1_RW, .fieldoffset = offsetof(CPUARMState, cp15.mair_el1),
+ .access = PL1_RW, .fieldoffset = offsetof(CPUARMState, cp15.mair_el[1]),
.resetvalue = 0 },
/* For non-long-descriptor page tables these are PRRR and NMRR;
* regardless they still act as reads-as-written for QEMU.
@@ -961,11 +961,13 @@ static const ARMCPRegInfo v7_cp_reginfo[] = {
*/
{ .name = "MAIR0", .state = ARM_CP_STATE_AA32, .type = ARM_CP_OVERRIDE,
.cp = 15, .opc1 = 0, .crn = 10, .crm = 2, .opc2 = 0, .access = PL1_RW,
- .fieldoffset = offsetoflow32(CPUARMState, cp15.mair_el1),
+ .bank_fieldoffsets = { offsetof(CPUARMState, cp15.mair0_s),
+ offsetof(CPUARMState, cp15.mair0_ns) },
.resetfn = arm_cp_reset_ignore },
{ .name = "MAIR1", .state = ARM_CP_STATE_AA32, .type = ARM_CP_OVERRIDE,
.cp = 15, .opc1 = 0, .crn = 10, .crm = 2, .opc2 = 1, .access = PL1_RW,
- .fieldoffset = offsetofhigh32(CPUARMState, cp15.mair_el1),
+ .bank_fieldoffsets = { offsetof(CPUARMState, cp15.mair1_s),
+ offsetof(CPUARMState, cp15.mair1_ns) },
.resetfn = arm_cp_reset_ignore },
{ .name = "ISR_EL1", .state = ARM_CP_STATE_BOTH,
.opc0 = 3, .opc1 = 0, .crn = 12, .crm = 1, .opc2 = 0,
--
1.8.3.2
- [Qemu-devel] [PATCH v7 18/32] target-arm: add SDER definition, (continued)
- [Qemu-devel] [PATCH v7 18/32] target-arm: add SDER definition, Greg Bellows, 2014/10/21
- [Qemu-devel] [PATCH v7 21/32] target-arm: make CSSELR banked, Greg Bellows, 2014/10/21
- [Qemu-devel] [PATCH v7 24/32] target-arm: make c2_mask and c2_base_mask banked, Greg Bellows, 2014/10/21
- [Qemu-devel] [PATCH v7 22/32] target-arm: add TTBR0_EL3 and make TTBR0/1 banked, Greg Bellows, 2014/10/21
- [Qemu-devel] [PATCH v7 26/32] target-arm: make IFSR banked, Greg Bellows, 2014/10/21
- [Qemu-devel] [PATCH v7 27/32] target-arm: make DFSR banked, Greg Bellows, 2014/10/21
- [Qemu-devel] [PATCH v7 23/32] target-arm: add TCR_EL3 and make TTBCR banked, Greg Bellows, 2014/10/21
- [Qemu-devel] [PATCH v7 28/32] target-arm: make IFAR/DFAR banked, Greg Bellows, 2014/10/21
- [Qemu-devel] [PATCH v7 29/32] target-arm: make PAR banked, Greg Bellows, 2014/10/21
- [Qemu-devel] [PATCH v7 30/32] target-arm: make c13 cp regs banked (FCSEIDR, ...), Greg Bellows, 2014/10/21
- [Qemu-devel] [PATCH v7 31/32] target-arm: make MAIR0/1 banked,
Greg Bellows <=
- [Qemu-devel] [PATCH v7 32/32] target-arm: add cpu feature EL3 to CPUs with Security Extensions, Greg Bellows, 2014/10/21
- [Qemu-devel] [PATCH v7 25/32] target-arm: make DACR banked, Greg Bellows, 2014/10/21
- Re: [Qemu-devel] [PATCH v7 00/32] target-arm: add Security Extensions for CPUs, Peter Maydell, 2014/10/23