kern: KSupervisorPageTable now checks wxn instead of setting it

This commit is contained in:
Michael Scire 2023-10-11 08:41:36 -07:00 committed by SciresM
parent 85b5f20395
commit b7384a8667
3 changed files with 7 additions and 10 deletions

View file

@ -372,6 +372,10 @@ namespace ams::kern::arch::arm64::cpu {
this->SetBit(19, en);
return *this;
}
constexpr ALWAYS_INLINE bool GetWxn() const {
return this->GetBits(19, 1) != 0;
}
};
/* Accessors for timer registers. */

View file

@ -23,9 +23,8 @@ namespace ams::kern::arch::arm64 {
class KSupervisorPageTable {
private:
KPageTable m_page_table;
u64 m_ttbr0_identity[cpu::NumCores];
public:
constexpr KSupervisorPageTable() : m_page_table(util::ConstantInitialize), m_ttbr0_identity() { /* ... */ }
constexpr KSupervisorPageTable() : m_page_table(util::ConstantInitialize) { /* ... */ }
NOINLINE void Initialize(s32 core_id);
@ -61,8 +60,6 @@ namespace ams::kern::arch::arm64 {
return m_page_table.GetPhysicalAddress(out, address);
}
constexpr u64 GetIdentityMapTtbr0(s32 core_id) const { return m_ttbr0_identity[core_id]; }
void DumpMemoryBlocks() const {
return m_page_table.DumpMemoryBlocks();
}