vtophys.hh revision 6691
12SN/A/* 28707Sandreas.hansson@arm.com * Copyright (c) 2002-2005 The Regents of The University of Michigan 38707Sandreas.hansson@arm.com * Copyright (c) 2007-2008 The Florida State University 48707Sandreas.hansson@arm.com * Copyright (c) 2009 The University of Edinburgh 58707Sandreas.hansson@arm.com * All rights reserved. 68707Sandreas.hansson@arm.com * 78707Sandreas.hansson@arm.com * Redistribution and use in source and binary forms, with or without 88707Sandreas.hansson@arm.com * modification, are permitted provided that the following conditions are 98707Sandreas.hansson@arm.com * met: redistributions of source code must retain the above copyright 108707Sandreas.hansson@arm.com * notice, this list of conditions and the following disclaimer; 118707Sandreas.hansson@arm.com * redistributions in binary form must reproduce the above copyright 128707Sandreas.hansson@arm.com * notice, this list of conditions and the following disclaimer in the 138707Sandreas.hansson@arm.com * documentation and/or other materials provided with the distribution; 141762SN/A * neither the name of the copyright holders nor the names of its 157897Shestness@cs.utexas.edu * contributors may be used to endorse or promote products derived from 162SN/A * this software without specific prior written permission. 172SN/A * 182SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 192SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 202SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 212SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 222SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 232SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 242SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 252SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 262SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 272SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 282SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 292SN/A * 302SN/A * Authors: Ali Saidi 312SN/A * Nathan Binkert 322SN/A * Stephen Hines 332SN/A * Timothy M. Jones 342SN/A */ 352SN/A 362SN/A#ifndef __ARCH_POWER_VTOPHYS_HH__ 372SN/A#define __ARCH_POWER_VTOPHYS_HH__ 382SN/A 392SN/A#include "arch/power/isa_traits.hh" 402665Ssaidi@eecs.umich.edu#include "arch/power/utility.hh" 412665Ssaidi@eecs.umich.edu 422665Ssaidi@eecs.umich.edu 437897Shestness@cs.utexas.educlass ThreadContext; 442SN/Aclass FunctionalPort; 452SN/A 461388SN/Anamespace PowerISA { 478229Snate@binkert.org 482SN/Ainline Addr 492SN/APteAddr(Addr a) 507781SAli.Saidi@ARM.com{ 518229Snate@binkert.org return (a & PteMask) << PteShift; 521191SN/A} 531191SN/A 541388SN/A} // PowerISA namespace 555529Snate@binkert.org 568733Sgeoffrey.blake@arm.com#endif // __ARCH_POWER_VTOPHYS_HH__ 571717SN/A 582651Ssaidi@eecs.umich.edu