forked from xamidev/pepperOS
Fix braces + init_paging args
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
/*
|
||||
* @author xamidev <xamidev@riseup.net>
|
||||
* @brief Kernel panic
|
||||
* @license GPL-3.0-only
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include "idt/idt.h"
|
||||
#include "io/serial/serial.h"
|
||||
@@ -8,8 +14,7 @@ extern struct init_status init;
|
||||
void panic(struct cpu_status_t* ctx, const char* str)
|
||||
{
|
||||
CLEAR_INTERRUPTS;
|
||||
if (ctx == NULL)
|
||||
{
|
||||
if (ctx == NULL) {
|
||||
DEBUG("\x1b[38;5;231m\x1b[48;5;196mKernel panic!!!\x1b[0m Something went horribly wrong! (no cpu ctx)");
|
||||
fctprintf((void*)&skputc, 0, "\x1b[38;5;231m\x1b[48;5;27m");
|
||||
DIE_DEBUG(str);
|
||||
@@ -18,8 +23,7 @@ void panic(struct cpu_status_t* ctx, const char* str)
|
||||
skputc('\n');
|
||||
DEBUG("\x1b[38;5;231m\x1b[48;5;196mend Kernel panic - halting...\x1b[0m");
|
||||
|
||||
if (init.terminal)
|
||||
{
|
||||
if (init.terminal) {
|
||||
printf("\r\n\x1b[38;5;231m\x1b[48;5;196mKernel panic!!!\x1b[48;5;232m Something went horribly wrong! (no cpu ctx)");
|
||||
printf("\r\n%s\r\n\x1b[38;5;231mend Kernel panic - halting...\x1b[0m", str);
|
||||
}
|
||||
@@ -32,8 +36,7 @@ void panic(struct cpu_status_t* ctx, const char* str)
|
||||
ctx->vector_number, ctx->error_code, ctx->rax, ctx->rbx, ctx->rcx, ctx->rdx, ctx->rsi, ctx->rdi,
|
||||
ctx->r8, ctx->r9, ctx->r10, ctx->r11, ctx->r12, ctx->r13, ctx->r14, ctx->r15, ctx->iret_flags);
|
||||
|
||||
if (init.terminal)
|
||||
{
|
||||
if (init.terminal) {
|
||||
printf("\r\n\x1b[38;5;231m\x1b[48;5;196mKernel panic!!!\x1b[48;5;232mat rip=%p\r\nSomething went horribly wrong! (%s) vect=0x%.2x errcode=0x%x\n\rrax=%p rbx=%p rcx=%p rdx=%p\n\rrsi=%p rdi=%p r8=%p r9=%p\n\rr10=%p r11=%p r12=%p r13=%p\n\rr14=%p r15=%p\n\n\rflags=%p\n\rHalting...\x1b[0m",
|
||||
ctx->iret_rip,
|
||||
str,
|
||||
|
||||
Reference in New Issue
Block a user