From 641b3c82df3ef9e3611eb73989db338e97eb5780 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Wed, 9 Jun 2010 21:21:18 +0000 Subject: [PATCH] Renamed allocate_early_physical_page() to vm_allocate_early_physical_page() and made it public. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37072 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/kernel/vm/vm.h | 2 ++ src/system/kernel/vm/vm.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/headers/private/kernel/vm/vm.h b/headers/private/kernel/vm/vm.h index 967def5f8e..dd1db1cf9d 100644 --- a/headers/private/kernel/vm/vm.h +++ b/headers/private/kernel/vm/vm.h @@ -12,6 +12,7 @@ #include #include +#include struct generic_io_vec; @@ -62,6 +63,7 @@ status_t vm_init_post_thread(struct kernel_args *args); status_t vm_init_post_modules(struct kernel_args *args); void vm_free_kernel_args(struct kernel_args *args); void vm_free_unused_boot_loader_range(addr_t start, addr_t end); +page_num_t vm_allocate_early_physical_page(kernel_args *args); addr_t vm_allocate_early(struct kernel_args *args, size_t virtualSize, size_t physicalSize, uint32 attributes, addr_t alignment); diff --git a/src/system/kernel/vm/vm.cpp b/src/system/kernel/vm/vm.cpp index 614394e243..c9c2c90ddb 100644 --- a/src/system/kernel/vm/vm.cpp +++ b/src/system/kernel/vm/vm.cpp @@ -3500,8 +3500,8 @@ is_page_in_physical_memory_range(kernel_args* args, phys_addr_t address) } -static phys_addr_t -allocate_early_physical_page(kernel_args* args) +page_num_t +vm_allocate_early_physical_page(kernel_args* args) { for (uint32 i = 0; i < args->num_physical_allocated_ranges; i++) { phys_addr_t nextPage; @@ -3544,7 +3544,7 @@ vm_allocate_early(kernel_args* args, size_t virtualSize, size_t physicalSize, // map the pages for (uint32 i = 0; i < PAGE_ALIGN(physicalSize) / B_PAGE_SIZE; i++) { - phys_addr_t physicalAddress = allocate_early_physical_page(args); + page_num_t physicalAddress = vm_allocate_early_physical_page(args); if (physicalAddress == 0) panic("error allocating early page!\n"); @@ -3552,7 +3552,7 @@ vm_allocate_early(kernel_args* args, size_t virtualSize, size_t physicalSize, arch_vm_translation_map_early_map(args, virtualBase + i * B_PAGE_SIZE, physicalAddress * B_PAGE_SIZE, attributes, - &allocate_early_physical_page); + &vm_allocate_early_physical_page); } return virtualBase;