vtophys.hh revision 7811
16313Sgblack@eecs.umich.edu/* 26313Sgblack@eecs.umich.edu * Copyright (c) 2002-2005 The Regents of The University of Michigan 36313Sgblack@eecs.umich.edu * Copyright (c) 2007-2008 The Florida State University 46313Sgblack@eecs.umich.edu * Copyright (c) 2009 The University of Edinburgh 56313Sgblack@eecs.umich.edu * All rights reserved. 66313Sgblack@eecs.umich.edu * 76313Sgblack@eecs.umich.edu * Redistribution and use in source and binary forms, with or without 86313Sgblack@eecs.umich.edu * modification, are permitted provided that the following conditions are 96313Sgblack@eecs.umich.edu * met: redistributions of source code must retain the above copyright 106313Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer; 116313Sgblack@eecs.umich.edu * redistributions in binary form must reproduce the above copyright 126313Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer in the 136313Sgblack@eecs.umich.edu * documentation and/or other materials provided with the distribution; 146313Sgblack@eecs.umich.edu * neither the name of the copyright holders nor the names of its 156313Sgblack@eecs.umich.edu * contributors may be used to endorse or promote products derived from 166313Sgblack@eecs.umich.edu * this software without specific prior written permission. 176313Sgblack@eecs.umich.edu * 186313Sgblack@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 196313Sgblack@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 206313Sgblack@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 216313Sgblack@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 226313Sgblack@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 236313Sgblack@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 246313Sgblack@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 256313Sgblack@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 266313Sgblack@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 276313Sgblack@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 286313Sgblack@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 296313Sgblack@eecs.umich.edu * 306313Sgblack@eecs.umich.edu * Authors: Ali Saidi 316313Sgblack@eecs.umich.edu * Nathan Binkert 328229Snate@binkert.org * Stephen Hines 336334Sgblack@eecs.umich.edu * Timothy M. Jones 346334Sgblack@eecs.umich.edu */ 356334Sgblack@eecs.umich.edu 366334Sgblack@eecs.umich.edu#ifndef __ARCH_POWER_VTOPHYS_HH__ 376313Sgblack@eecs.umich.edu#define __ARCH_POWER_VTOPHYS_HH__ 388232Snate@binkert.org 399384SAndreas.Sandberg@arm.com#include "arch/power/isa_traits.hh" 406313Sgblack@eecs.umich.edu#include "arch/power/utility.hh" 416313Sgblack@eecs.umich.edu 426313Sgblack@eecs.umich.edu 436313Sgblack@eecs.umich.educlass ThreadContext; 446334Sgblack@eecs.umich.educlass FunctionalPort; 456334Sgblack@eecs.umich.edu 466334Sgblack@eecs.umich.edunamespace PowerISA { 476334Sgblack@eecs.umich.edu 486334Sgblack@eecs.umich.eduinline Addr 496334Sgblack@eecs.umich.eduPteAddr(Addr a) 506334Sgblack@eecs.umich.edu{ 516334Sgblack@eecs.umich.edu return (a & PteMask) << PteShift; 526334Sgblack@eecs.umich.edu} 536334Sgblack@eecs.umich.edu 546334Sgblack@eecs.umich.edu} // namespace PowerISA 556334Sgblack@eecs.umich.edu 566334Sgblack@eecs.umich.edu#endif // __ARCH_POWER_VTOPHYS_HH__ 576334Sgblack@eecs.umich.edu 586334Sgblack@eecs.umich.edu