20 #include "pedigree/kernel/processor/Processor.h" 21 #include "pedigree/kernel/Log.h" 29 size_t nBpNumber, DebugFlags::FaultType &nFaultType,
size_t &nLength,
36 size_t nBpNumber, uintptr_t nLinearAddress,
37 DebugFlags::FaultType nFaultType,
size_t nLength)
47 asm volatile(
"sync; isync;");
49 asm volatile(
"mfmsr %0" :
"=r"(msr));
54 asm volatile(
"mtmsr %0" : :
"r"(msr));
55 asm volatile(
"sync; isync;");
61 state.m_Srr1 |= MSR_SE;
63 state.m_Srr1 &= ~MSR_SE;
66 void Processor::invalidateICache(uintptr_t nAddr)
68 asm volatile(
"icbi 0, %0" : :
"r"(nAddr));
71 void Processor::invalidateDCache(uintptr_t nAddr)
73 asm volatile(
"dcbi 0, %0" : :
"r"(nAddr));
76 void Processor::flushDCache(uintptr_t nAddr)
78 asm volatile(
"dcbst 0, %0" : :
"r"(nAddr));
81 void Processor::flushDCacheAndInvalidateICache(
82 uintptr_t startAddr, uintptr_t endAddr)
84 for (uintptr_t i = startAddr; i < endAddr; i += 4)
89 for (uintptr_t i = startAddr; i < endAddr; i += 4)
93 asm volatile(
"isync");
static uintptr_t getDebugBreakpoint(size_t nBpNumber, DebugFlags::FaultType &nFaultType, size_t &nLength, bool &bEnabled)
static void enableDebugBreakpoint(size_t nBpNumber, uintptr_t nLinearAddress, DebugFlags::FaultType nFaultType, size_t nLength)
static void setSingleStep(bool bEnable, InterruptState &state)
static void disableDebugBreakpoint(size_t nBpNumber)
static void setInterrupts(bool bEnable)
static size_t getDebugBreakpointCount()