kern: KSupervisorPageTable now checks wxn instead of setting it

This commit is contained in:
Michael Scire 2023-10-11 08:41:36 -07:00
parent c82d363682
commit b8b04d1bf3
3 changed files with 7 additions and 10 deletions

View file

@ -18,12 +18,8 @@
namespace ams::kern::arch::arm64 {
void KSupervisorPageTable::Initialize(s32 core_id) {
/* Get the identity mapping ttbr0. */
m_ttbr0_identity[core_id] = cpu::GetTtbr0El1();
/* Set sctlr_el1 */
cpu::SystemControlRegisterAccessor().SetWxn(true).Store();
cpu::EnsureInstructionConsistency();
/* Verify that sctlr_el1 has the wxn bit set. */
MESOSPHERE_ABORT_UNLESS(cpu::SystemControlRegisterAccessor().GetWxn());
/* Invalidate the entire TLB. */
cpu::InvalidateEntireTlb();