aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ens.fr>2014-12-15 18:25:59 +0100
committerAlex Auvolat <alex.auvolat@ens.fr>2014-12-15 18:25:59 +0100
commitbafc8298c68dc1a631ef818710311c01eccec137 (patch)
tree11d7b0e52d9ffd281faf470a74774cb2abb8b854
parent9a494b5b0718eafd89e4bb40dda33b0a4f6ee64f (diff)
downloadmacroscope-bafc8298c68dc1a631ef818710311c01eccec137.tar.gz
macroscope-bafc8298c68dc1a631ef818710311c01eccec137.zip
Access k_end_addr as const void instead of char.
-rw-r--r--kernel/l0/kmain.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/l0/kmain.c b/kernel/l0/kmain.c
index 2e34868..140a09f 100644
--- a/kernel/l0/kmain.c
+++ b/kernel/l0/kmain.c
@@ -14,7 +14,7 @@
#include <slab_alloc.h>
-extern char k_end_addr; // defined in linker script : 0xC0000000 plus kernel stuff
+extern const void k_end_addr; // defined in linker script : 0xC0000000 plus kernel stuff
void breakpoint_handler(registers_t *regs) {
dbg_printf("Breakpoint! (int3)\n");
@@ -145,7 +145,7 @@ void kmain(struct multiboot_info_t *mbd, int32_t mb_magic) {
// used for allocation of data structures before malloc is set up
// a pointer to this pointer is passed to the functions that might have
// to allocate memory ; they just increment it of the allocated quantity
- void* kernel_data_end = &k_end_addr;
+ void* kernel_data_end = (void*)&k_end_addr;
frame_init_allocator(total_ram, &kernel_data_end);
dbg_printf("kernel_data_end: 0x%p\n", kernel_data_end);