summaryrefslogtreecommitdiff
path: root/kernel/entry.c
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2010-01-20 22:20:18 +0100
committerVegard Storheil Eriksen <zyp@jvnv.net>2010-01-20 22:20:37 +0100
commit63e9609b234b9eb8da73709491cac2233bbede35 (patch)
tree82a452e3e6641f4c6761f14e4c867f4bb9896323 /kernel/entry.c
parent043b8b9d4624d4208a330cbce9775c43f1bf1fc6 (diff)
Executing foo-module.
Diffstat (limited to 'kernel/entry.c')
-rw-r--r--kernel/entry.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/entry.c b/kernel/entry.c
index 2496d21..61ac82b 100644
--- a/kernel/entry.c
+++ b/kernel/entry.c
@@ -47,6 +47,8 @@ void entry_main(uint32_t mb_magic, multiboot_info* mb_info) {
entry_serial_out("No cmdline.\n");
}
+ entry_serial_out("Module addr: ");
+ entry_serial_out_hex(mb_info->mods_addr->mod_start);
// Create initial page tables.
for(unsigned int i = 0; i < 1024; i++) {
@@ -54,7 +56,8 @@ void entry_main(uint32_t mb_magic, multiboot_info* mb_info) {
entry_pagedir[i] = 0;
// Identity mapping of the current code.
- entry_pagetable_low[i] = ((uint32_t)&addr_phys & 0xffc00000) | (i << 12) | 0x003;
+ //entry_pagetable_low[i] = ((uint32_t)&addr_phys & 0xffc00000) | (i << 12) | 0x003;
+ entry_pagetable_low[i] = ((uint32_t)&addr_phys & 0xffc00000) | (i << 12) | 0x007;
// Map kernelspace.
if((i << 12) < ((uint32_t)&addr_virt_end & 0x003fffff)) {
@@ -64,7 +67,7 @@ void entry_main(uint32_t mb_magic, multiboot_info* mb_info) {
}
}
- entry_pagedir[(uint32_t)&addr_phys >> 22] = (uint32_t)&entry_pagetable_low | 0x003;
+ entry_pagedir[(uint32_t)&addr_phys >> 22] = (uint32_t)&entry_pagetable_low | 0x007;
entry_pagedir[(uint32_t)&addr_virt >> 22] = (uint32_t)&entry_pagetable_high | 0x003;
// Mapping stack to top without creating another page directory.