summaryrefslogtreecommitdiff
path: root/src/include/panic.h
diff options
context:
space:
mode:
authorBrett Weiland <brett_weiland@bpcspace.com>2021-04-18 16:00:17 -0500
committerBrett Weiland <brett_weiland@bpcspace.com>2021-04-18 16:00:17 -0500
commit774e3796b252383aafb8b3f30d51a19400c74516 (patch)
tree20ad93c125d4f6bad755e6a898ddb4259818b4fa /src/include/panic.h
parentf0602964daa20ad9cd05f097b943c8edbf2df2e2 (diff)
modified: src/bootloader/bios_functions/bios_disk.asm
modified: src/bootloader/bootloader.asm new file: src/include/kernel.h modified: src/include/libc.h modified: src/include/paging.h new file: src/include/panic.h modified: src/kernel/kernel.c modified: src/kernel/libc.c modified: src/kernel/page.c new file: src/kernel/panic.c modified: src/link.ld modified: src/makefile modified: tools/page/page.py
Diffstat (limited to 'src/include/panic.h')
-rw-r--r--src/include/panic.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/include/panic.h b/src/include/panic.h
new file mode 100644
index 0000000..1386348
--- /dev/null
+++ b/src/include/panic.h
@@ -0,0 +1,27 @@
+#ifndef PANIC_INCLUDED
+#define PANIC_INCLUDED
+
+#define EASTEREGG_BLOATWARE
+
+#include <stdint.h>
+
+void panic(int reason, int type);
+struct stack_frame {
+ struct stack_frame *next;
+ uint64_t function_base;
+} __attribute__((packed));
+
+//kernel panic reasons, likely to grow at an extremely fast rate
+#define KERNEL_PANIC_PMAPSIZE 0
+#define KERNEL_PANIC_RSDP_UNFOUND 1
+#define KERNEL_PANIC_KERNEL_RETURNED 2
+
+
+//kernel panic types, may or may not expand once I get further in development
+#define KERNEL_PANIC_INVOKED 0
+#define KERNEL_PANIC_ERROR 1 //i'll change this once I see what happends
+
+//TODO move this to some kind of global more accesable header
+#define DEV_EMAIL "brett_weiland@bpcspace.com"
+
+#endif