[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v8 21/27] target-arm: make DFSR banked
From: |
Greg Bellows |
Subject: |
[Qemu-devel] [PATCH v8 21/27] target-arm: make DFSR banked |
Date: |
Thu, 30 Oct 2014 16:28:52 -0500 |
From: Fabian Aggeler <address@hidden>
When EL3 is running in AArch32 (or ARMv7 with Security Extensions)
DFSR has a secure and a non-secure instance.
Signed-off-by: Fabian Aggeler <address@hidden>
Signed-off-by: Greg Bellows <address@hidden>
---
v3 -> v4
- Reverted esr/dfsr back to array-based notation as a union with v7 naming.
---
target-arm/cpu.h | 10 +++++++++-
target-arm/helper.c | 7 ++++---
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/target-arm/cpu.h b/target-arm/cpu.h
index c44649e..29bf273 100644
--- a/target-arm/cpu.h
+++ b/target-arm/cpu.h
@@ -260,7 +260,15 @@ typedef struct CPUARMState {
uint32_t ifsr32_el2;
};
};
- uint64_t esr_el[4];
+ union {
+ struct {
+ uint64_t _unused_dfsr;
+ uint64_t dfsr_ns;
+ uint64_t hsr;
+ uint64_t dfsr_s;
+ };
+ uint64_t esr_el[4];
+ };
uint32_t c6_region[8]; /* MPU base/size registers. */
uint64_t far_el[4]; /* Fault address registers. */
uint64_t par_el1; /* Translation result. */
diff --git a/target-arm/helper.c b/target-arm/helper.c
index de355f5..c5948f7 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -1650,7 +1650,8 @@ static void vmsa_ttbr_write(CPUARMState *env, const
ARMCPRegInfo *ri,
static const ARMCPRegInfo vmsa_cp_reginfo[] = {
{ .name = "DFSR", .cp = 15, .crn = 5, .crm = 0, .opc1 = 0, .opc2 = 0,
.access = PL1_RW, .type = ARM_CP_NO_MIGRATE,
- .fieldoffset = offsetoflow32(CPUARMState, cp15.esr_el[1]),
+ .bank_fieldoffsets = { offsetoflow32(CPUARMState, cp15.dfsr_s),
+ offsetoflow32(CPUARMState, cp15.dfsr_ns) },
.resetfn = arm_cp_reset_ignore, },
{ .name = "IFSR", .cp = 15, .crn = 5, .crm = 0, .opc1 = 0, .opc2 = 1,
.access = PL1_RW, .resetvalue = 0,
@@ -4309,11 +4310,11 @@ void arm_cpu_do_interrupt(CPUState *cs)
offset = 4;
break;
case EXCP_DATA_ABORT:
- env->cp15.esr_el[1] = env->exception.fsr;
+ A32_BANKED_CURRENT_REG_SET(env, dfsr, env->exception.fsr);
env->cp15.far_el[1] = deposit64(env->cp15.far_el[1], 0, 32,
env->exception.vaddress);
qemu_log_mask(CPU_LOG_INT, "...with DFSR 0x%x DFAR 0x%x\n",
- (uint32_t)env->cp15.esr_el[1],
+ env->exception.fsr,
(uint32_t)env->exception.vaddress);
new_mode = ARM_CPU_MODE_ABT;
addr = 0x10;
--
1.8.3.2
- [Qemu-devel] [PATCH v8 00/27] target-arm: add Security Extensions for CPUs, Greg Bellows, 2014/10/31
- [Qemu-devel] [PATCH v8 22/27] target-arm: make IFAR/DFAR banked, Greg Bellows, 2014/10/31
- [Qemu-devel] [PATCH v8 19/27] target-arm: make DACR banked, Greg Bellows, 2014/10/31
- [Qemu-devel] [PATCH v8 18/27] target-arm: make c2_mask and c2_base_mask banked, Greg Bellows, 2014/10/31
- [Qemu-devel] [PATCH v8 16/27] target-arm: add TTBR0_EL3 and make TTBR0/1 banked, Greg Bellows, 2014/10/31
- [Qemu-devel] [PATCH v8 21/27] target-arm: make DFSR banked,
Greg Bellows <=
- [Qemu-devel] [PATCH v8 24/27] target-arm: make VBAR banked, Greg Bellows, 2014/10/31
- [Qemu-devel] [PATCH v8 17/27] target-arm: add TCR_EL3 and make TTBCR banked, Greg Bellows, 2014/10/31
- [Qemu-devel] [PATCH v8 05/27] target-arm: add CPREG secure state support, Greg Bellows, 2014/10/31
- [Qemu-devel] [PATCH v8 01/27] target-arm: extend async excp masking, Greg Bellows, 2014/10/31
- [Qemu-devel] [PATCH v8 04/27] target-arm: add non-secure Translation Block flag, Greg Bellows, 2014/10/31