mmu_oea64.h revision 255418
1158722Sflz/*-
2158722Sflz * Copyright (C) 2010 Nathan Whitehorn
3158722Sflz * All rights reserved.
4158722Sflz *
5158722Sflz * Redistribution and use in source and binary forms, with or without
6158722Sflz * modification, are permitted provided that the following conditions
7158722Sflz * are met:
8158722Sflz * 1. Redistributions of source code must retain the above copyright
9158722Sflz *    notice, this list of conditions and the following disclaimer.
10158722Sflz * 2. Redistributions in binary form must reproduce the above copyright
11158722Sflz *    notice, this list of conditions and the following disclaimer in the
12158722Sflz *    documentation and/or other materials provided with the distribution.
13158722Sflz *
14158722Sflz * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15158722Sflz * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16158722Sflz * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17158722Sflz * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18158722Sflz * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19158722Sflz * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
20158722Sflz * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
21158722Sflz * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
22158722Sflz * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
23158722Sflz * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24158722Sflz *
25158722Sflz * $FreeBSD: head/sys/powerpc/aim/mmu_oea64.h 255418 2013-09-09 12:51:24Z nwhitehorn $
26158722Sflz */
27158722Sflz
28158722Sflz#ifndef _POWERPC_AIM_MMU_OEA64_H
29158722Sflz#define _POWERPC_AIM_MMU_OEA64_H
30158722Sflz
31158722Sflz#include <machine/mmuvar.h>
32158722Sflz
33158722Sflzextern mmu_def_t oea64_mmu;
34158722Sflz
35158722Sflz/*
36158722Sflz * Helper routines
37158722Sflz */
38158722Sflz
39165683Syar/* Allocate physical memory for use in moea64_bootstrap. */
40165683Syarvm_offset_t	moea64_bootstrap_alloc(vm_size_t, u_int);
41158722Sflz
42158722Sflz/*
43158722Sflz * Bootstrap subroutines
44158722Sflz *
45158722Sflz * An MMU_BOOTSTRAP() implementation looks like this:
46158722Sflz *   moea64_early_bootstrap();
47158722Sflz *   Allocate Page Table
48158722Sflz *   moea64_mid_bootstrap();
49158722Sflz *   Add mappings for MMU resources
50158722Sflz *   moea64_late_bootstrap();
51158722Sflz */
52208060Sdougb
53158722Sflzvoid		moea64_early_bootstrap(mmu_t mmup, vm_offset_t kernelstart,
54158722Sflz		    vm_offset_t kernelend);
55158722Sflzvoid		moea64_mid_bootstrap(mmu_t mmup, vm_offset_t kernelstart,
56158722Sflz		    vm_offset_t kernelend);
57158722Sflzvoid		moea64_late_bootstrap(mmu_t mmup, vm_offset_t kernelstart,
58158722Sflz		    vm_offset_t kernelend);
59158722Sflz
60158722Sflz/*
61158722Sflz * Statistics
62158722Sflz */
63158722Sflz
64158722Sflzextern u_int	moea64_pte_valid;
65158722Sflzextern u_int	moea64_pte_overflow;
66158722Sflz
67158722Sflz/*
68158722Sflz * State variables
69158722Sflz */
70158722Sflz
71158722Sflzextern struct pvo_head *moea64_pvo_table;
72158722Sflzextern int		moea64_large_page_shift;
73158722Sflzextern uint64_t		moea64_large_page_size;
74158722Sflzextern u_int		moea64_pteg_count;
75158722Sflzextern u_int		moea64_pteg_mask;
76158722Sflz
77158722Sflz#endif /* _POWERPC_AIM_MMU_OEA64_H */
78158722Sflz
79158722Sflz