mmu_oea64.h revision 255418
138032Speter/*-
2261363Sgshapiro * Copyright (C) 2010 Nathan Whitehorn
364565Sgshapiro * All rights reserved.
438032Speter *
538032Speter * Redistribution and use in source and binary forms, with or without
638032Speter * modification, are permitted provided that the following conditions
738032Speter * are met:
838032Speter * 1. Redistributions of source code must retain the above copyright
938032Speter *    notice, this list of conditions and the following disclaimer.
1038032Speter * 2. Redistributions in binary form must reproduce the above copyright
1138032Speter *    notice, this list of conditions and the following disclaimer in the
1238032Speter *    documentation and/or other materials provided with the distribution.
1338032Speter *
1490795Sgshapiro * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1590795Sgshapiro * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1690795Sgshapiro * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17261363Sgshapiro * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1864565Sgshapiro * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
1964565Sgshapiro * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
2064565Sgshapiro * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
2190795Sgshapiro * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
2238032Speter * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
23266692Sgshapiro * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2464565Sgshapiro *
25111367Sgshapiro * $FreeBSD: head/sys/powerpc/aim/mmu_oea64.h 255418 2013-09-09 12:51:24Z nwhitehorn $
2638032Speter */
2738032Speter
2838032Speter#ifndef _POWERPC_AIM_MMU_OEA64_H
2964565Sgshapiro#define _POWERPC_AIM_MMU_OEA64_H
3064565Sgshapiro
3164565Sgshapiro#include <machine/mmuvar.h>
3264565Sgshapiro
3364565Sgshapiroextern mmu_def_t oea64_mmu;
3464565Sgshapiro
3564565Sgshapiro/*
3664565Sgshapiro * Helper routines
3764565Sgshapiro */
3864565Sgshapiro
3964565Sgshapiro/* Allocate physical memory for use in moea64_bootstrap. */
4038032Spetervm_offset_t	moea64_bootstrap_alloc(vm_size_t, u_int);
4138032Speter
4238032Speter/*
4338032Speter * Bootstrap subroutines
4438032Speter *
45173343Sgshapiro * An MMU_BOOTSTRAP() implementation looks like this:
4638032Speter *   moea64_early_bootstrap();
4738032Speter *   Allocate Page Table
4890795Sgshapiro *   moea64_mid_bootstrap();
4942580Speter *   Add mappings for MMU resources
5064565Sgshapiro *   moea64_late_bootstrap();
5138032Speter */
5238032Speter
5390795Sgshapirovoid		moea64_early_bootstrap(mmu_t mmup, vm_offset_t kernelstart,
5438032Speter		    vm_offset_t kernelend);
55141862Sgshapirovoid		moea64_mid_bootstrap(mmu_t mmup, vm_offset_t kernelstart,
56141862Sgshapiro		    vm_offset_t kernelend);
5764565Sgshapirovoid		moea64_late_bootstrap(mmu_t mmup, vm_offset_t kernelstart,
5864565Sgshapiro		    vm_offset_t kernelend);
5964565Sgshapiro
6064565Sgshapiro/*
6190795Sgshapiro * Statistics
62132946Sgshapiro */
63132946Sgshapiro
64132946Sgshapiroextern u_int	moea64_pte_valid;
65132946Sgshapiroextern u_int	moea64_pte_overflow;
66132946Sgshapiro
67132946Sgshapiro/*
68132946Sgshapiro * State variables
69132946Sgshapiro */
7064565Sgshapiro
7164565Sgshapiroextern struct pvo_head *moea64_pvo_table;
7264565Sgshapiroextern int		moea64_large_page_shift;
7338032Speterextern uint64_t		moea64_large_page_size;
7438032Speterextern u_int		moea64_pteg_count;
7538032Speterextern u_int		moea64_pteg_mask;
7638032Speter
7738032Speter#endif /* _POWERPC_AIM_MMU_OEA64_H */
7838032Speter
7938032Speter