system.cc revision 11723:0596db108c53
110326Smitch.hayenga@arm.com/* 210326Smitch.hayenga@arm.com * Copyright (c) 2002-2005 The Regents of The University of Michigan 310326Smitch.hayenga@arm.com * Copyright (c) 2007 MIPS Technologies, Inc. 410326Smitch.hayenga@arm.com * All rights reserved. 510326Smitch.hayenga@arm.com * 610326Smitch.hayenga@arm.com * Redistribution and use in source and binary forms, with or without 710326Smitch.hayenga@arm.com * modification, are permitted provided that the following conditions are 810326Smitch.hayenga@arm.com * met: redistributions of source code must retain the above copyright 910326Smitch.hayenga@arm.com * notice, this list of conditions and the following disclaimer; 1010326Smitch.hayenga@arm.com * redistributions in binary form must reproduce the above copyright 1110326Smitch.hayenga@arm.com * notice, this list of conditions and the following disclaimer in the 1210326Smitch.hayenga@arm.com * documentation and/or other materials provided with the distribution; 131761SN/A * neither the name of the copyright holders nor the names of its 1411163Ssteve.reinhardt@amd.com * contributors may be used to endorse or promote products derived from 152SN/A * this software without specific prior written permission. 162SN/A * 172SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 182SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 192SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 202SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 212SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 222SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 232SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 242SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 252SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 262SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 272SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 282SN/A * 292SN/A * Authors: Ali Saidi 302SN/A * Nathan Binkert 312SN/A * Jaidev Patwardhan 322SN/A */ 332SN/A 342SN/A#include "arch/riscv/system.hh" 352SN/A 362SN/A#include "arch/vtophys.hh" 372SN/A#include "base/loader/hex_file.hh" 382SN/A#include "base/loader/object_file.hh" 392665Ssaidi@eecs.umich.edu#include "base/loader/symtab.hh" 402665Ssaidi@eecs.umich.edu#include "base/trace.hh" 412SN/A#include "mem/physical.hh" 4210196SCurtis.Dunham@arm.com#include "params/RiscvSystem.hh" 432SN/A#include "sim/byteswap.hh" 442SN/A 452SN/Ausing namespace LittleEndianGuest; 462SN/A 476986Snate@binkert.orgRiscvSystem::RiscvSystem(Params *p) : System(p) 482SN/A{ 492SN/A} 502SN/A 516661Snate@binkert.orgRiscvSystem::~RiscvSystem() 522SN/A{ 536987Snate@binkert.org} 546987Snate@binkert.org 556984Snate@binkert.orgAddr 566984Snate@binkert.orgRiscvSystem::fixFuncEventAddr(Addr addr) 572SN/A{ 586984Snate@binkert.org return addr; 596984Snate@binkert.org} 606984Snate@binkert.org 616984Snate@binkert.orgvoid 626984Snate@binkert.orgRiscvSystem::setRiscvAccess(Addr access) 636984Snate@binkert.org{} 646984Snate@binkert.org 656661Snate@binkert.orgbool 666984Snate@binkert.orgRiscvSystem::breakpoint() 676984Snate@binkert.org{ 686984Snate@binkert.org return 0; 696984Snate@binkert.org} 706984Snate@binkert.org 716984Snate@binkert.orgRiscvSystem * 726984Snate@binkert.orgRiscvSystemParams::create() 736984Snate@binkert.org{ 746984Snate@binkert.org return new RiscvSystem(this); 756984Snate@binkert.org} 766984Snate@binkert.org 776984Snate@binkert.org