vtophys.hh revision 4162
12SN/A/*
21762SN/A * Copyright (c) 2007 The Hewlett-Packard Development Company
32SN/A * All rights reserved.
42SN/A *
52SN/A * Redistribution and use of this software in source and binary forms,
62SN/A * with or without modification, are permitted provided that the
72SN/A * following conditions are met:
82SN/A *
92SN/A * The software must be used only for Non-Commercial Use which means any
102SN/A * use which is NOT directed to receiving any direct monetary
112SN/A * compensation for, or commercial advantage from such use.  Illustrative
122SN/A * examples of non-commercial use are academic research, personal study,
132SN/A * teaching, education and corporate research & development.
142SN/A * Illustrative examples of commercial use are distributing products for
152SN/A * commercial advantage and providing services using the software for
162SN/A * commercial advantage.
172SN/A *
182SN/A * If you wish to use this software or functionality therein that may be
192SN/A * covered by patents for commercial use, please contact:
202SN/A *     Director of Intellectual Property Licensing
212SN/A *     Office of Strategy and Technology
222SN/A *     Hewlett-Packard Company
232SN/A *     1501 Page Mill Road
242SN/A *     Palo Alto, California  94304
252SN/A *
262SN/A * Redistributions of source code must retain the above copyright notice,
272665Ssaidi@eecs.umich.edu * this list of conditions and the following disclaimer.  Redistributions
282665Ssaidi@eecs.umich.edu * in binary form must reproduce the above copyright notice, this list of
292SN/A * conditions and the following disclaimer in the documentation and/or
302SN/A * other materials provided with the distribution.  Neither the name of
316216Snate@binkert.org * the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its
326216Snate@binkert.org * contributors may be used to endorse or promote products derived from
332SN/A * this software without specific prior written permission.  No right of
346216Snate@binkert.org * sublicense is granted herewith.  Derivatives of the software and
35100SN/A * output created using the software may be prepared, but only for
3612334Sgabeblack@google.com * Non-Commercial Uses.  Derivatives of the software may be shared with
376214Snate@binkert.org * others provided: (i) the others agree to abide by the list of
38100SN/A * conditions herein which includes the Non-Commercial Use restrictions;
392SN/A * and (ii) such Derivatives of the software include the above copyright
402020SN/A * notice to acknowledge the contribution from this software where
412SN/A * applicable, this list of conditions and the disclaimer below.
422SN/A *
4350SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
442SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4510295Sandreas.hansson@arm.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
462SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4750SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
482SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
4950SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
5050SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
5150SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
5250SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5350SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5450SN/A *
5550SN/A * Authors: Gabe Black
5650SN/A */
5750SN/A
5850SN/A#ifndef __ARCH_X86_VTOPHYS_HH__
5950SN/A#define __ARCH_X86_VTOPHYS_HH__
6050SN/A
612SN/A#include "arch/x86/isa_traits.hh"
622SN/A#include "arch/x86/pagetable.hh"
632SN/A#include "sim/host.hh"
6450SN/A
6550SN/Aclass ThreadContext;
6610295Sandreas.hansson@arm.comclass FunctionalPort;
672SN/A
6850SN/Anamespace X86ISA
692SN/A{
702SN/A
7150SN/APageTableEntry
7250SN/Akernel_pte_lookup(FunctionalPort *mem, Addr ptbr, X86ISA::VAddr vaddr);
7310295Sandreas.hansson@arm.com
7450SN/AAddr vtophys(Addr vaddr);
752020SN/AAddr vtophys(ThreadContext *tc, Addr vaddr);
7650SN/A
7750SN/A};
787584SAli.Saidi@arm.com
797584SAli.Saidi@arm.com#endif // __ARCH_X86_VTOPHYS_HH__
807584SAli.Saidi@arm.com