vm_phys.h revision 170477
1/*-
2 * Copyright (c) 2002-2006 Rice University
3 * All rights reserved.
4 *
5 * This software was developed for the FreeBSD Project by Alan L. Cox,
6 * Olivier Crameri, Peter Druschel, Sitaram Iyer, and Juan Navarro.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 *    notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 *    notice, this list of conditions and the following disclaimer in the
15 *    documentation and/or other materials provided with the distribution.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 * A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT
21 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
23 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
24 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
25 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
27 * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 * POSSIBILITY OF SUCH DAMAGE.
29 *
30 * $FreeBSD: head/sys/vm/vm_phys.h 170477 2007-06-10 00:49:16Z alc $
31 */
32
33/*
34 *	Physical memory system definitions
35 */
36
37#ifndef	_VM_PHYS_H_
38#define	_VM_PHYS_H_
39
40void vm_phys_add_page(vm_paddr_t pa);
41vm_page_t vm_phys_alloc_contig(unsigned long npages,
42    vm_paddr_t low, vm_paddr_t high,
43    unsigned long alignment, unsigned long boundary);
44vm_page_t vm_phys_alloc_pages(int pool, int order);
45vm_page_t vm_phys_alloc_pages_locked(int pool, int order);
46vm_paddr_t vm_phys_bootstrap_alloc(vm_size_t size, unsigned long alignment);
47void vm_phys_free_pages(vm_page_t m, int order);
48void vm_phys_free_pages_locked(vm_page_t m, int order);
49void vm_phys_init(void);
50boolean_t vm_phys_zero_pages_idle(void);
51
52#endif	/* !_VM_PHYS_H_ */
53