Repository navigation
cpu: decode the R10000's cache algorithms from its own table - #268
Merged
Merged
Conversation
The R10000 is MIPS IV, so Config.K0 was read with the VR5000 table, where 4 and 5 are reserved and decode as uncached. On the R10000 they are the coherent algorithms (R10000 UM Table 4-1). An OS that runs KSEG0 with K0=5, as IRIX on the O2 does, had every kernel fetch, load and store sent uncached to the bus. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cpu: decode the R10000's cache algorithms from its own table
The R10000 is MIPS IV, so
decode_cache_attrread Config.K0 (and the TLB's C field) with the VR5000's table, where 4 and 5 are reserved and decode as uncached. On the R10000 they are the coherent cacheable algorithms (R10000 User's Manual, Table 4-1). An OS that runs KSEG0 with K0 = 5, as IRIX on the O2 does, had every kernel fetch, load and store sent uncached to the bus.The change
decode_cache_attrtakes the R10000's table whenC::R10K_CACHE_OPS:Effect on the IP28
None for IRIX: it runs KSEG0 with K0 = 3 (Config reads
0x6c01a003), which both tables decode as cacheable. On an emulated IP28 the change is only visible to a guest that picks 4 or 5.Tests
test_decode_cache_attr_matches_the_r10000_tablechecks all eight algorithms against Table 4-1; the existing R4400 and VR5000 table tests still pass.cargo test --lib: all pass, apart frombreakpoints_can_be_set_while_running_and_report_their_hitandudp_fragmented_both_ways, which fail the same way onmainhere. Built in the three CI configurations.cpubenchon that IP28, interleaved withmainover two rounds: the same 13.6 s total, every test within run-to-run noise (as expected with K0 = 3).🤖 Generated with Claude Code