case CM:
cm = val;
break;
+ case OFA:
+ faultAddr = val;
+ break;
// Just ignore unknown ID's
default:
break;
SSE, // DataAbort: Syndrome Sign Extend
SRT, // DataAbort: Syndrome Register Transfer
CM, // DataAbort: Cache Maintenance/Address Translation Op
+ OFA, // DataAbort: Override fault Address. This is needed when
+ // the abort is triggered by a CMO. The faulting address is
+ // then the address specified in the register argument of the
+ // instruction and not the cacheline address (See FAR doc)
// AArch64 only
SF, // DataAbort: width of the accessed register is SixtyFour
/*
- * Copyright (c) 2011-2013,2017 ARM Limited
+ * Copyright (c) 2011-2013,2017-2019 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
MiscRegIndex dest;
uint64_t imm;
+ // This is used for fault handling only
+ mutable Addr faultAddr;
+
SysDC64(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
IntRegIndex _base, MiscRegIndex _dest, uint64_t _imm)
: MiscRegOp64(mnem, _machInst, __opClass, false),
- base(_base), dest(_dest), imm(_imm)
+ base(_base), dest(_dest), imm(_imm), faultAddr(0)
{}
std::string generateDisassembly(
# Cache maintenance fault annotation
# The DC ZVA instruction is not classified as a cache maintenance
- # instruction, and therefore we shouldn't annotate it
+ # instruction, and therefore we shouldn't annotate it.
cachem_fa = '''
fault->annotate(ArmFault::CM, 1);
+ fault->annotate(ArmFault::OFA, faultAddr);
'''
msrdccvau_ea_code = msr_check_code
Request::Flags memAccessFlags = Request::CLEAN | Request::DST_POU |
ArmISA::TLB::MustBeOne;
EA = XBase;
+ faultAddr = EA;
System *sys = xc->tcBase()->getSystemPtr();
Addr op_size = sys->cacheLineSize();
EA &= ~(op_size - 1);
Request::Flags memAccessFlags = Request::CLEAN | Request::DST_POC |
ArmISA::TLB::MustBeOne;
EA = XBase;
+ faultAddr = EA;
System *sys = xc->tcBase()->getSystemPtr();
Addr op_size = sys->cacheLineSize();
EA &= ~(op_size - 1);
Request::Flags memAccessFlags = Request::CLEAN |
Request::INVALIDATE | Request::DST_POC | ArmISA::TLB::MustBeOne;
EA = XBase;
+ faultAddr = EA;
System *sys = xc->tcBase()->getSystemPtr();
Addr op_size = sys->cacheLineSize();
EA &= ~(op_size - 1);
Request::Flags memAccessFlags = Request::INVALIDATE |
Request::DST_POC | ArmISA::TLB::MustBeOne;
EA = XBase;
+ faultAddr = EA;
HCR hcr = Hcr64;
SCR scr = Scr64;
if (el == EL1 && ArmSystem::haveVirtualization(xc->tcBase()) &&