thermosphere: add proper memory/instruction barriers for breakpoint stuff
This commit is contained in:
@@ -74,12 +74,14 @@ static inline bool doApplySoftwareBreakpoint(size_t id)
|
||||
static void applySoftwareBreakpointHandler(void *p)
|
||||
{
|
||||
u64 flags = maskIrq();
|
||||
__dmb_sy();
|
||||
doApplySoftwareBreakpoint(*(size_t *)p);
|
||||
restoreInterruptFlags(flags);
|
||||
}
|
||||
|
||||
static void applySoftwareBreakpoint(size_t id)
|
||||
{
|
||||
__dmb_sy();
|
||||
executeFunctionOnAllCores(applySoftwareBreakpointHandler, &id, true);
|
||||
}
|
||||
|
||||
@@ -101,12 +103,14 @@ static inline bool doRevertSoftwareBreakpoint(size_t id)
|
||||
static void revertSoftwareBreakpointHandler(void *p)
|
||||
{
|
||||
u64 flags = maskIrq();
|
||||
__dmb_sy();
|
||||
doRevertSoftwareBreakpoint(*(size_t *)p);
|
||||
restoreInterruptFlags(flags);
|
||||
}
|
||||
|
||||
static void revertSoftwareBreakpoint(size_t id)
|
||||
{
|
||||
__dmb_sy();
|
||||
executeFunctionOnAllCores(revertSoftwareBreakpointHandler, &id, true);
|
||||
}
|
||||
|
||||
@@ -223,4 +227,4 @@ int removeAllSoftwareBreakpoints(bool keepPersistent)
|
||||
recursiveSpinlockUnlock(&g_softwareBreakpointManager.lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user