2 * Copyright (c) 1997, Duke University
6 * Andrew Gallatin <gallatin@cs.duke.edu>
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
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 * 3. All advertising materials mentioning features or use of this software
17 * must display the following acknowledgements:
18 * This product includes software developed by Duke University
19 * 4. The name of Duke University may not be used to endorse or promote
20 * products derived from this software without specific prior written
23 * THIS SOFTWARE IS PROVIDED BY DUKE UNIVERSITY ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DUKE UNIVERSITY BE LIABLE
27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITSOR BUSINESS
30 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
31 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
32 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
33 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42 extern vm_offset_t jumbo_basekva;
44 static __inline caddr_t jumbo_phys_to_kva(vm_offset_t pa);
45 static __inline caddr_t
46 jumbo_phys_to_kva(vm_offset_t pa)
50 pg = PHYS_TO_VM_PAGE(pa);
51 pg->flags &= ~PG_BUSY;
52 return (caddr_t)(ptoa(pg->pindex) + jumbo_basekva);
55 int jumbo_vm_init(void);
56 void jumbo_freem(caddr_t addr, void *args);
57 vm_page_t jumbo_pg_alloc(void);
58 void jumbo_pg_free(vm_offset_t addr);
59 void jumbo_pg_steal(vm_page_t pg);
62 #endif /* !_SYS_JUMBO_H_ */