[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 10/11] target-mips: support CP0.Config4.AE bit
From: |
Leon Alrae |
Subject: |
[Qemu-devel] [PULL 10/11] target-mips: support CP0.Config4.AE bit |
Date: |
Tue, 12 Jul 2016 12:14:56 +0100 |
From: Paul Burton <address@hidden>
The read-only Config4.AE bit set denotes extended 10 bits ASID.
Signed-off-by: Paul Burton <address@hidden>
Signed-off-by: James Hogan <address@hidden>
Signed-off-by: Leon Alrae <address@hidden>
---
target-mips/cpu.h | 1 +
target-mips/translate.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/target-mips/cpu.h b/target-mips/cpu.h
index 3e233ad..2c45839 100644
--- a/target-mips/cpu.h
+++ b/target-mips/cpu.h
@@ -468,6 +468,7 @@ struct CPUMIPSState {
int32_t CP0_Config4_rw_bitmask;
#define CP0C4_M 31
#define CP0C4_IE 29
+#define CP0C4_AE 28
#define CP0C4_KScrExist 16
#define CP0C4_MMUExtDef 14
#define CP0C4_FTLBPageSize 8
diff --git a/target-mips/translate.c b/target-mips/translate.c
index 01510b3..bab52cb 100644
--- a/target-mips/translate.c
+++ b/target-mips/translate.c
@@ -20302,7 +20302,8 @@ void cpu_state_reset(CPUMIPSState *env)
if (env->CP0_Config3 & (1 << CP0C3_CMGCR)) {
env->CP0_CMGCRBase = 0x1fbf8000 >> 4;
}
- env->CP0_EntryHi_ASID_mask = 0xff;
+ env->CP0_EntryHi_ASID_mask = (env->CP0_Config4 & (1 << CP0C4_AE)) ?
+ 0x3ff : 0xff;
env->CP0_Status = (1 << CP0St_BEV) | (1 << CP0St_ERL);
/* vectored interrupts not implemented, timer on int 7,
no performance counters. */
--
2.7.4
- [Qemu-devel] [PULL 01/11] hw/mips: implement GIC Interval Timer, (continued)
- [Qemu-devel] [PULL 01/11] hw/mips: implement GIC Interval Timer, Leon Alrae, 2016/07/12
- [Qemu-devel] [PULL 03/11] hw/mips/cps: create GIC block inside CPS, Leon Alrae, 2016/07/12
- [Qemu-devel] [PULL 05/11] hw/mips_cpc: make VP correctly start from the reset vector, Leon Alrae, 2016/07/12
- [Qemu-devel] [PULL 02/11] hw/mips: implement Global Interrupt Controller, Leon Alrae, 2016/07/12
- [Qemu-devel] [PULL 07/11] target-mips: replace MIPS64R6-generic with the real I6400 CPU model, Leon Alrae, 2016/07/12
- [Qemu-devel] [PULL 04/11] target-mips: add exception base to MIPS CPU, Leon Alrae, 2016/07/12
- [Qemu-devel] [PULL 06/11] hw/mips_cmgcr: implement RESET_BASE register in CM GCR, Leon Alrae, 2016/07/12
- [Qemu-devel] [PULL 11/11] target-mips: enable 10-bit ASIDs in I6400 CPU, Leon Alrae, 2016/07/12
- [Qemu-devel] [PULL 09/11] target-mips: change ASID type to hold more than 8 bits, Leon Alrae, 2016/07/12
- [Qemu-devel] [PULL 08/11] target-mips: add ASID mask field and replace magic values, Leon Alrae, 2016/07/12
- [Qemu-devel] [PULL 10/11] target-mips: support CP0.Config4.AE bit,
Leon Alrae <=
- Re: [Qemu-devel] [PULL 00/11] target-mips queue, Peter Maydell, 2016/07/12