Panic fix
This commit is contained in:
parent
94eccdc3d7
commit
ef1467ea46
|
@ -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};
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue