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

Fix RDRAM initialization #1111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Rosalie241
Copy link
Contributor

@Rosalie241 Rosalie241 commented Jan 14, 2025

This patch does the following:

  1. It changes the corrupt handler's toggle by checking all modules its CC value
  2. It fixes the idfield_value function which incorrectly captured the 16-24th bits instead of the 8-16th bits
  3. It only captures the first 15 bits instead of the full 16 bits for comparison
  4. It adds support for the swapfield value of the AddressSelect register
  5. It adds a bounds check to read_rdram_dram_corrupted for the dram address like read_rdram_dram has
  6. It fixes the mapping.end value in map_corrupt_rdram to match the one in device.c

This patch allows the libdragon IPL to boot without using hacks like setting the RI_SELECT register to a nonzero value or checking which register is targeted by a broadcast.

I want to thank @rasky for helping me debug some issues.

You can test this code using a simple n64-systemtest build with the libdragon IPL which only runs 1 test: n64-systemtest.zip

You can view the documentation here:

@Rosalie241 Rosalie241 marked this pull request as draft January 14, 2025 23:10
@Rosalie241 Rosalie241 force-pushed the rdram-init branch 2 times, most recently from 852bace to 32f4497 Compare January 14, 2025 23:59
@Rosalie241 Rosalie241 changed the title Implement RDRAM initialization without corrupted handler Fix RDRAM initialization Jan 14, 2025
@Rosalie241 Rosalie241 force-pushed the rdram-init branch 3 times, most recently from 0c61914 to 778b543 Compare January 15, 2025 00:34
@Rosalie241 Rosalie241 marked this pull request as ready for review January 15, 2025 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant