gem5
v21.0.0.0
|
#include <self_debug.hh>
Public Member Functions | |
SelfDebug () | |
~SelfDebug () | |
Fault | testDebug (ThreadContext *tc, const RequestPtr &req, BaseTLB::Mode mode) |
Fault | testVectorCatch (ThreadContext *tc, Addr addr, ArmFault *flt) |
bool | enabled () const |
BrkPoint * | getBrkPoint (uint8_t index) |
bool | isDebugEnabledForEL64 (ThreadContext *tc, ExceptionLevel el, bool secure, bool mask) |
bool | isDebugEnabledForEL32 (ThreadContext *tc, ExceptionLevel el, bool secure, bool mask) |
void | activateDebug () |
bool | isDebugEnabled (ThreadContext *tc) |
void | setbSDD (RegVal val) |
void | setMDSCRvals (RegVal val) |
void | setMDBGen (RegVal val) |
void | setenableTDETGE (HCR hcr, HDCR mdcr) |
void | updateOSLock (RegVal val) |
void | updateDBGBCR (int index, DBGBCR val) |
void | updateDBGWCR (int index, DBGWCR val) |
void | setDebugMask (bool mask) |
bool | isAArch32 () const |
void | setAArch32 (ThreadContext *tc) |
SoftwareStep * | getSstep () |
VectorCatch * | getVectorCatch (ThreadContext *tc) |
bool | targetAArch32 (ThreadContext *tc) |
void | init (ThreadContext *tc) |
Static Public Member Functions | |
static bool | securityStateMatch (ThreadContext *tc, uint8_t ssc, bool hmc) |
Protected Member Functions | |
Fault | testBreakPoints (ThreadContext *tc, Addr vaddr) |
Fault | testWatchPoints (ThreadContext *tc, Addr vaddr, bool write, bool atomic, unsigned size, bool cm) |
Fault | triggerException (ThreadContext *tc, Addr vaddr) |
Fault | triggerWatchpointException (ThreadContext *tc, Addr vaddr, bool write, bool cm) |
Private Attributes | |
std::vector< BrkPoint > | arBrkPoints |
std::vector< WatchPoint > | arWatchPoints |
SoftwareStep * | softStep |
VectorCatch * | vcExcpt |
bool | initialized |
bool | enableTdeTge |
bool | mde |
bool | sdd |
bool | kde |
bool | oslk |
bool | aarch32 |
bool | to32 |
Definition at line 273 of file self_debug.hh.
|
inline |
Definition at line 293 of file self_debug.hh.
References softStep.
|
inline |
Definition at line 300 of file self_debug.hh.
|
inline |
Definition at line 351 of file self_debug.hh.
References arBrkPoints, and MipsISA::p.
|
inline |
Definition at line 320 of file self_debug.hh.
References ArmISA::SoftwareStep::bSS, mde, and softStep.
Referenced by isDebugEnabledForEL32().
|
inline |
Definition at line 323 of file self_debug.hh.
References arBrkPoints, and MipsISA::index.
Referenced by ArmISA::BrkPoint::test(), and ArmISA::WatchPoint::test().
|
inline |
Definition at line 440 of file self_debug.hh.
References softStep.
|
inline |
Definition at line 446 of file self_debug.hh.
References init(), initialized, and vcExcpt.
void SelfDebug::init | ( | ThreadContext * | tc | ) |
Definition at line 329 of file self_debug.cc.
References aarch32, arBrkPoints, arWatchPoints, ArmISA::i, initialized, ArmISA::MISCREG_CPSR, ArmISA::MISCREG_DBGBCR0_EL1, ArmISA::MISCREG_DBGBVR0_EL1, ArmISA::MISCREG_DBGDEVID0, ArmISA::MISCREG_DBGWCR0, ArmISA::MISCREG_DBGWVR0, ArmISA::MISCREG_HCR_EL2, ArmISA::MISCREG_ID_AA64DFR0_EL1, ArmISA::MISCREG_ID_AA64MMFR1_EL1, ArmISA::MISCREG_ID_AA64MMFR2_EL1, ArmISA::MISCREG_MDCR_EL2, ArmISA::MISCREG_MDCR_EL3, ArmISA::MISCREG_MDSCR_EL1, ArmISA::MISCREG_OSLAR_EL1, ThreadContext::readMiscReg(), ThreadContext::readMiscRegNoEffect(), setbSDD(), setenableTDETGE(), setMDSCRvals(), ArmISA::BrkPoint::updateControl(), ArmISA::WatchPoint::updateControl(), updateOSLock(), and vcExcpt.
Referenced by getVectorCatch(), ArmISA::ISA::setupThreadContext(), testBreakPoints(), testVectorCatch(), and testWatchPoints().
|
inline |
Definition at line 423 of file self_debug.hh.
References aarch32.
Referenced by ArmISA::VectorCatch::addressMatching(), ArmISA::VectorCatch::exceptionTrapping(), ArmISA::BrkPoint::isEnabled(), ArmISA::WatchPoint::isEnabled(), and ArmISA::BrkPoint::testContextMatch().
|
inline |
Definition at line 359 of file self_debug.hh.
References aarch32, ArmISA::currEL(), ArmISA::el, isDebugEnabledForEL32(), isDebugEnabledForEL64(), ArmISA::isSecure(), ArmISA::MISCREG_CPSR, and ThreadContext::readMiscReg().
Referenced by ArmISA::SoftwareStep::debugExceptionReturnSS(), testBreakPoints(), testVectorCatch(), and testWatchPoints().
bool SelfDebug::isDebugEnabledForEL32 | ( | ThreadContext * | tc, |
ExceptionLevel | el, | ||
bool | secure, | ||
bool | mask | ||
) |
Definition at line 182 of file self_debug.cc.
References bits(), ArmISA::el, ArmISA::EL0, ArmISA::EL1, ArmISA::EL2, ArmISA::EL3, ArmISA::ELStateUsingAArch32(), enabled(), ArmSystem::haveEL(), isDebugEnabledForEL64(), ArmISA::mask, ArmISA::MISCREG_MDCR_EL3, ArmISA::MISCREG_SDER, oslk, and ThreadContext::readMiscReg().
Referenced by ArmISA::SoftwareStep::debugExceptionReturnSS(), and isDebugEnabled().
bool SelfDebug::isDebugEnabledForEL64 | ( | ThreadContext * | tc, |
ExceptionLevel | el, | ||
bool | secure, | ||
bool | mask | ||
) |
Definition at line 163 of file self_debug.cc.
References ArmISA::el, ArmISA::EL1, ArmISA::EL2, ArmISA::EL3, enableTdeTge, ArmSystem::haveEL(), ArmISA::HaveSecureEL2Ext(), kde, ArmISA::mask, oslk, and sdd.
Referenced by ArmISA::SoftwareStep::debugExceptionReturnSS(), isDebugEnabled(), and isDebugEnabledForEL32().
|
inlinestatic |
Definition at line 329 of file self_debug.hh.
References ArmISA::b, ArmISA::hmc, ArmISA::isSecure(), panic, and ArmISA::ssc.
Referenced by ArmISA::BrkPoint::isEnabled(), and ArmISA::WatchPoint::isEnabled().
|
inline |
Definition at line 429 of file self_debug.hh.
References aarch32, ArmISA::currEL(), ArmISA::EL0, ArmISA::EL1, and ArmISA::ELIs32().
Referenced by testBreakPoints(), testVectorCatch(), and testWatchPoints().
|
inline |
Definition at line 373 of file self_debug.hh.
References bits(), sdd, and X86ISA::val.
Referenced by init(), and ArmISA::ISA::setMiscReg().
|
inline |
Definition at line 417 of file self_debug.hh.
References ArmISA::SoftwareStep::cpsrD, ArmISA::mask, and softStep.
Referenced by ArmISA::ISA::setMiscReg().
|
inline |
Definition at line 393 of file self_debug.hh.
References enableTdeTge.
Referenced by init(), and ArmISA::ISA::setMiscReg().
|
inline |
Definition at line 387 of file self_debug.hh.
References bits(), mde, and X86ISA::val.
Referenced by ArmISA::ISA::setMiscReg().
|
inline |
Definition at line 379 of file self_debug.hh.
References bits(), ArmISA::SoftwareStep::bSS, kde, mde, softStep, and X86ISA::val.
Referenced by init(), and ArmISA::ISA::setMiscReg().
|
inline |
Definition at line 454 of file self_debug.hh.
References aarch32, ArmISA::debugTargetFrom(), ArmISA::ELIs32(), and ArmISA::isSecure().
Referenced by testBreakPoints(), testVectorCatch(), and testWatchPoints().
|
protected |
Definition at line 72 of file self_debug.cc.
References arBrkPoints, ArmISA::currEL(), ArmISA::el, init(), isDebugEnabled(), mde, NoFault, MipsISA::p, MipsISA::pc, ThreadContext::pcState(), setAArch32(), targetAArch32(), to32, triggerException(), and MipsISA::vaddr.
Referenced by testDebug().
Fault SelfDebug::testDebug | ( | ThreadContext * | tc, |
const RequestPtr & | req, | ||
BaseTLB::Mode | mode | ||
) |
Definition at line 47 of file self_debug.cc.
References ArmISA::SoftwareStep::advanceSS(), BaseTLB::Execute, ArmISA::md, ArmISA::mode, NoFault, softStep, testBreakPoints(), testVectorCatch(), testWatchPoints(), and BaseTLB::Write.
Fault SelfDebug::testVectorCatch | ( | ThreadContext * | tc, |
Addr | addr, | ||
ArmFault * | flt | ||
) |
Definition at line 714 of file self_debug.cc.
References aarch32, X86ISA::addr, ArmISA::VectorCatch::addressMatching(), ArmISA::currEL(), ArmISA::ArmFault::DebugEvent, ArmISA::EC_PREFETCH_ABORT_TO_HYP, ArmISA::el, enableTdeTge, ArmISA::VectorCatch::exceptionTrapping(), init(), initialized, isDebugEnabled(), mde, NoFault, setAArch32(), targetAArch32(), to32, ArmISA::ArmFault::UnknownTran, vcExcpt, and ArmISA::ArmFault::VECTORCATCH.
Referenced by testDebug().
|
protected |
Definition at line 122 of file self_debug.cc.
References arWatchPoints, ArmISA::atomic, ArmISA::cm, ArmISA::currEL(), ArmISA::el, init(), initialized, isDebugEnabled(), mde, NoFault, MipsISA::p, setAArch32(), targetAArch32(), to32, triggerWatchpointException(), and MipsISA::vaddr.
Referenced by testDebug().
|
protected |
Definition at line 109 of file self_debug.cc.
References ArmISA::ArmFault::BRKPOINT, ArmISA::ArmFault::DebugEvent, to32, ArmISA::ArmFault::UnknownTran, and MipsISA::vaddr.
Referenced by testBreakPoints().
|
protected |
Definition at line 147 of file self_debug.cc.
References ArmISA::cm, ArmISA::d, ArmISA::ArmFault::DebugEvent, ArmISA::TlbEntry::NoAccess, to32, ArmISA::ArmFault::UnknownTran, MipsISA::vaddr, ArmISA::ArmFault::WPOINT_CM, and ArmISA::ArmFault::WPOINT_NOCM.
Referenced by testWatchPoints().
|
inline |
Definition at line 405 of file self_debug.hh.
References arBrkPoints, MipsISA::index, and X86ISA::val.
Referenced by ArmISA::ISA::setMiscReg().
|
inline |
Definition at line 411 of file self_debug.hh.
References arWatchPoints, MipsISA::index, and X86ISA::val.
Referenced by ArmISA::ISA::setMiscReg().
|
inline |
Definition at line 399 of file self_debug.hh.
References bits(), oslk, and X86ISA::val.
Referenced by init(), and ArmISA::ISA::setMiscReg().
|
private |
Definition at line 289 of file self_debug.hh.
Referenced by init(), isAArch32(), isDebugEnabled(), setAArch32(), targetAArch32(), and testVectorCatch().
|
private |
Definition at line 276 of file self_debug.hh.
Referenced by activateDebug(), getBrkPoint(), init(), testBreakPoints(), and updateDBGBCR().
|
private |
Definition at line 277 of file self_debug.hh.
Referenced by init(), testWatchPoints(), and updateDBGWCR().
|
private |
Definition at line 282 of file self_debug.hh.
Referenced by isDebugEnabledForEL64(), setenableTDETGE(), and testVectorCatch().
|
private |
Definition at line 281 of file self_debug.hh.
Referenced by getVectorCatch(), init(), testVectorCatch(), and testWatchPoints().
|
private |
Definition at line 286 of file self_debug.hh.
Referenced by isDebugEnabledForEL64(), and setMDSCRvals().
|
private |
Definition at line 284 of file self_debug.hh.
Referenced by enabled(), setMDBGen(), setMDSCRvals(), testBreakPoints(), testVectorCatch(), and testWatchPoints().
|
private |
Definition at line 287 of file self_debug.hh.
Referenced by isDebugEnabledForEL32(), isDebugEnabledForEL64(), and updateOSLock().
|
private |
Definition at line 285 of file self_debug.hh.
Referenced by isDebugEnabledForEL64(), and setbSDD().
|
private |
Definition at line 278 of file self_debug.hh.
Referenced by enabled(), getSstep(), SelfDebug(), setDebugMask(), setMDSCRvals(), testDebug(), and ~SelfDebug().
|
private |
Definition at line 290 of file self_debug.hh.
Referenced by testBreakPoints(), testVectorCatch(), testWatchPoints(), triggerException(), and triggerWatchpointException().
|
private |
Definition at line 279 of file self_debug.hh.
Referenced by getVectorCatch(), init(), testVectorCatch(), and ~SelfDebug().