Skip to content
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

Merged
merged 3 commits into from Dec 5, 2014
Merged

TLB cache fixes #1654

merged 3 commits into from Dec 5, 2014

Conversation

skidau
Copy link
Contributor

@skidau skidau commented Dec 5, 2014

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.

Added TLB state to the save state file.
@JMC47
Copy link
Contributor

JMC47 commented Dec 5, 2014

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.

… always cleared on each invalidate command.

Initialised the TLB cache to start from a consistent state on reset.
@skidau skidau changed the title Updated C bit on TLB cache hits. TLB cache fixes Dec 5, 2014
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.

This comment was marked as off-topic.

This comment was marked as off-topic.

@RachelBryk
Copy link
Member

Added TLB state to the save state file.

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.

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.
skidau added a commit that referenced this pull request Dec 5, 2014
@skidau skidau merged commit 757077e into dolphin-emu:master Dec 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants