thermosphere: sysreg traps

This commit is contained in:
TuxSH
2020-02-25 00:28:14 +00:00
parent 797cea0ac8
commit 0437867449
7 changed files with 272 additions and 251 deletions

View File

@@ -68,11 +68,11 @@ namespace ams::hvisor::traps {
if (VirtualGic::ValidateGicdRegisterAccess(off, sz)) {
if (dabtIss.wnr) {
// Register write
u32 reg = frame->ReadFrameRegister<u32>(dabtIss.srt);
u32 reg = frame->ReadRegister<u32>(dabtIss.srt);
VirtualGic::GetInstance().WriteGicdRegister(reg, off, sz);
} else {
// Reigster read
frame->WriteFrameRegister(dabtIss.srt, VirtualGic::GetInstance().ReadGicdRegister(off, sz));
frame->WriteRegister(dabtIss.srt, VirtualGic::GetInstance().ReadGicdRegister(off, sz));
}
} else {
// Invalid GICD access
@@ -86,4 +86,4 @@ namespace ams::hvisor::traps {
frame->SkipInstruction(esr.il == 0 ? 2 : 4);
}
}
}