New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TLB cache fixes #1654
TLB cache fixes #1654
Conversation
Added TLB state to the save state file.
Fixes some MMU titles. |
memset(ppcState.dtlb_pa, 0, sizeof(ppcState.dtlb_pa)); | ||
ppcState.itlb_last = 0; | ||
memset(ppcState.itlb_va, 0, sizeof(ppcState.itlb_va)); | ||
memset(ppcState.itlb_pa, 0, sizeof(ppcState.itlb_pa)); | ||
ppcState.pagetable_base = 0; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
… always cleared on each invalidate command. Initialised the TLB cache to start from a consistent state on reset.
UPTE2 PTE2; | ||
PTE2.Hex = bswap((*(u32*)&pRAM[tlbe[0].pteg])); | ||
if (PTE2.C == 0) | ||
return 0; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Don't forget to update state version in State.cpp. |
} | ||
pteg_addr += 8; | ||
if ((pteg_addr >> 28) == 1) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Updated PTE.R bit on Write and Instruction fetch. Added code to read the PTE from MEM2 if the PTE is stored there. Refactored the two hash functions to reduce code duplication. Updated save state version.
Updated C bit on TLB cache hits.
Added TLB state to the save state file.
Removed the tag check in InvalidateTLBEntry. All four TLB entries are always cleared on each invalidate command.
Initialised the TLB cache to start from a consistent state on reset.
Stored a copy of the PTE in the TLB like the real hardware does.
Updated PTE.R bit on Write and Instruction fetch.
Added code to read the PTE from MEM2 if the PTE is stored there.
Refactored the two hash functions to reduce code duplication.
Updated save state version.