v2 initial commit

This commit is contained in:
Michael Shaw 2026-04-11 11:35:31 -04:00
commit d2ef885e8d
118 changed files with 2420 additions and 9320 deletions

View file

@ -6,43 +6,27 @@
#include <limine/limine.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <lib/stdio.h>
#include <lib/string.h>
#include <lib/errno.h>
#include <lib/math.h>
#include <lib/assert.h>
#include <kernel/types.h>
#include <kernel/bitwise.h>
#include <lib/stdio.h>
#define PACKED __attribute__((packed))
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#define ATTEMPT_WRITE(_x, _y) \
if (_x) { \
*(_x) = _y; \
*(_x) = _y; \
}
#define KB (1024ull)
#define MB (KB * KB)
#define GB (KB * MB)
#define RFLAGS_IF (1 << 9)
void yield();
void panic();
void cli();
void sti();
void _save_context();
void reboot();
void load_stack_and_jump(uintptr_t rsp, uintptr_t rbp, void *func, void *arg);
#define panic(...) \
{ \
kprintf(LOG_PANIC __VA_ARGS__); \
_panic(); \
}
typedef uintptr_t paddr_t;
typedef uint32_t paddr32_t;
typedef int64_t ssize_t;
typedef int mode_t;
typedef long dev_t;
void yield();
void _panic();
#endif /* _COMMON_H_ */