vtophys.hh revision 6691
14876Sstever@eecs.umich.edu/*
23646Srdreslin@umich.edu * Copyright (c) 2002-2005 The Regents of The University of Michigan
33646Srdreslin@umich.edu * Copyright (c) 2007-2008 The Florida State University
43646Srdreslin@umich.edu * Copyright (c) 2009 The University of Edinburgh
53646Srdreslin@umich.edu * All rights reserved.
63646Srdreslin@umich.edu *
73646Srdreslin@umich.edu * Redistribution and use in source and binary forms, with or without
83646Srdreslin@umich.edu * modification, are permitted provided that the following conditions are
93646Srdreslin@umich.edu * met: redistributions of source code must retain the above copyright
103646Srdreslin@umich.edu * notice, this list of conditions and the following disclaimer;
113646Srdreslin@umich.edu * redistributions in binary form must reproduce the above copyright
123646Srdreslin@umich.edu * notice, this list of conditions and the following disclaimer in the
133646Srdreslin@umich.edu * documentation and/or other materials provided with the distribution;
143646Srdreslin@umich.edu * neither the name of the copyright holders nor the names of its
153646Srdreslin@umich.edu * contributors may be used to endorse or promote products derived from
163646Srdreslin@umich.edu * this software without specific prior written permission.
173646Srdreslin@umich.edu *
183646Srdreslin@umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
193646Srdreslin@umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
203646Srdreslin@umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
213646Srdreslin@umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
223646Srdreslin@umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
233646Srdreslin@umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
243646Srdreslin@umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
253646Srdreslin@umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
263646Srdreslin@umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
273646Srdreslin@umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
283646Srdreslin@umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
293646Srdreslin@umich.edu *
303646Srdreslin@umich.edu * Authors: Ali Saidi
313646Srdreslin@umich.edu *          Nathan Binkert
323646Srdreslin@umich.edu *          Stephen Hines
336654Snate@binkert.org *          Timothy M. Jones
346654Snate@binkert.org */
356654Snate@binkert.org
366654Snate@binkert.org#ifndef __ARCH_POWER_VTOPHYS_HH__
373646Srdreslin@umich.edu#define __ARCH_POWER_VTOPHYS_HH__
383646Srdreslin@umich.edu
396654Snate@binkert.org#include "arch/power/isa_traits.hh"
406654Snate@binkert.org#include "arch/power/utility.hh"
413646Srdreslin@umich.edu
423646Srdreslin@umich.edu
433646Srdreslin@umich.educlass ThreadContext;
443646Srdreslin@umich.educlass FunctionalPort;
453646Srdreslin@umich.edu
463646Srdreslin@umich.edunamespace PowerISA {
473646Srdreslin@umich.edu
483646Srdreslin@umich.eduinline Addr
493646Srdreslin@umich.eduPteAddr(Addr a)
503646Srdreslin@umich.edu{
513646Srdreslin@umich.edu    return (a & PteMask) << PteShift;
523646Srdreslin@umich.edu}
533646Srdreslin@umich.edu
543646Srdreslin@umich.edu} // PowerISA namespace
553646Srdreslin@umich.edu
563646Srdreslin@umich.edu#endif // __ARCH_POWER_VTOPHYS_HH__
573646Srdreslin@umich.edu
583646Srdreslin@umich.edu