diff --git a/kaleid/kernel/init/table.c b/kaleid/kernel/init/table.c index 10c52de..bc32fdb 100644 --- a/kaleid/kernel/init/table.c +++ b/kaleid/kernel/init/table.c @@ -27,8 +27,8 @@ int cpuCount = 1; Processor_t cpuTable[NCPUS] = {0}; -BootInfo_t bootTab = {0} +BootInfo_t bootTab = {0}; Terminal_t *StdOut = 0, *StdDbg = 0; -volatile char *PanicStr = 0; -Terminal_t *stdOut = 0, *stdDbg = 0; +volatile char PanicStr[PANICSTR_SIZE] = {0}; + diff --git a/kaleid/kernel/ke/panic.c b/kaleid/kernel/ke/panic.c index 4de0bfe..134ab33 100644 --- a/kaleid/kernel/ke/panic.c +++ b/kaleid/kernel/ke/panic.c @@ -37,8 +37,8 @@ noreturn void __assert_handler(const char *msg, (void)file; (void)line; (void)func; - StartPanic("cpu%d: In function '%s', from %s line %d - assertion failed: '%s'", - _GetCurCPU(), func, file, line, msg); + StartPanic("In function '%s', from %s line %d - assertion failed: '%s'", + func, file, line, msg); } // @@ -64,11 +64,11 @@ noreturn void StartPanic(const char *fmt, ...) } va_start(ap, fmt); - vsnprintf(PanicStr, PANICSTR_SIZE, fmt, ap); + vsnprintf((char *)PanicStr, PANICSTR_SIZE, fmt, ap); va_end(ap); PrintOnTermUnlocked(StdOut, "\nPanic!\n\n"); - PrintOnTermUnlocked(StdOut, PanicStr); + PrintOnTermUnlocked(StdOut, (char *)PanicStr); HaltCPU(); } diff --git a/kaleid/kernel/mm/map.c b/kaleid/kernel/mm/map.c index 6d29346..27b1748 100644 --- a/kaleid/kernel/mm/map.c +++ b/kaleid/kernel/mm/map.c @@ -28,7 +28,7 @@ error_t InitMemoryMap(void) { ///uint MapIsValid = (GetBootInfo(btldr).grubFlags & MULTIBOOT_INFO_MEM_MAP = MULTIBOOT_INFO_MEM_MAP ? 1 : 0); - KalAlwaysAssert(MapIsValid); + KalAlwaysAssert(0); return EOK; }