fix interrupt dumping

This commit is contained in:
Connor Olding 2018-08-18 19:35:11 +02:00
parent 540001d9a7
commit f0c23c6c3a

View file

@ -17,7 +17,7 @@ macro KMaybeDumpString(str) {
} }
macro KString(name, str) { macro KString(name, str) {
// appends trailing newline and null-termination. // appends trailing newline and null-terminator.
// must be shorter than 0x10000 after padding. // must be shorter than 0x10000 after padding.
align(16) align(16)
{name}: {name}:
@ -81,6 +81,7 @@ Start:
sw r0, K_64DRIVE_MAGIC(k0) sw r0, K_64DRIVE_MAGIC(k0)
sw r0, K_REASON(k0) sw r0, K_REASON(k0)
sw r0, K_IN_MAIN(k0) sw r0, K_IN_MAIN(k0)
sw r0, K_CONSOLE_AVAILABLE(k0)
Drive64Init: Drive64Init:
lui t9, CI_BASE lui t9, CI_BASE
@ -110,15 +111,15 @@ Drive64Confirmed:
Drive64CheckConsole: Drive64CheckConsole:
// NOTE: we only check at boot, so disconnecting the console // NOTE: we only check at boot, so disconnecting the console
// while running will cause a ton of lag (timeouts) until reset. // while running will cause a ton of lag (timeouts) until reset.
sw r0, K_CONSOLE_AVAILABLE(k0)
KDumpString(KConsoleConfirmed) KDumpString(KConsoleConfirmed)
lui k0, K_BASE // we need to reload this if dumping threw an interrupt
lli t0, 1 lli t0, 1
beqzl v0, Drive64Done beqzl v0, Drive64Done
sw t0, K_CONSOLE_AVAILABLE(k0) sw t0, K_CONSOLE_AVAILABLE(k0)
Drive64Done: Drive64Done:
// delay to empty pipeline? // delay to empty pipeline
nop nop
nop nop
nop nop