diff --git a/Makefile b/Makefile index 13ad832..da82431 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ ISO_NAME=os_image.iso CC=cc LD=ld -CFLAGS=-ffreestanding -g -Wall -Wextra -pedantic -lgcc -isystem $(INCLUDE_DIR) +CFLAGS=-std=c2x -ffreestanding -g -Wall -Wextra -pedantic -lgcc -isystem $(INCLUDE_DIR) C_SRC=$(shell find $(SRC_DIR) -type f -name "*.c") diff --git a/src/arch/amd64/acpi.c b/src/arch/amd64/acpi.c index 42c3e01..eb150fe 100644 --- a/src/arch/amd64/acpi.c +++ b/src/arch/amd64/acpi.c @@ -1,10 +1,11 @@ -#include "arch/amd64/bindings.h" #include #include #include #include +#include "bindings.h" + /* global state, idk a better way rn */ struct acpi_state state; diff --git a/src/arch/amd64/shim.c b/src/arch/amd64/shim.c index 0c2d418..e28291b 100644 --- a/src/arch/amd64/shim.c +++ b/src/arch/amd64/shim.c @@ -1,13 +1,5 @@ #include -#define PG_PRESENT 0x0000'0000'0000'0001 -#define PG_READ_WRITE 0x0000'0000'0000'0002 -#define PG_USER_SUPERVISE 0x0000'0000'0000'0004 -#define PG_WRITE_THROUGH 0x0000'0000'0000'0008 -#define PG_CACHE_DISABLE 0x0000'0000'0000'0010 -#define PG_ACCESSED 0x0000'0000'0000'0020 -#define PG_EXECUTE_DISABLE 0x8000'0000'0000'0000 - // PAGE MAP LEVEL 4 ENTRY struct pml4 { uint64_t present : 1; diff --git a/src/kmain.c b/src/kmain.c index 9f4d63d..2d8e959 100644 --- a/src/kmain.c +++ b/src/kmain.c @@ -1,5 +1,5 @@ void kmain() { while(1) { - asm("cli; hlt"); + __asm__("cli; hlt"); } }