Reboot: reset RDRAM before putting it in standby mode

This commit is contained in:
Mateusz Faderewski 2023-08-20 22:03:14 +02:00
parent 9603e044e6
commit 105e648d92

View File

@ -6,10 +6,11 @@
#define RI_SELECT 0x0C #define RI_SELECT 0x0C
#define RI_REFRESH 0x10 #define RI_REFRESH 0x10
#define RI_LATENCY 0x14 #define RI_LATENCY 0x14
#define RI_RERROR 0x18
#define RI_WERROR 0x1C
#define RI_MODE_RESET 0x0000000E #define RI_MODE_RESET 0x0000000C
#define RI_MODE_STANDBY 0x0000000E
#define RDRAM_RESET_DELAY 1024
#define IPL3_ENTRY 0xA4000040 #define IPL3_ENTRY 0xA4000040
@ -49,6 +50,14 @@ reset_rdram:
sw $zero, RI_SELECT($t0) sw $zero, RI_SELECT($t0)
sw $zero, RI_REFRESH($t0) sw $zero, RI_REFRESH($t0)
li $t2, RDRAM_RESET_DELAY
delay:
addiu $t2, $t2, (-1)
bnez $t2, delay
li $t1, RI_MODE_STANDBY
sw $t1, RI_MODE($t0)
run_ipl3: run_ipl3:
li $t3, IPL3_ENTRY li $t3, IPL3_ENTRY
jr $t3 jr $t3