1
0
mirror of https://gitlab.os-k.eu/os-k-team/os-k.git synced 2023-08-25 14:03:10 +02:00

Panic fix

This commit is contained in:
Julian Barathieu 2019-03-19 14:03:13 +01:00
parent 94eccdc3d7
commit ef1467ea46
3 changed files with 8 additions and 8 deletions

View File

@ -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};

View File

@ -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();
}

View File

@ -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;
}