mirror of
https://git.stationery.faith/corn/corn.git
synced 2024-11-10 02:42:08 +00:00
fixes
This commit is contained in:
parent
2747693fdb
commit
451984595e
4 changed files with 4 additions and 11 deletions
2
Makefile
2
Makefile
|
@ -8,7 +8,7 @@ ISO_NAME=os_image.iso
|
||||||
CC=cc
|
CC=cc
|
||||||
LD=ld
|
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")
|
C_SRC=$(shell find $(SRC_DIR) -type f -name "*.c")
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
#include "arch/amd64/bindings.h"
|
|
||||||
#include <acpi.h>
|
#include <acpi.h>
|
||||||
#include <lib.h>
|
#include <lib.h>
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#include "bindings.h"
|
||||||
|
|
||||||
/* global state, idk a better way rn */
|
/* global state, idk a better way rn */
|
||||||
struct acpi_state state;
|
struct acpi_state state;
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,5 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#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
|
// PAGE MAP LEVEL 4 ENTRY
|
||||||
struct pml4 {
|
struct pml4 {
|
||||||
uint64_t present : 1;
|
uint64_t present : 1;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
void kmain() {
|
void kmain() {
|
||||||
while(1) {
|
while(1) {
|
||||||
asm("cli; hlt");
|
__asm__("cli; hlt");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue