arm: remove SCTLR.FI
Removed from ARMARM. Change-Id: Ie8f28e4fa6e1b46dfd9c8c4b379e5b42fe25421d Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
This commit is contained in:
parent
19d90956eb
commit
7ddb55a5f2
1 changed files with 8 additions and 27 deletions
|
@ -776,24 +776,14 @@ ISA::readMiscReg(int misc_reg, ThreadContext *tc)
|
||||||
return readMiscRegNoEffect(MISCREG_IFAR_S);
|
return readMiscRegNoEffect(MISCREG_IFAR_S);
|
||||||
case MISCREG_HVBAR: // bottom bits reserved
|
case MISCREG_HVBAR: // bottom bits reserved
|
||||||
return readMiscRegNoEffect(MISCREG_HVBAR) & 0xFFFFFFE0;
|
return readMiscRegNoEffect(MISCREG_HVBAR) & 0xFFFFFFE0;
|
||||||
case MISCREG_SCTLR: // Some bits hardwired
|
case MISCREG_SCTLR:
|
||||||
// The FI field (bit 21) is common between S/NS versions of the register
|
return (readMiscRegNoEffect(misc_reg) & 0x72DD39FF) | 0x00C00818;
|
||||||
return (readMiscRegNoEffect(MISCREG_SCTLR_S) & (1 << 21)) |
|
|
||||||
(readMiscRegNoEffect(misc_reg) & 0x72DD39FF) | 0x00C00818; // V8 SCTLR
|
|
||||||
case MISCREG_SCTLR_EL1:
|
case MISCREG_SCTLR_EL1:
|
||||||
// The FI field (bit 21) is common between S/NS versions of the register
|
return (readMiscRegNoEffect(misc_reg) & 0x37DDDBFF) | 0x30D00800;
|
||||||
return (readMiscRegNoEffect(MISCREG_SCTLR_S) & (1 << 21)) |
|
|
||||||
(readMiscRegNoEffect(misc_reg) & 0x37DDDBFF) | 0x30D00800; // V8 SCTLR_EL1
|
|
||||||
case MISCREG_SCTLR_EL3:
|
case MISCREG_SCTLR_EL3:
|
||||||
// The FI field (bit 21) is common between S/NS versions of the register
|
return (readMiscRegNoEffect(misc_reg) & 0x32CD183F) | 0x30C50830;
|
||||||
return (readMiscRegNoEffect(MISCREG_SCTLR_S) & (1 << 21)) |
|
case MISCREG_HSCTLR:
|
||||||
(readMiscRegNoEffect(misc_reg) & 0x32CD183F) | 0x30C50830; // V8 SCTLR_EL3
|
return readMiscRegNoEffect(MISCREG_HSCTLR);
|
||||||
case MISCREG_HSCTLR: // FI comes from SCTLR
|
|
||||||
{
|
|
||||||
uint32_t mask = 1 << 27;
|
|
||||||
return (readMiscRegNoEffect(MISCREG_HSCTLR) & ~mask) |
|
|
||||||
(readMiscRegNoEffect(MISCREG_SCTLR) & mask);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Generic Timer registers
|
// Generic Timer registers
|
||||||
case MISCREG_CNTFRQ ... MISCREG_CNTHP_CTL:
|
case MISCREG_CNTFRQ ... MISCREG_CNTHP_CTL:
|
||||||
|
@ -1111,18 +1101,9 @@ ISA::setMiscReg(int misc_reg, const MiscReg &val, ThreadContext *tc)
|
||||||
case MISCREG_SCTLR:
|
case MISCREG_SCTLR:
|
||||||
{
|
{
|
||||||
DPRINTF(MiscRegs, "Writing SCTLR: %#x\n", newVal);
|
DPRINTF(MiscRegs, "Writing SCTLR: %#x\n", newVal);
|
||||||
MiscRegIndex sctlr_idx;
|
|
||||||
scr = readMiscRegNoEffect(MISCREG_SCR);
|
scr = readMiscRegNoEffect(MISCREG_SCR);
|
||||||
if (haveSecurity && !scr.ns) {
|
MiscRegIndex sctlr_idx = (haveSecurity && !scr.ns)
|
||||||
sctlr_idx = MISCREG_SCTLR_S;
|
? MISCREG_SCTLR_S : MISCREG_SCTLR_NS;
|
||||||
} else {
|
|
||||||
sctlr_idx = MISCREG_SCTLR_NS;
|
|
||||||
// The FI field (bit 21) is common between S/NS versions
|
|
||||||
// of the register, we store this in the secure copy of
|
|
||||||
// the reg
|
|
||||||
miscRegs[MISCREG_SCTLR_S] &= ~(1 << 21);
|
|
||||||
miscRegs[MISCREG_SCTLR_S] |= newVal & (1 << 21);
|
|
||||||
}
|
|
||||||
SCTLR sctlr = miscRegs[sctlr_idx];
|
SCTLR sctlr = miscRegs[sctlr_idx];
|
||||||
SCTLR new_sctlr = newVal;
|
SCTLR new_sctlr = newVal;
|
||||||
new_sctlr.nmfi = ((bool)sctlr.nmfi) && !haveVirtualization;
|
new_sctlr.nmfi = ((bool)sctlr.nmfi) && !haveVirtualization;
|
||||||
|
|
Loading…
Reference in a new issue