39#ifndef __ARCH_ARM_SELF_DEBUG_HH__
40#define __ARCH_ARM_SELF_DEBUG_HH__
79 bool vmid16,
bool aarch32):
160 SelfDebug* _conf,
bool lva,
bool aarch32) :
169 uint8_t
bas, uint8_t
mask,
unsigned size);
190 uint8_t
ssc, uint8_t
pac);
192 bool atomic,
unsigned size);
278 bool atomic,
unsigned size,
bool cm);
282 bool write,
bool cm);
296 case 0x0:
return true;
304 default:
panic(
"Unreachable value");
310 bool secure,
bool mask);
312 bool secure,
bool mask);
void updateControl(DBGBCR val)
bool test(ThreadContext *tc, Addr pc, ExceptionLevel el, DBGBCR ctr, bool from_link)
bool testLinkedBk(ThreadContext *tc, Addr vaddr, ExceptionLevel el)
const DBGBCR getControlReg(ThreadContext *tc)
bool isEnabled(ThreadContext *tc, ExceptionLevel el, uint8_t hmc, uint8_t ssc, uint8_t pmc)
MiscRegIndex ctrlRegIndex
vmid_t getVMIDfromReg(ThreadContext *tc, bool vs)
bool isActive(Addr vaddr)
BrkPoint(MiscRegIndex ctrl_index, MiscRegIndex val_index, SelfDebug *_conf, bool ctx_aw, bool lva, bool vmid16, bool aarch32)
bool testContextMatch(ThreadContext *tc, bool ctx1, bool low_ctx)
bool testAddrMissMatch(ThreadContext *tc, Addr pc, uint8_t bas)
bool testVMIDMatch(ThreadContext *tc)
RegVal getContextfromReg(ThreadContext *tc, bool ctxid1) const
bool testAddrMatch(ThreadContext *tc, Addr pc, uint8_t bas)
Addr getAddrfromReg(ThreadContext *tc) const
Fault triggerException(ThreadContext *tc, Addr vaddr)
bool targetAArch32(ThreadContext *tc)
void setenableTDETGE(HCR hcr, HDCR mdcr)
Fault triggerWatchpointException(ThreadContext *tc, Addr vaddr, bool write, bool cm)
BrkPoint * getBrkPoint(uint8_t index)
static bool securityStateMatch(ThreadContext *tc, uint8_t ssc, bool hmc)
void updateOSLock(RegVal val)
void setMDSCRvals(RegVal val)
void updateDBGBCR(int index, DBGBCR val)
Fault testBreakPoints(ThreadContext *tc, Addr vaddr)
Fault testDebug(ThreadContext *tc, const RequestPtr &req, BaseMMU::Mode mode)
bool isDebugEnabled(ThreadContext *tc)
std::vector< BrkPoint > arBrkPoints
void updateDBGWCR(int index, DBGWCR val)
void setMDBGen(RegVal val)
void setDebugMask(bool mask)
SoftwareStep * getSstep()
void setAArch32(ThreadContext *tc)
bool isDebugEnabledForEL64(ThreadContext *tc, ExceptionLevel el, bool secure, bool mask)
Fault testWatchPoints(ThreadContext *tc, Addr vaddr, bool write, bool atomic, unsigned size, bool cm)
bool isDebugEnabledForEL32(ThreadContext *tc, ExceptionLevel el, bool secure, bool mask)
std::vector< WatchPoint > arWatchPoints
bool advanceSS(ThreadContext *tc)
bool debugExceptionReturnSS(ThreadContext *tc, CPSR spsr, ExceptionLevel dest)
static const uint8_t ACTIVE_NOT_PENDING_STATE
SoftwareStep(SelfDebug *s)
static const uint8_t INACTIVE_STATE
static const uint8_t ACTIVE_PENDING_STATE
void updateControl(DBGWCR val)
MiscRegIndex ctrlRegIndex
bool compareAddress(ThreadContext *tc, Addr in_addr, uint8_t bas, uint8_t mask, unsigned size)
bool isEnabled(ThreadContext *tc, ExceptionLevel el, bool hmc, uint8_t ssc, uint8_t pac)
Addr getAddrfromReg(ThreadContext *tc)
bool isDoubleAligned(Addr addr)
WatchPoint(MiscRegIndex ctrl_index, MiscRegIndex val_index, SelfDebug *_conf, bool lva, bool aarch32)
bool test(ThreadContext *tc, Addr addr, ExceptionLevel el, bool &wrt, bool atomic, unsigned size)
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual RegVal readMiscReg(RegIndex misc_reg)=0
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
#define panic(...)
This implements a cprintf based panic() function.
Bitfield< 23, 20 > atomic
bool ELIs32(ThreadContext *tc, ExceptionLevel el)
ExceptionLevel debugTargetFrom(ThreadContext *tc, bool secure)
ExceptionLevel currEL(const ThreadContext *tc)
Returns the current Exception Level (EL) of the provided ThreadContext.
bool isSecure(ThreadContext *tc)
const FlagsType init
This Stat is Initialized.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::shared_ptr< FaultBase > Fault
std::shared_ptr< Request > RequestPtr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.