aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/memory/paging.c
diff options
context:
space:
mode:
authorMarvin Borner2020-05-14 22:32:52 +0200
committerMarvin Borner2020-05-14 22:32:52 +0200
commit89b9cad0607d8fb81489143e312c1983e3e8a552 (patch)
treeef4a31e2f1fc5a471756f76ed5d0cabafd04a6bb /src/kernel/memory/paging.c
parent977aaa6e42d12d1237611673453ab9a9fbd46175 (diff)
Some attempts to fix it, nothing works
Diffstat (limited to 'src/kernel/memory/paging.c')
-rw-r--r--src/kernel/memory/paging.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/kernel/memory/paging.c b/src/kernel/memory/paging.c
index 05e37bd..edaa82e 100644
--- a/src/kernel/memory/paging.c
+++ b/src/kernel/memory/paging.c
@@ -6,8 +6,10 @@
int paging_enabled = 0;
+u32 tmp[1024][1024] __attribute__((aligned(4096)));
+struct page_directory *paging_kernel_directory = (struct page_directory *)tmp;
+
struct page_directory *paging_directory; // Current
-struct page_directory *paging_kernel_directory = 0x9d000;
void paging_init(struct page_directory *dir, int user)
{
@@ -40,10 +42,9 @@ void paging_install(u32 multiboot_address)
if (!memory_init(multiboot_address))
paging_set_present(0, memory_get_all() >> 3);
-
paging_set_used(0, ((u32)KERNEL_END >> 12) + 1); // /4096
- log("Enabling");
+ log("Enabling");
paging_enable();
log("Installed paging");
}
@@ -188,4 +189,4 @@ u32 paging_get_used_pages()
}
}
return n;
-} \ No newline at end of file
+}