diff --git a/src/kernel/core/arch/ppc/arch_int.c b/src/kernel/core/arch/ppc/arch_int.c index d3d5cdff61..eabc17ecba 100755 --- a/src/kernel/core/arch/ppc/arch_int.c +++ b/src/kernel/core/arch/ppc/arch_int.c @@ -1,5 +1,5 @@ /* - * Copyright 2003-2004, Axel Dörfler, axeld@pinc-software.de. + * Copyright 2003-2005, Axel Dörfler, axeld@pinc-software.de. * Distributed under the terms of the MIT License. * * Copyright 2001, Travis Geiselbrecht. All rights reserved. @@ -163,15 +163,15 @@ arch_int_init(kernel_args *args) status_t arch_int_init_post_vm(kernel_args *args) { - region_id exception_region; + area_id exceptionArea; void *handlers; // create a region to map the irq vector code into (physical address 0x0) handlers = (void *)args->arch_args.exception_handlers.start; - exception_region = vm_create_anonymous_region(vm_get_kernel_aspace_id(), "exception_handlers", + exceptionArea = create_area("exception_handlers", &handlers, B_EXACT_ADDRESS, args->arch_args.exception_handlers.size, B_ALREADY_WIRED, B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA); - if (exception_region < 0) + if (exceptionArea < B_OK) panic("arch_int_init2: could not create exception handler region\n"); dprintf("exception handlers at %p\n", handlers); diff --git a/src/kernel/core/arch/ppc/arch_thread.c b/src/kernel/core/arch/ppc/arch_thread.c index f6396ab147..55201509dd 100755 --- a/src/kernel/core/arch/ppc/arch_thread.c +++ b/src/kernel/core/arch/ppc/arch_thread.c @@ -1,5 +1,5 @@ /* - * Copyright 2003-2004, Axel Dörfler, axeld@pinc-software.de. + * Copyright 2003-2005, Axel Dörfler, axeld@pinc-software.de. * Distributed under the terms of the MIT License. * * Copyright 2001, Travis Geiselbrecht. All rights reserved. @@ -10,6 +10,8 @@ #include #include #include +#include +//#include #include @@ -42,7 +44,7 @@ status_t arch_thread_init_kthread_stack(struct thread *t, int (*start_func)(void), void (*entry_func)(void), void (*exit_func)(void)) { addr_t *kstack = (addr_t *)t->kernel_stack_base; - size_t kstack_size = KSTACK_SIZE; + size_t kstack_size = KERNEL_STACK_SIZE; addr_t *kstack_top = kstack + kstack_size / sizeof(addr_t) - 2 * 4; // r13-r31, cr, r2 @@ -88,7 +90,7 @@ arch_thread_context_switch(struct thread *t_from, struct thread *t_to) // set the new kernel stack in the EAR register. // this is used in the exception handler code to decide what kernel stack to // switch to if the exception had happened when the processor was in user mode - asm("mtear %0" :: "g"(t_to->kernel_stack_base + KSTACK_SIZE - 8)); + asm("mtear %0" :: "g"(t_to->kernel_stack_base + KERNEL_STACK_SIZE - 8)); // switch the asids if we need to if (t_to->team->aspace != NULL) { diff --git a/src/kernel/core/arch/ppc/arch_vm_translation_map.cpp b/src/kernel/core/arch/ppc/arch_vm_translation_map.cpp index 5c07b9dcb0..28cb63cb22 100644 --- a/src/kernel/core/arch/ppc/arch_vm_translation_map.cpp +++ b/src/kernel/core/arch/ppc/arch_vm_translation_map.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2003-2004, Axel Dörfler, axeld@pinc-software.de. + * Copyright 2003-2005, Axel Dörfler, axeld@pinc-software.de. * Distributed under the terms of the MIT License. * * Copyright 2001, Travis Geiselbrecht. All rights reserved. @@ -448,8 +448,7 @@ status_t arch_vm_translation_map_init_post_area(kernel_args *args) { // create a region to cover the page table - sPageTableRegion = vm_create_anonymous_region(vm_get_kernel_aspace_id(), - "page_table", (void **)&sPageTable, B_EXACT_ADDRESS, + sPageTableRegion = create_area("page_table", (void **)&sPageTable, B_EXACT_ADDRESS, sPageTableSize, B_ALREADY_WIRED, B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA); // ToDo: for now just map 0 - 512MB of physical memory to the iospace region @@ -492,7 +491,7 @@ arch_vm_translation_map_init_post_area(kernel_args *args) // create a region to cover the iospace void *temp = (void *)IOSPACE_BASE; - vm_create_null_region(vm_get_kernel_aspace_id(), "iospace", &temp, + vm_create_null_area(vm_get_kernel_aspace_id(), "iospace", &temp, B_EXACT_ADDRESS, IOSPACE_SIZE); return 0;