MMU: Always use data read for the PTE lookup in TranslatePageAddress.

This commit is contained in:
Admiral H. Curtiss 2023-11-30 22:15:50 +01:00
parent 5d2fc0147e
commit 0d6a0724fd
No known key found for this signature in database
GPG Key ID: F051B4C4044F33FB
1 changed files with 4 additions and 2 deletions

View File

@ -1464,11 +1464,13 @@ MMU::TranslateAddressResult MMU::TranslatePageAddress(const EffectiveAddress add
for (int i = 0; i < 8; i++, pteg_addr += 8)
{
const u32 pteg = ReadFromHardware<flag, u32, true>(pteg_addr);
constexpr XCheckTLBFlag pte_read_flag =
IsNoExceptionFlag(flag) ? XCheckTLBFlag::NoException : XCheckTLBFlag::Read;
const u32 pteg = ReadFromHardware<pte_read_flag, u32, true>(pteg_addr);
if (pte1.Hex == pteg)
{
UPTE_Hi pte2(ReadFromHardware<flag, u32, true>(pteg_addr + 4));
UPTE_Hi pte2(ReadFromHardware<pte_read_flag, u32, true>(pteg_addr + 4));
// set the access bits
switch (flag)