aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/l0/kmain.c2
-rw-r--r--kernel/l0/paging.c2
-rw-r--r--kernel/l0/region.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/kernel/l0/kmain.c b/kernel/l0/kmain.c
index a221b0e..1f290a7 100644
--- a/kernel/l0/kmain.c
+++ b/kernel/l0/kmain.c
@@ -25,7 +25,7 @@ void test_pf_handler(pagedir_t *pd, region_info_t *i, size_t addr) {
if (error) PANIC("Could not map frame (OOM)");
}
-extern char k_end_addr; // defined in linker script : 0xC0000000
+extern char k_end_addr; // defined in linker script : 0xC0000000 plus kernel stuff
void kmain(struct multiboot_info_t *mbd, int32_t mb_magic) {
dbglog_setup();
diff --git a/kernel/l0/paging.c b/kernel/l0/paging.c
index 74f3d09..0104d5e 100644
--- a/kernel/l0/paging.c
+++ b/kernel/l0/paging.c
@@ -127,7 +127,7 @@ pagedir_t *get_kernel_pagedir() {
}
void switch_pagedir(pagedir_t *pd) {
- asm volatile("movl %0, %%cr3":: "r"(pd->phys_addr));
+ asm volatile("movl %0, %%cr3":: "r"(pd->phys_addr));
invlpg((size_t)current_pd);
current_pd_d = pd;
}
diff --git a/kernel/l0/region.c b/kernel/l0/region.c
index 6001346..5673f83 100644
--- a/kernel/l0/region.c
+++ b/kernel/l0/region.c
@@ -17,7 +17,7 @@ typedef union region_descriptor {
} used;
} descriptor_t;
-#define N_RESERVE_DESCRIPTORS 2 // always keep at least 3 unused descriptors
+#define N_RESERVE_DESCRIPTORS 2 // always keep at least 2 unused descriptors
#define N_BASE_DESCRIPTORS 12 // pre-allocate memory for 12 descriptors
static descriptor_t base_descriptors[N_BASE_DESCRIPTORS];