diff --git a/src/system/kernel/arch/x86/arch_cpu.cpp b/src/system/kernel/arch/x86/arch_cpu.cpp index b25ff0ed5f..066fadee6d 100644 --- a/src/system/kernel/arch/x86/arch_cpu.cpp +++ b/src/system/kernel/arch/x86/arch_cpu.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2002-2009, Axel Dörfler, axeld@pinc-software.de. + * Copyright 2002-2010, Axel Dörfler, axeld@pinc-software.de. * Distributed under the terms of the MIT License. * * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved. @@ -691,9 +691,10 @@ arch_cpu_init_post_vm(kernel_args *args) //i386_selector_init(gGDT); // pass the new gdt // allocate an area for the double fault stacks - create_area("double fault stacks", (void**)&sDoubleFaultStacks, - B_ANY_KERNEL_ADDRESS, kDoubleFaultStackSize * smp_get_num_cpus(), - B_FULL_LOCK, B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA); + create_area_etc(B_SYSTEM_TEAM, "double fault stacks", + (void**)&sDoubleFaultStacks, B_ANY_KERNEL_ADDRESS, + kDoubleFaultStackSize * smp_get_num_cpus(), B_FULL_LOCK, + B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA, 0, CREATE_AREA_DONT_WAIT); vm_translation_map_arch_info* kernelArchTranslationMap = static_cast( diff --git a/src/system/kernel/arch/x86/arch_int.cpp b/src/system/kernel/arch/x86/arch_int.cpp index 55bca5cd37..c3ee032432 100644 --- a/src/system/kernel/arch/x86/arch_int.cpp +++ b/src/system/kernel/arch/x86/arch_int.cpp @@ -1371,8 +1371,9 @@ arch_int_init_post_vm(struct kernel_args *args) if (cpuCount > 0) { size_t areaSize = ROUNDUP(cpuCount * idtSize, B_PAGE_SIZE); desc_table* idt; - area = create_area("idt", (void**)&idt, B_ANY_KERNEL_ADDRESS, - areaSize, B_CONTIGUOUS, B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA); + area = create_area_etc(B_SYSTEM_TEAM, "idt", (void**)&idt, + B_ANY_KERNEL_ADDRESS, areaSize, B_CONTIGUOUS, + B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA, 0, CREATE_AREA_DONT_WAIT); if (area < 0) return area; diff --git a/src/system/kernel/arch/x86/x86_physical_page_mapper_large_memory.cpp b/src/system/kernel/arch/x86/x86_physical_page_mapper_large_memory.cpp index 82ba13d47b..99dd350e7c 100644 --- a/src/system/kernel/arch/x86/x86_physical_page_mapper_large_memory.cpp +++ b/src/system/kernel/arch/x86/x86_physical_page_mapper_large_memory.cpp @@ -3,7 +3,8 @@ * Distributed under the terms of the MIT License. */ -/* Implementation of a physical page mapping strategy (PhysicalPageMapper, + +/*! Implementation of a physical page mapping strategy (PhysicalPageMapper, TranslationMapPhysicalPageMapper) suitable for machines with a lot of memory, i.e. more than we can afford to completely map into the kernel address space. @@ -866,9 +867,9 @@ LargeMemoryPhysicalPageMapper::_AllocatePool(PhysicalPageSlotPool*& _pool) // structures size_t areaSize = B_PAGE_SIZE + sizeof(PhysicalPageSlot[1024]); void* data; - area_id dataArea = create_area("physical page pool", &data, - B_ANY_KERNEL_ADDRESS, PAGE_ALIGN(areaSize), B_FULL_LOCK, - B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA); + area_id dataArea = create_area_etc(B_SYSTEM_TEAM, "physical page pool", + &data, B_ANY_KERNEL_ADDRESS, PAGE_ALIGN(areaSize), B_FULL_LOCK, + B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA, 0, CREATE_AREA_DONT_WAIT); if (dataArea < 0) return dataArea; diff --git a/src/system/kernel/debug/debug_heap.cpp b/src/system/kernel/debug/debug_heap.cpp index c5cec0cf68..20c5f518d2 100644 --- a/src/system/kernel/debug/debug_heap.cpp +++ b/src/system/kernel/debug/debug_heap.cpp @@ -3,11 +3,13 @@ * Distributed under the terms of the MIT License. */ + #include #include #include +#include #define INITIAL_HEAP_SIZE B_PAGE_SIZE @@ -289,9 +291,9 @@ debug_heap_init() { // create the heap area void* base; - area_id area = create_area("kdebug heap", (void**)&base, + area_id area = create_area_etc(B_SYSTEM_TEAM, "kdebug heap", (void**)&base, B_ANY_KERNEL_ADDRESS, KDEBUG_HEAP, B_FULL_LOCK, - B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA); + B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA, 0, CREATE_AREA_DONT_WAIT); if (area < 0) return; diff --git a/src/system/kernel/debug/tracing.cpp b/src/system/kernel/debug/tracing.cpp index eecd983ff0..d227e69f09 100644 --- a/src/system/kernel/debug/tracing.cpp +++ b/src/system/kernel/debug/tracing.cpp @@ -369,10 +369,10 @@ TracingMetaData::Create(TracingMetaData*& _metaData) if (error != B_OK) return error; - area = create_area("tracing log", + area = create_area_etc(B_SYSTEM_TEAM, "tracing log", (void**)&metaData->fTraceOutputBuffer, B_ANY_KERNEL_ADDRESS, kTraceOutputBufferSize + MAX_TRACE_SIZE, B_CONTIGUOUS, - B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA); + B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA, 0, CREATE_AREA_DONT_WAIT); if (area < 0) return area; diff --git a/src/system/kernel/port.cpp b/src/system/kernel/port.cpp index c67fb88224..e71ed1d5b2 100644 --- a/src/system/kernel/port.cpp +++ b/src/system/kernel/port.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2002-2009, Axel Dörfler, axeld@pinc-software.de. + * Copyright 2002-2010, Axel Dörfler, axeld@pinc-software.de. * Distributed under the terms of the MIT License. * * Copyright 2001, Mark-Jan Bastian. All rights reserved. @@ -29,6 +29,7 @@ #include #include #include +#include #include @@ -644,9 +645,9 @@ port_init(kernel_args *args) size_t size = sizeof(struct port_entry) * sMaxPorts; // create and initialize ports table - sPortArea = create_area("port_table", - (void**)&sPorts, B_ANY_KERNEL_ADDRESS, size, B_FULL_LOCK, - B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA); + sPortArea = create_area_etc(B_SYSTEM_TEAM, "port_table", (void**)&sPorts, + B_ANY_KERNEL_ADDRESS, size, B_FULL_LOCK, + B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA, 0, CREATE_AREA_DONT_WAIT); if (sPortArea < 0) { panic("unable to allocate kernel port table!\n"); return sPortArea; diff --git a/src/system/kernel/sem.cpp b/src/system/kernel/sem.cpp index 168e803251..b538958e85 100644 --- a/src/system/kernel/sem.cpp +++ b/src/system/kernel/sem.cpp @@ -1,6 +1,6 @@ /* * Copyright 2008-2009, Ingo Weinhold, ingo_weinhold@gmx.de. - * Copyright 2002-2009, Axel Dörfler, axeld@pinc-software.de. + * Copyright 2002-2010, Axel Dörfler, axeld@pinc-software.de. * Distributed under the terms of the MIT License. * * Copyright 2001, Travis Geiselbrecht. All rights reserved. @@ -417,9 +417,9 @@ haiku_sem_init(kernel_args *args) sMaxSems <<= 1; // create and initialize semaphore table - area = create_area("sem_table", (void **)&sSems, B_ANY_KERNEL_ADDRESS, - sizeof(struct sem_entry) * sMaxSems, B_FULL_LOCK, - B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA); + area = create_area_etc(B_SYSTEM_TEAM, "sem_table", (void **)&sSems, + B_ANY_KERNEL_ADDRESS, sizeof(struct sem_entry) * sMaxSems, B_FULL_LOCK, + B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA, 0, CREATE_AREA_DONT_WAIT); if (area < 0) panic("unable to allocate semaphore table!\n"); diff --git a/src/system/kernel/vm/vm.cpp b/src/system/kernel/vm/vm.cpp index 7090e7880f..afe44fc621 100644 --- a/src/system/kernel/vm/vm.cpp +++ b/src/system/kernel/vm/vm.cpp @@ -3652,10 +3652,11 @@ vm_init(kernel_args* args) object_cache_set_minimum_reserve(gPageMappingsObjectCache, 1024); #if DEBUG_CACHE_LIST - create_area("cache info table", (void**)&sCacheInfoTable, - B_ANY_KERNEL_ADDRESS, + create_area_etc(VMAddressSpace::KernelID(), "cache info table", + (void**)&sCacheInfoTable, B_ANY_KERNEL_ADDRESS, ROUNDUP(kCacheInfoTableCount * sizeof(cache_info), B_PAGE_SIZE), - B_FULL_LOCK, B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA); + B_FULL_LOCK, B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA, 0, + CREATE_AREA_DONT_WAIT); #endif // DEBUG_CACHE_LIST // add some debugger commands