From 7f7b3d61baf46fe358d3f1bd1cb584e0daed3a81 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Mon, 25 Oct 2021 19:40:53 +0300 Subject: Some minor changes to virtual memory handling + Should start to think about how virtual memory should be handled efficiently, I'm sort of flailing around and not actually doing anything beneficial. The mapping system I've so far implemented _works_, but it's not good and I'm not happy with it. I might come back and fix/improve it, but I think I'll go ahead and do other things for a while, might give me a better overhead view of what the virtual memory system should do. + TODO: should probably document the memory layout I'm going with at the moment. --- include/apos/init.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'include/apos/init.h') diff --git a/include/apos/init.h b/include/apos/init.h index 05e24ba..2dd8a27 100644 --- a/include/apos/init.h +++ b/include/apos/init.h @@ -2,6 +2,7 @@ #define APOS_INIT_H #include +#include struct init_data_t { pm_t init_base; @@ -10,6 +11,9 @@ struct init_data_t { pm_t initrd_base; pm_t initrd_top; + pm_t pmap_base; + pm_t pmap_top; + pm_t fdt_base; pm_t fdt_top; @@ -17,12 +21,11 @@ struct init_data_t { pm_t stack_top; struct vm_branch_t *kernel_vm_base; + vm_t tmp_pte; - /* - TODO: is this necessary? - pm_t pmap_base; - pm_t pmap_top; - */ + size_t max_order; + size_t bits[10]; + size_t page_shift; }; #endif /* APOS_INIT_H */ -- cgit v1.3