Fault
SelfDebug::testBreakPoints(ThreadContext *tc, Addr vaddr)
{
- if (!enableFlag)
+ if (!mde)
return NoFault;
setAArch32(tc);
to32 = targetAArch32(tc);
if (!initialized)
init(tc);
- if (!isDebugEnabled(tc) || !enableFlag)
+ if (!isDebugEnabled(tc) || !mde)
return NoFault;
ExceptionLevel el = (ExceptionLevel) currEL(tc);
(!secure || HaveSecureEL2Ext(tc)) && enableTdeTge;
ExceptionLevel target_el = route_to_el2 ? EL2 : EL1;
- if (oslk || (bSDD && secure && ArmSystem::haveEL(tc, EL3))) {
+ if (oslk || (sdd && secure && ArmSystem::haveEL(tc, EL3))) {
return false;
}
if (el == target_el) {
- return bKDE && !mask;
+ return kde && !mask;
} else {
return target_el > el;
}
to32 = targetAArch32(tc);
if (!initialized)
init(tc);
- if (!isDebugEnabled(tc) || !enableFlag || !aarch32)
+ if (!isDebugEnabled(tc) || !mde || !aarch32)
return NoFault;
ExceptionLevel el = (ExceptionLevel) currEL(tc);
inline Addr
getAddrfromReg(ThreadContext *tc)
{
- return bits(tc->readMiscReg(valRegIndex), maxAddrSize, 0);
-
+ return bits(tc->readMiscReg(valRegIndex), maxAddrSize, 0);
}
inline bool
bool initialized;
bool enableTdeTge; // MDCR_EL2.TDE || HCR_EL2.TGE
- // THIS is MDSCR_EL1.MDE in aarch64 and DBGDSCRext.MDBGen in aarch32
- bool enableFlag;
-
- bool bSDD; // MDCR_EL3.SDD
- bool bKDE; // MDSCR_EL1.KDE
+ bool mde; // MDSCR_EL1.MDE, DBGDSCRext.MDBGen
+ bool sdd; // MDCR_EL3.SDD
+ bool kde; // MDSCR_EL1.KDE
bool oslk; // OS lock flag
bool aarch32; // updates with stage1 aarch64/32
public:
SelfDebug()
: initialized(false), enableTdeTge(false),
- enableFlag(false), bSDD(false), bKDE(false), oslk(false)
+ mde(false), sdd(false), kde(false), oslk(false)
{
softStep = new SoftwareStep(this);
}
public:
Fault testVectorCatch(ThreadContext *tc, Addr addr, ArmFault* flt);
+ bool enabled() const { return mde || softStep->bSS; };
+
inline BrkPoint*
getBrkPoint(uint8_t index)
{
inline void
setbSDD(RegVal val)
{
- bSDD = bits(val, 16);
+ sdd = bits(val, 16);
}
inline void
setMDSCRvals(RegVal val)
{
- enableFlag = bits(val, 15);
- bKDE = bits(val, 13);
+ mde = bits(val, 15);
+ kde = bits(val, 13);
softStep->bSS = bits(val, 0);
}
inline void
setMDBGen(RegVal val)
{
- enableFlag = bits(val, 15);
+ mde = bits(val, 15);
}
inline void