mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-23 04:41:12 +00:00
thermosphere: don't trap memory register writes/don't migrate sw breakpoints
Makes no sense on a system with ASLR
This commit is contained in:
parent
2219494675
commit
a67d682c10
3 changed files with 0 additions and 22 deletions
|
@ -181,7 +181,6 @@ void handleIrqException(ExceptionStackFrame *frame, bool isLowerEl, bool isA32)
|
|||
// Deactivate the interrupt
|
||||
gicc->dir = iar;
|
||||
} else {
|
||||
if (irqId == 30) g_irqManager.gic.gicd->ispendr[0x80/32] = 0xFFFFFFFF;
|
||||
vgicEnqueuePhysicalIrq(irqId);
|
||||
}
|
||||
|
||||
|
|
|
@ -68,32 +68,14 @@ void doSystemRegisterWrite(ExceptionStackFrame *frame, u32 iss, u32 reg)
|
|||
|
||||
val = readFrameRegisterZ(frame, reg);
|
||||
|
||||
bool reevalSoftwareBreakpoints = false;
|
||||
|
||||
// Hooks go here:
|
||||
switch (iss) {
|
||||
case ENCODE_SYSREG_ISS(TTBR0_EL1):
|
||||
case ENCODE_SYSREG_ISS(TTBR1_EL1):
|
||||
case ENCODE_SYSREG_ISS(TCR_EL1):
|
||||
case ENCODE_SYSREG_ISS(SCTLR_EL1):
|
||||
reevalSoftwareBreakpoints = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (reevalSoftwareBreakpoints) {
|
||||
revertAllSoftwareBreakpoints();
|
||||
}
|
||||
|
||||
doSystemRegisterRwImpl(&val, iss);
|
||||
|
||||
if (reevalSoftwareBreakpoints) {
|
||||
__dsb_sy();
|
||||
__isb();
|
||||
applyAllSoftwareBreakpoints();
|
||||
}
|
||||
|
||||
skipFaultingInstruction(frame, 4);
|
||||
}
|
||||
|
||||
|
|
|
@ -34,9 +34,6 @@ void enableTraps(void)
|
|||
{
|
||||
u64 hcr = GET_SYSREG(hcr_el2);
|
||||
|
||||
// Trap memory-related sysreg writes (note: not supported by QEMU yet)
|
||||
hcr |= HCR_TVM;
|
||||
|
||||
// Trap SMC instructions
|
||||
hcr |= HCR_TSC;
|
||||
|
||||
|
|
Loading…
Reference in a new issue