diff options
author | Richard Braun <rbraun@sceen.net> | 2013-07-09 20:53:31 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2013-07-09 20:54:24 +0200 |
commit | d485f7e4480e06003095d0f94e022dfca3c84a0d (patch) | |
tree | 6d754241ad8c180220caa83d29a86e3ce652425c /vm/vm_phys.h | |
parent | 38dad0326a0c22676e64d757223df6f97f19eac0 (diff) |
vm/vm_phys: merge into the vm_page module
The original idea was to separate physical page allocation from page list
management, but it doesn't make much sense any more.
Diffstat (limited to 'vm/vm_phys.h')
-rw-r--r-- | vm/vm_phys.h | 94 |
1 files changed, 0 insertions, 94 deletions
diff --git a/vm/vm_phys.h b/vm/vm_phys.h deleted file mode 100644 index 8b02c4b9..00000000 --- a/vm/vm_phys.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2010, 2011, 2012 Richard Braun. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * - * Physical page allocator. - */ - -#ifndef _VM_VM_PHYS_H -#define _VM_VM_PHYS_H - -#include <kern/types.h> -#include <vm/vm_page.h> - -/* - * True if the vm_phys module is completely initialized, false otherwise - * (in which case only vm_phys_bootalloc() can be used for allocations). - */ -extern int vm_phys_ready; - -/* - * Load physical memory into the vm_phys module at boot time. - * - * The avail_start and avail_end parameters are used to maintain a simple - * heap for bootstrap allocations. - */ -void vm_phys_load(const char *name, phys_addr_t start, phys_addr_t end, - phys_addr_t avail_start, phys_addr_t avail_end, - unsigned int seg_index, unsigned int seglist_prio); - -/* - * Allocate one physical page. - * - * This function is used to allocate physical memory at boot time, before the - * vm_phys module is ready, but after the physical memory has been loaded. - */ -phys_addr_t vm_phys_bootalloc(void); - -/* - * Set up the vm_phys module. - * - * Once this function returns, the vm_phys module is ready, and normal - * allocation functions can be used. - */ -void vm_phys_setup(void); - -/* - * Make the given page managed by the vm_phys module. - * - * If additional memory can be made usable after the VM system is initialized, - * it should be reported through this function. - */ -void vm_phys_manage(struct vm_page *page); - -/* - * Return the page descriptor for the given physical address. - */ -struct vm_page * vm_phys_lookup_page(phys_addr_t pa); - -/* - * Allocate a block of 2^order physical pages. - */ -struct vm_page * vm_phys_alloc(unsigned int order); - -/* - * Allocate physical pages from a specific segment. - * - * This function shouldn't only be called by architecture specific functions. - */ -struct vm_page * vm_phys_alloc_seg(unsigned int order, unsigned int seg_index); - -/* - * Release a block of 2^order physical pages. - */ -void vm_phys_free(struct vm_page *page, unsigned int order); - -/* - * Display internal information about the module. - */ -void vm_phys_info(void); - -#endif /* _VM_VM_PHYS_H */ |