From 71c73dd493db93363046fb00b3832b734d91ec4c Mon Sep 17 00:00:00 2001 From: nub31 Date: Wed, 3 Sep 2025 14:57:07 +0200 Subject: [PATCH] ... --- src/arch/arch.h | 19 ++++++++++++++++++- src/arch/mmap.h | 18 ------------------ src/arch/x86_64/mmap.c | 2 +- src/pmm.c | 2 +- 4 files changed, 20 insertions(+), 21 deletions(-) delete mode 100644 src/arch/mmap.h diff --git a/src/arch/arch.h b/src/arch/arch.h index 37e677d..d81ba4b 100644 --- a/src/arch/arch.h +++ b/src/arch/arch.h @@ -1,4 +1,21 @@ #pragma once +#include +#include + +typedef struct +{ + uint64_t base_address; + size_t length; +} memory_region_t; + +typedef struct +{ + memory_region_t* regions; + size_t num_regions; +} memory_map_t; + void panic(); -void put_char(char character); \ No newline at end of file +void put_char(char character); + +extern memory_map_t memory_map; \ No newline at end of file diff --git a/src/arch/mmap.h b/src/arch/mmap.h deleted file mode 100644 index 8bcc65e..0000000 --- a/src/arch/mmap.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#include -#include - -typedef struct -{ - uint64_t base_address; - size_t length; -} memory_region_t; - -typedef struct -{ - memory_region_t* regions; - size_t num_regions; -} memory_map_t; - -extern memory_map_t memory_map; \ No newline at end of file diff --git a/src/arch/x86_64/mmap.c b/src/arch/x86_64/mmap.c index 43c9725..a525254 100644 --- a/src/arch/x86_64/mmap.c +++ b/src/arch/x86_64/mmap.c @@ -1,5 +1,5 @@ #include "mmap.h" -#include "../mmap.h" +#include "../arch.h" #include #include diff --git a/src/pmm.c b/src/pmm.c index 91586e4..535e5a0 100644 --- a/src/pmm.c +++ b/src/pmm.c @@ -1,5 +1,5 @@ #include "pmm.h" -#include "arch/mmap.h" +#include "arch/arch.h" #include #include #include