From f0c23c6c3a1c4dd7c803e51f6155398d2d0d9f2c Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Sat, 18 Aug 2018 19:35:11 +0200 Subject: [PATCH] fix interrupt dumping --- kernel.asm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel.asm b/kernel.asm index 3d0b371..67aa235 100644 --- a/kernel.asm +++ b/kernel.asm @@ -17,7 +17,7 @@ macro KMaybeDumpString(str) { } macro KString(name, str) { - // appends trailing newline and null-termination. + // appends trailing newline and null-terminator. // must be shorter than 0x10000 after padding. align(16) {name}: @@ -81,6 +81,7 @@ Start: sw r0, K_64DRIVE_MAGIC(k0) sw r0, K_REASON(k0) sw r0, K_IN_MAIN(k0) + sw r0, K_CONSOLE_AVAILABLE(k0) Drive64Init: lui t9, CI_BASE @@ -110,15 +111,15 @@ Drive64Confirmed: Drive64CheckConsole: // NOTE: we only check at boot, so disconnecting the console // while running will cause a ton of lag (timeouts) until reset. - sw r0, K_CONSOLE_AVAILABLE(k0) KDumpString(KConsoleConfirmed) + lui k0, K_BASE // we need to reload this if dumping threw an interrupt lli t0, 1 beqzl v0, Drive64Done sw t0, K_CONSOLE_AVAILABLE(k0) Drive64Done: - // delay to empty pipeline? + // delay to empty pipeline nop nop nop