 |
Xyris
0.5
|
Go to the documentation of this file.
19 #include <x86gprintrin.h>
21 #define PANIC_MAX_TRACE 64
22 #define PANIC_MOO_BUF_SZ 256
23 #define PANIC_MSG_BUF_SZ 256
24 #define PANIC_REG_BUG_SZ 512
25 #define PANIC_COLOR_FORE 0xFFFFFF
26 #define PANIC_COLOR_BACK 0x2D2D2D
28 #define PANIC_REG_DUMP_MSG "Kernel exception - Dumping register state..."
31 "Oh, it’s you. It’s been a long time.\nHow have you been?",
32 "Sorry, I accidentally let the magic smoke out.",
33 "Not sure how we got here, but here we are.",
34 "Whatever you just did, don't do it again.",
35 "Something udderly terrible happened!",
36 "Still more stable than DOS!",
37 "Yeah, that's about right.",
38 "I'm Moo, the Xryis cow!",
39 "Guru meditation time!",
40 "Yahaha, you found me!",
46 static void printMoo()
82 [[noreturn]]
void panic(
const char* msg)
84 panicInternal(msg, NULL);
87 [[noreturn]]
void panicf(
const char* fmt, ...)
const size_t funnyMessagesForMooSize
int ksprintf(char *buf, const char *fmt,...)
Sends formatted output to a string.
int kvsprintf(char *buf, const char *fmt, va_list args)
Sends formatted output to a string using an argument list.
void printTrace(size_t max)
void registersToString(char *buf, struct registers *regs)
Write all register names and values as a string to a buffer. Provided buffer size must also take esca...
A structure definining values for all x86 registers. Cannot be namespaced due to C linkage and ASM in...
#define log_all(fmt,...)
Prints a statement to serial debugger and the kernel framebuffer. Max message size is 1024 (including...
A simple, write-only driver for the RS232 serial device standard. Code mostly ported from Panix-Archi...
void panicf(const char *fmt,...)
Halt the system and print the provided message and arguments on the panic screen.
void registersPrintInformation(struct registers *regs)
Print register information to all kernel terminals (serial, framebuffer, etc.). Used for panic and de...
void haltAndCatchFire()
Disable interrupts and halts execution.
const char * funnyMessagesForMoo[]
void reset(uint32_t fore, uint32_t back)
void panic(const char *msg)
Halt the system and print the provided message on the panic screen.
Framebuffer * getFramebuffer()
Get a pointer to the active framebuffer.
#define PANIC_REG_DUMP_MSG
void putrect(uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint32_t color)
Draws and fills a rectangle of a given width and height, and color at the provided coordinates.