diff options
Diffstat (limited to 'kc/core/memory/memory.c')
| -rw-r--r-- | kc/core/memory/memory.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/kc/core/memory/memory.c b/kc/core/memory/memory.c index ee0d9ca..7071018 100644 --- a/kc/core/memory/memory.c +++ b/kc/core/memory/memory.c @@ -20,7 +20,7 @@ #include <kc.h> #include <core/memory.h> -#include <lib/kstdio.h> +#include <libc/stdio.h> #define align_next(x, a) (x + a - 1) & ~(a - 1) @@ -89,7 +89,7 @@ struct vm_tree *vm_get_tree(void) void page_init(void) { - kprintf("initializing page frame allocator\n"); + printf("initializing page frame allocator\n"); page_early_init(); page_stack_init(); } @@ -98,7 +98,7 @@ void page_init_final(void) { if (current_alloc_func == boot_page_alloc) { - kprintf("finishing page frame allocator initialization\n"); + printf("finishing page frame allocator initialization\n"); page_early_final(); current_alloc_func = page_stack_alloc; } @@ -176,7 +176,7 @@ static void *map_tableset(void *vaddr, uint64_t *tables[TABLESET_COUNT]) } else { - kprintf("error: failed allocating memory for page table\n"); + printf("error: failed allocating memory for page table\n"); PANIC(OUT_OF_MEMORY); } } @@ -380,7 +380,7 @@ static void temp_page_unmap(void *vaddr) static void vm_init(void) { - kprintf("initializing vm state\n"); + printf("initializing vm state\n"); struct kc_boot_data *boot_data = get_boot_data(); struct vm_core_static_state *states = &vm_state.statics[0]; @@ -433,7 +433,7 @@ static void vm_init(void) vm_state.zero_page = page_alloc(PAGE_ALLOC_CONV); if (!vm_state.zero_page) { - kprintf("failed allocating for zero page\n"); + printf("failed allocating for zero page\n"); PANIC(GENERAL_PANIC); } @@ -441,7 +441,7 @@ static void vm_init(void) if (!zero_temp) { - kprintf("failed mapping zero page for initialization\n"); + printf("failed mapping zero page for initialization\n"); PANIC(GENERAL_PANIC); } @@ -492,7 +492,7 @@ void *heap_alloc(size_t size) if ((void *)-1ULL == heap_root) { struct vm_tree_node *heap_node = &vm_state.statics[HEAP_VM_STATE].node; - kprintf("initializing heap at %#lx of %zu bytes\n", + printf("initializing heap at %#lx of %zu bytes\n", heap_node->key.address, heap_node->key.size); heap_root = NULL; header = (struct heap_header *)heap_node->key.address; @@ -650,7 +650,7 @@ int anonymous_page_handler( if (!paddr) { - kprintf("got zero from page_alloc :|\n"); + printf("got zero from page_alloc :|\n"); PANIC(OUT_OF_MEMORY); } page_map_at( @@ -676,14 +676,14 @@ void page_fault_handler(struct isr_context *context) if (!node) { print_exception_context(context); - kprintf("error: page fault in unmanaged address %#lx\n", address); + printf("error: page fault in unmanaged address %#lx\n", address); PANIC(UNHANDLED_FAULT); } if (!node->object->handler) { print_exception_context(context); - kprintf("error: vm object at %p has no fault handler\n"); + printf("error: vm object at %p has no fault handler\n"); PANIC(UNHANDLED_FAULT); } @@ -693,7 +693,7 @@ void page_fault_handler(struct isr_context *context) void general_protection_handler(struct isr_context *context) { //TODO: implement #gp handler - kprintf("general protection violation\n"); + printf("general protection violation\n"); print_exception_context(context); PANIC(UNHANDLED_FAULT); } |
