mirror of
https://github.com/Tom-on64/kern.git
synced 2026-11-03 18:22:22 +00:00
Got memory info from multiboot & minor adjustments
This commit is contained in:
+13
-2
@@ -60,6 +60,13 @@ typedef int32_t ssize_t;
|
||||
typedef uint32_t uintptr_t;
|
||||
typedef int32_t intptr_t;
|
||||
|
||||
/*
|
||||
* Boolean
|
||||
*/
|
||||
#define bool _Bool
|
||||
#define true 1
|
||||
#define false 0
|
||||
|
||||
/*
|
||||
* Logging and errors
|
||||
*/
|
||||
@@ -69,7 +76,11 @@ typedef int32_t intptr_t;
|
||||
#define WARN() NULL
|
||||
#define BUG_ON(_e) ((_e) ? BUG() : NULL)
|
||||
#define WARN_ON(_e) ((_e) ? WARN() : NULL)
|
||||
// TODO: Write a panic()
|
||||
#define panic(_s) while(1);
|
||||
#include <serial.h>
|
||||
__noreturn static inline void panic(char* s) {
|
||||
serial_puts(COM1, s);
|
||||
__asm__ volatile("cli");
|
||||
while (1) __asm__ volatile ("hlt");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user