vtophys.hh revision 11723
12SN/A/*
212109SRekai.GonzalezAlberquilla@arm.com * Copyright (c) 2002-2005 The Regents of The University of Michigan
39920Syasuko.eckert@amd.com * Copyright (c) 2007-2008 The Florida State University
48733Sgeoffrey.blake@arm.com * Copyright (c) 2009 The University of Edinburgh
58733Sgeoffrey.blake@arm.com * Copyright (c) 2014-2015 Sven Karlsson
68733Sgeoffrey.blake@arm.com * All rights reserved.
78733Sgeoffrey.blake@arm.com *
88733Sgeoffrey.blake@arm.com * Redistribution and use in source and binary forms, with or without
98733Sgeoffrey.blake@arm.com * modification, are permitted provided that the following conditions are
108733Sgeoffrey.blake@arm.com * met: redistributions of source code must retain the above copyright
118733Sgeoffrey.blake@arm.com * notice, this list of conditions and the following disclaimer;
128733Sgeoffrey.blake@arm.com * redistributions in binary form must reproduce the above copyright
138733Sgeoffrey.blake@arm.com * notice, this list of conditions and the following disclaimer in the
148733Sgeoffrey.blake@arm.com * documentation and/or other materials provided with the distribution;
152188SN/A * neither the name of the copyright holders nor the names of its
162SN/A * contributors may be used to endorse or promote products derived from
172SN/A * this software without specific prior written permission.
182SN/A *
192SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
202SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
212SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
222SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
232SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
242SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
252SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
262SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
272SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
282SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
292SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
302SN/A *
312SN/A * Authors: Ali Saidi
322SN/A *          Nathan Binkert
332SN/A *          Stephen Hines
342SN/A *          Timothy M. Jones
352SN/A *          Sven Karlsson
362SN/A */
372SN/A
382SN/A#ifndef __ARCH_RISCV_VTOPHYS_HH__
392SN/A#define __ARCH_RISCV_VTOPHYS_HH__
402665SN/A
412665SN/A#include "arch/riscv/isa_traits.hh"
422665SN/A#include "arch/riscv/utility.hh"
432SN/A
442SN/Aclass ThreadContext;
452683Sktlim@umich.edu
462683Sktlim@umich.edunamespace RiscvISA {
472SN/A
489020Sgblack@eecs.umich.eduinline Addr
4912406Sgabeblack@google.comvtophys(Addr vaddr)
506313Sgblack@eecs.umich.edu{
512190SN/A    fatal("VTOPHYS: Unimplemented on RISC-V\n");
526329Sgblack@eecs.umich.edu    return vaddr;
536316Sgblack@eecs.umich.edu}
546216Snate@binkert.org
556658Snate@binkert.orginline Addr
562680SN/Avtophys(ThreadContext *tc, Addr vaddr)
572683Sktlim@umich.edu{
589920Syasuko.eckert@amd.com    fatal("VTOPHYS: Unimplemented on RISC-V\n");
598232Snate@binkert.org    return vtophys(vaddr);
608232Snate@binkert.org}
6112109SRekai.GonzalezAlberquilla@arm.com
628777Sgblack@eecs.umich.edu} // namespace RiscvISA
632395SN/A
642190SN/A#endif // __ARCH_RISCV_VTOPHYS_HH__
652188SN/A
668777Sgblack@eecs.umich.edu