1216174Snwhitehorn/*-
2216174Snwhitehorn * Copyright (C) 2010 Nathan Whitehorn
3216174Snwhitehorn * All rights reserved.
4216174Snwhitehorn *
5216174Snwhitehorn * Redistribution and use in source and binary forms, with or without
6216174Snwhitehorn * modification, are permitted provided that the following conditions
7216174Snwhitehorn * are met:
8216174Snwhitehorn * 1. Redistributions of source code must retain the above copyright
9216174Snwhitehorn *    notice, this list of conditions and the following disclaimer.
10216174Snwhitehorn * 2. Redistributions in binary form must reproduce the above copyright
11216174Snwhitehorn *    notice, this list of conditions and the following disclaimer in the
12216174Snwhitehorn *    documentation and/or other materials provided with the distribution.
13216174Snwhitehorn *
14216174Snwhitehorn * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15216174Snwhitehorn * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16216174Snwhitehorn * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17216174Snwhitehorn * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18216174Snwhitehorn * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19216174Snwhitehorn * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
20216174Snwhitehorn * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
21216174Snwhitehorn * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
22216174Snwhitehorn * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
23216174Snwhitehorn * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24216174Snwhitehorn *
25216174Snwhitehorn * $FreeBSD$
26216174Snwhitehorn */
27216174Snwhitehorn
28216174Snwhitehorn#ifndef _POWERPC_AIM_MMU_OEA64_H
29216174Snwhitehorn#define _POWERPC_AIM_MMU_OEA64_H
30216174Snwhitehorn
31216174Snwhitehorn#include <machine/mmuvar.h>
32216174Snwhitehorn
33216174Snwhitehornextern mmu_def_t oea64_mmu;
34216174Snwhitehorn
35216174Snwhitehorn/*
36216174Snwhitehorn * Helper routines
37216174Snwhitehorn */
38216174Snwhitehorn
39216174Snwhitehorn/* Allocate physical memory for use in moea64_bootstrap. */
40216174Snwhitehornvm_offset_t	moea64_bootstrap_alloc(vm_size_t, u_int);
41216174Snwhitehorn
42216174Snwhitehorn/*
43216174Snwhitehorn * Bootstrap subroutines
44216174Snwhitehorn *
45216174Snwhitehorn * An MMU_BOOTSTRAP() implementation looks like this:
46216174Snwhitehorn *   moea64_early_bootstrap();
47216174Snwhitehorn *   Allocate Page Table
48216174Snwhitehorn *   moea64_mid_bootstrap();
49216174Snwhitehorn *   Add mappings for MMU resources
50216174Snwhitehorn *   moea64_late_bootstrap();
51216174Snwhitehorn */
52216174Snwhitehorn
53216174Snwhitehornvoid		moea64_early_bootstrap(mmu_t mmup, vm_offset_t kernelstart,
54216174Snwhitehorn		    vm_offset_t kernelend);
55216174Snwhitehornvoid		moea64_mid_bootstrap(mmu_t mmup, vm_offset_t kernelstart,
56216174Snwhitehorn		    vm_offset_t kernelend);
57216174Snwhitehornvoid		moea64_late_bootstrap(mmu_t mmup, vm_offset_t kernelstart,
58216174Snwhitehorn		    vm_offset_t kernelend);
59216174Snwhitehorn
60216174Snwhitehorn/*
61216174Snwhitehorn * Statistics
62216174Snwhitehorn */
63216174Snwhitehorn
64216174Snwhitehornextern u_int	moea64_pte_valid;
65216174Snwhitehornextern u_int	moea64_pte_overflow;
66216174Snwhitehorn
67216174Snwhitehorn/*
68216174Snwhitehorn * State variables
69216174Snwhitehorn */
70216174Snwhitehorn
71216174Snwhitehornextern struct pvo_head *moea64_pvo_table;
72216174Snwhitehornextern int		moea64_large_page_shift;
73255418Snwhitehornextern uint64_t		moea64_large_page_size;
74216174Snwhitehornextern u_int		moea64_pteg_count;
75216174Snwhitehornextern u_int		moea64_pteg_mask;
76216174Snwhitehorn
77216174Snwhitehorn#endif /* _POWERPC_AIM_MMU_OEA64_H */
78216174Snwhitehorn
79