diff options
author | Marvin Borner | 2021-02-27 18:24:38 +0100 |
---|---|---|
committer | Marvin Borner | 2021-02-27 18:24:38 +0100 |
commit | 7304e20731980078a7bfe138a20a8d13653fed7b (patch) | |
tree | fbfce00a6a8017f842e8a165b563ab15a094eb84 /libc/inc | |
parent | 4309322f9d2b3e31421a3cc5399ab1f4368e0652 (diff) |
Started basic paging port from skiftOS
Diffstat (limited to 'libc/inc')
-rw-r--r-- | libc/inc/cpu.h | 6 | ||||
-rw-r--r-- | libc/inc/def.h | 2 |
2 files changed, 8 insertions, 0 deletions
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) |