From bafc8298c68dc1a631ef818710311c01eccec137 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Mon, 15 Dec 2014 18:25:59 +0100 Subject: Access k_end_addr as const void instead of char. --- kernel/l0/kmain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kernel') 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 -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); -- cgit v1.2.3