From 7304e20731980078a7bfe138a20a8d13653fed7b Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 27 Feb 2021 18:24:38 +0100 Subject: Started basic paging port from skiftOS --- libc/inc/cpu.h | 6 ++++++ libc/inc/def.h | 2 ++ 2 files changed, 8 insertions(+) (limited to 'libc/inc') diff --git a/libc/inc/cpu.h b/libc/inc/cpu.h index fa82fbe..5c55913 100644 --- a/libc/inc/cpu.h +++ b/libc/inc/cpu.h @@ -27,6 +27,12 @@ void cpu_print(void); void cpu_enable_features(void); void fpu_restore(void); +u32 cr0_get(void); +void cr0_set(u32 cr0); +void cr3_set(u32 cr3); +u32 cr4_get(void); +void cr4_set(u32 cr4); + void cli(void); void sti(void); void hlt(void); diff --git a/libc/inc/def.h b/libc/inc/def.h index c8b9dbf..945ccb0 100644 --- a/libc/inc/def.h +++ b/libc/inc/def.h @@ -26,6 +26,8 @@ typedef unsigned long long u64; #define UNUSED(a) ((void)(a)) #define NO_SANITIZE __attribute__((no_sanitize("undefined"))) +#define PACKED __attribute__((packed)) +#define ALIGNED(align) __attribute__((aligned(align))) #define EOF (-1) #define NULL ((void *)0) -- cgit v1.2.3