gem5 v24.0.0.0
|
#include <self_debug.hh>
Public Member Functions | |
SelfDebug () | |
~SelfDebug () | |
Fault | testDebug (ThreadContext *tc, const RequestPtr &req, BaseMMU::Mode mode) |
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 () |
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 |
bool | enableTdeTge |
bool | mde |
bool | sdd |
bool | kde |
bool | oslk |
bool | aarch32 |
bool | to32 |
Definition at line 242 of file self_debug.hh.
|
inline |
Definition at line 260 of file self_debug.hh.
References softStep.
|
inline |
Definition at line 267 of file self_debug.hh.
References softStep.
|
inline |
Definition at line 315 of file self_debug.hh.
References arBrkPoints, and gem5::MipsISA::p.
|
inline |
Definition at line 284 of file self_debug.hh.
References gem5::ArmISA::SoftwareStep::bSS, mde, and softStep.
Referenced by isDebugEnabledForEL32().
|
inline |
Definition at line 287 of file self_debug.hh.
References arBrkPoints, and gem5::MipsISA::index.
Referenced by gem5::ArmISA::BrkPoint::test(), and gem5::ArmISA::WatchPoint::test().
|
inline |
Definition at line 404 of file self_debug.hh.
References softStep.
void gem5::SelfDebug::init | ( | ThreadContext * | tc | ) |
Definition at line 323 of file self_debug.cc.
References aarch32, arBrkPoints, arWatchPoints, gem5::ArmISA::i, gem5::ArmISA::MISCREG_CPSR, gem5::ArmISA::MISCREG_DBGBCR0_EL1, gem5::ArmISA::MISCREG_DBGBVR0_EL1, gem5::ArmISA::MISCREG_DBGWCR0_EL1, gem5::ArmISA::MISCREG_DBGWVR0_EL1, gem5::ArmISA::MISCREG_HCR_EL2, gem5::ArmISA::MISCREG_ID_AA64DFR0_EL1, gem5::ArmISA::MISCREG_ID_AA64MMFR1_EL1, gem5::ArmISA::MISCREG_ID_AA64MMFR2_EL1, gem5::ArmISA::MISCREG_MDCR_EL2, gem5::ArmISA::MISCREG_MDCR_EL3, gem5::ArmISA::MISCREG_MDSCR_EL1, gem5::ArmISA::MISCREG_OSLAR_EL1, gem5::ThreadContext::readMiscReg(), gem5::ThreadContext::readMiscRegNoEffect(), setbSDD(), setenableTDETGE(), setMDSCRvals(), gem5::ArmISA::BrkPoint::updateControl(), gem5::ArmISA::WatchPoint::updateControl(), and updateOSLock().
Referenced by gem5::ArmISA::ISA::setupThreadContext().
|
inline |
Definition at line 387 of file self_debug.hh.
References aarch32.
Referenced by gem5::ArmISA::BrkPoint::isEnabled(), gem5::ArmISA::WatchPoint::isEnabled(), and gem5::ArmISA::BrkPoint::testContextMatch().
|
inline |
Definition at line 323 of file self_debug.hh.
References aarch32, gem5::ArmISA::currEL(), gem5::ArmISA::el, isDebugEnabledForEL32(), isDebugEnabledForEL64(), gem5::ArmISA::isSecure(), gem5::ArmISA::MISCREG_CPSR, and gem5::ThreadContext::readMiscReg().
Referenced by gem5::ArmISA::SoftwareStep::debugExceptionReturnSS(), testBreakPoints(), and testWatchPoints().
bool gem5::SelfDebug::isDebugEnabledForEL32 | ( | ThreadContext * | tc, |
ExceptionLevel | el, | ||
bool | secure, | ||
bool | mask ) |
Definition at line 177 of file self_debug.cc.
References gem5::bits(), gem5::ArmISA::el, gem5::ArmISA::EL0, gem5::ArmISA::EL1, gem5::ArmISA::EL2, gem5::ArmISA::EL3, gem5::ArmISA::ELStateUsingAArch32(), enabled(), gem5::ArmSystem::haveEL(), isDebugEnabledForEL64(), gem5::ArmISA::mask, gem5::ArmISA::MISCREG_MDCR_EL3, gem5::ArmISA::MISCREG_SDER, oslk, and gem5::ThreadContext::readMiscReg().
Referenced by gem5::ArmISA::SoftwareStep::debugExceptionReturnSS(), and isDebugEnabled().
bool gem5::SelfDebug::isDebugEnabledForEL64 | ( | ThreadContext * | tc, |
ExceptionLevel | el, | ||
bool | secure, | ||
bool | mask ) |
Definition at line 157 of file self_debug.cc.
References gem5::ArmISA::el, gem5::ArmISA::EL1, gem5::ArmISA::EL2, gem5::ArmISA::EL3, enableTdeTge, gem5::ArmSystem::haveEL(), gem5::ArmISA::HaveExt(), kde, gem5::ArmISA::mask, oslk, and sdd.
Referenced by gem5::ArmISA::SoftwareStep::debugExceptionReturnSS(), isDebugEnabled(), and isDebugEnabledForEL32().
|
inlinestatic |
Definition at line 293 of file self_debug.hh.
References gem5::ArmISA::b, gem5::ArmISA::hmc, gem5::ArmISA::isSecure(), panic, and gem5::ArmISA::ssc.
Referenced by gem5::ArmISA::BrkPoint::isEnabled(), and gem5::ArmISA::WatchPoint::isEnabled().
|
inline |
Definition at line 393 of file self_debug.hh.
References aarch32, gem5::ArmISA::currEL(), gem5::ArmISA::EL0, gem5::ArmISA::EL1, and gem5::ArmISA::ELIs32().
Referenced by testBreakPoints(), and testWatchPoints().
|
inline |
Definition at line 337 of file self_debug.hh.
References gem5::bits(), sdd, and gem5::X86ISA::val.
Referenced by init(), and gem5::ArmISA::ISA::setMiscReg().
|
inline |
Definition at line 381 of file self_debug.hh.
References gem5::ArmISA::SoftwareStep::cpsrD, gem5::ArmISA::mask, and softStep.
Referenced by gem5::ArmISA::ISA::setMiscReg().
|
inline |
Definition at line 357 of file self_debug.hh.
References enableTdeTge.
Referenced by init(), and gem5::ArmISA::ISA::setMiscReg().
|
inline |
Definition at line 351 of file self_debug.hh.
References gem5::bits(), mde, and gem5::X86ISA::val.
Referenced by gem5::ArmISA::ISA::setMiscReg().
|
inline |
Definition at line 343 of file self_debug.hh.
References gem5::bits(), gem5::ArmISA::SoftwareStep::bSS, kde, mde, softStep, and gem5::X86ISA::val.
Referenced by init(), and gem5::ArmISA::ISA::setMiscReg().
|
inline |
Definition at line 410 of file self_debug.hh.
References aarch32, gem5::ArmISA::debugTargetFrom(), gem5::ArmISA::ELIs32(), and gem5::ArmISA::isSecure().
Referenced by testBreakPoints(), and testWatchPoints().
|
protected |
Definition at line 74 of file self_debug.cc.
References arBrkPoints, gem5::PCStateBase::as(), gem5::ArmISA::currEL(), gem5::ArmISA::el, isDebugEnabled(), mde, gem5::NoFault, gem5::MipsISA::p, gem5::GenericISA::PCStateWithNext::pc(), gem5::MipsISA::pc, gem5::ThreadContext::pcState(), setAArch32(), targetAArch32(), to32, triggerException(), and gem5::MipsISA::vaddr.
Referenced by testDebug().
Fault gem5::SelfDebug::testDebug | ( | ThreadContext * | tc, |
const RequestPtr & | req, | ||
BaseMMU::Mode | mode ) |
Definition at line 51 of file self_debug.cc.
References gem5::ArmISA::SoftwareStep::advanceSS(), gem5::BaseMMU::Execute, gem5::ArmISA::md, gem5::ArmISA::mode, gem5::NoFault, softStep, testBreakPoints(), testWatchPoints(), and gem5::BaseMMU::Write.
|
protected |
Definition at line 121 of file self_debug.cc.
References arWatchPoints, gem5::ArmISA::atomic, gem5::ArmISA::cm, gem5::ArmISA::currEL(), gem5::ArmISA::el, isDebugEnabled(), mde, gem5::NoFault, gem5::MipsISA::p, setAArch32(), targetAArch32(), to32, triggerWatchpointException(), and gem5::MipsISA::vaddr.
Referenced by testDebug().
|
protected |
Definition at line 108 of file self_debug.cc.
References gem5::ArmISA::ArmFault::BRKPOINT, gem5::ArmISA::ArmFault::DebugEvent, to32, gem5::ArmISA::ArmFault::UnknownTran, and gem5::MipsISA::vaddr.
Referenced by testBreakPoints().
|
protected |
Definition at line 141 of file self_debug.cc.
References gem5::ArmISA::cm, gem5::ArmISA::d, gem5::ArmISA::ArmFault::DebugEvent, gem5::ArmISA::TlbEntry::NoAccess, to32, gem5::ArmISA::ArmFault::UnknownTran, gem5::MipsISA::vaddr, gem5::ArmISA::ArmFault::WPOINT_CM, and gem5::ArmISA::ArmFault::WPOINT_NOCM.
Referenced by testWatchPoints().
|
inline |
Definition at line 369 of file self_debug.hh.
References arBrkPoints, gem5::MipsISA::index, and gem5::X86ISA::val.
Referenced by gem5::ArmISA::ISA::setMiscReg().
|
inline |
Definition at line 375 of file self_debug.hh.
References arWatchPoints, gem5::MipsISA::index, and gem5::X86ISA::val.
Referenced by gem5::ArmISA::ISA::setMiscReg().
|
inline |
Definition at line 363 of file self_debug.hh.
References gem5::bits(), oslk, and gem5::X86ISA::val.
Referenced by init(), and gem5::ArmISA::ISA::setMiscReg().
|
private |
Definition at line 256 of file self_debug.hh.
Referenced by init(), isAArch32(), isDebugEnabled(), setAArch32(), and targetAArch32().
|
private |
Definition at line 245 of file self_debug.hh.
Referenced by activateDebug(), getBrkPoint(), init(), testBreakPoints(), and updateDBGBCR().
|
private |
Definition at line 246 of file self_debug.hh.
Referenced by init(), testWatchPoints(), and updateDBGWCR().
|
private |
Definition at line 249 of file self_debug.hh.
Referenced by isDebugEnabledForEL64(), and setenableTDETGE().
|
private |
Definition at line 253 of file self_debug.hh.
Referenced by isDebugEnabledForEL64(), and setMDSCRvals().
|
private |
Definition at line 251 of file self_debug.hh.
Referenced by enabled(), setMDBGen(), setMDSCRvals(), testBreakPoints(), and testWatchPoints().
|
private |
Definition at line 254 of file self_debug.hh.
Referenced by isDebugEnabledForEL32(), isDebugEnabledForEL64(), and updateOSLock().
|
private |
Definition at line 252 of file self_debug.hh.
Referenced by isDebugEnabledForEL64(), and setbSDD().
|
private |
Definition at line 247 of file self_debug.hh.
Referenced by enabled(), getSstep(), SelfDebug(), setDebugMask(), setMDSCRvals(), testDebug(), and ~SelfDebug().
|
private |
Definition at line 257 of file self_debug.hh.
Referenced by testBreakPoints(), testWatchPoints(), triggerException(), and triggerWatchpointException().