vtophys.hh revision 1762
14120Sgblack@eecs.umich.edu/* 24120Sgblack@eecs.umich.edu * Copyright (c) 2002-2005 The Regents of The University of Michigan 37087Snate@binkert.org * All rights reserved. 47087Snate@binkert.org * 57087Snate@binkert.org * Redistribution and use in source and binary forms, with or without 67087Snate@binkert.org * modification, are permitted provided that the following conditions are 77087Snate@binkert.org * met: redistributions of source code must retain the above copyright 87087Snate@binkert.org * notice, this list of conditions and the following disclaimer; 97087Snate@binkert.org * redistributions in binary form must reproduce the above copyright 107087Snate@binkert.org * notice, this list of conditions and the following disclaimer in the 117087Snate@binkert.org * documentation and/or other materials provided with the distribution; 127087Snate@binkert.org * neither the name of the copyright holders nor the names of its 137087Snate@binkert.org * contributors may be used to endorse or promote products derived from 147087Snate@binkert.org * this software without specific prior written permission. 154120Sgblack@eecs.umich.edu * 164120Sgblack@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 174120Sgblack@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 184120Sgblack@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 194120Sgblack@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 204120Sgblack@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 214120Sgblack@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 224120Sgblack@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 234120Sgblack@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 244120Sgblack@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 254120Sgblack@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 264120Sgblack@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 274120Sgblack@eecs.umich.edu */ 284120Sgblack@eecs.umich.edu 294120Sgblack@eecs.umich.edu#ifndef __ARCH_ALPHA_VTOPHYS_H__ 304120Sgblack@eecs.umich.edu#define __ARCH_ALPHA_VTOPHYS_H__ 314120Sgblack@eecs.umich.edu 324120Sgblack@eecs.umich.edu#include "arch/alpha/isa_traits.hh" 334120Sgblack@eecs.umich.edu 344120Sgblack@eecs.umich.educlass ExecContext; 354120Sgblack@eecs.umich.educlass PhysicalMemory; 364120Sgblack@eecs.umich.edu 374120Sgblack@eecs.umich.eduAlphaISA::PageTableEntry 384120Sgblack@eecs.umich.edukernel_pte_lookup(PhysicalMemory *pmem, Addr ptbr, AlphaISA::VAddr vaddr); 394120Sgblack@eecs.umich.edu 404120Sgblack@eecs.umich.eduAddr vtophys(PhysicalMemory *xc, Addr vaddr); 414120Sgblack@eecs.umich.eduAddr vtophys(ExecContext *xc, Addr vaddr); 424120Sgblack@eecs.umich.eduuint8_t *vtomem(ExecContext *xc, Addr vaddr, size_t len); 434202Sbinkertn@umich.eduuint8_t *ptomem(ExecContext *xc, Addr paddr, size_t len); 445069Sgblack@eecs.umich.edu 454202Sbinkertn@umich.eduvoid CopyOut(ExecContext *xc, void *dst, Addr src, size_t len); 465659Sgblack@eecs.umich.eduvoid CopyIn(ExecContext *xc, Addr dst, void *src, size_t len); 479022Sgblack@eecs.umich.eduvoid CopyString(ExecContext *xc, char *dst, Addr vaddr, size_t maxlen); 489023Sgblack@eecs.umich.edu 494601Sgblack@eecs.umich.edu#endif // __ARCH_ALPHA_VTOPHYS_H__ 505124Sgblack@eecs.umich.edu 517966Sgblack@eecs.umich.edu