process.hh revision 10037:5cac77888310
12381SN/A/* 213732Snikos.nikoleris@arm.com* Copyright (c) 2012 ARM Limited 38949Sandreas.hansson@arm.com * All rights reserved 48949Sandreas.hansson@arm.com * 58949Sandreas.hansson@arm.com * The license below extends only to copyright in the software and shall 68949Sandreas.hansson@arm.com * not be construed as granting a license to any other intellectual 78949Sandreas.hansson@arm.com * property including but not limited to intellectual property relating 88949Sandreas.hansson@arm.com * to a hardware implementation of the functionality of the software 98949Sandreas.hansson@arm.com * licensed hereunder. You may use the software subject to the license 108949Sandreas.hansson@arm.com * terms below provided that you ensure that this notice is replicated 118949Sandreas.hansson@arm.com * unmodified and in its entirety in all distributions of the software, 128949Sandreas.hansson@arm.com * modified or unmodified, in source code or in binary form. 138949Sandreas.hansson@arm.com * 142592SN/A * Copyright (c) 2007-2008 The Florida State University 1510975Sdavid.hashe@amd.com * All rights reserved. 162381SN/A * 172381SN/A * Redistribution and use in source and binary forms, with or without 182381SN/A * modification, are permitted provided that the following conditions are 192381SN/A * met: redistributions of source code must retain the above copyright 202381SN/A * notice, this list of conditions and the following disclaimer; 212381SN/A * redistributions in binary form must reproduce the above copyright 222381SN/A * notice, this list of conditions and the following disclaimer in the 232381SN/A * documentation and/or other materials provided with the distribution; 242381SN/A * neither the name of the copyright holders nor the names of its 252381SN/A * contributors may be used to endorse or promote products derived from 262381SN/A * this software without specific prior written permission. 272381SN/A * 282381SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 292381SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 302381SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 312381SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 322381SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 332381SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 342381SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 352381SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 362381SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 372381SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 382381SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 392381SN/A * 402665Ssaidi@eecs.umich.edu * Authors: Stephen Hines 412665Ssaidi@eecs.umich.edu */ 422665Ssaidi@eecs.umich.edu 432665Ssaidi@eecs.umich.edu#ifndef __ARM_PROCESS_HH__ 449031Sandreas.hansson@arm.com#define __ARM_PROCESS_HH__ 4512349Snikos.nikoleris@arm.com 462381SN/A#include <string> 472381SN/A#include <vector> 482381SN/A 492381SN/A#include "arch/arm/intregs.hh" 502662Sstever@eecs.umich.edu#include "base/loader/object_file.hh" 512381SN/A#include "sim/process.hh" 522381SN/A 532381SN/Aclass LiveProcess; 542381SN/Aclass ObjectFile; 552381SN/Aclass System; 568229Snate@binkert.org 573348Sbinkertn@umich.educlass ArmLiveProcess : public LiveProcess 583348Sbinkertn@umich.edu{ 593348Sbinkertn@umich.edu protected: 605735Snate@binkert.org ObjectFile::Arch arch; 614024Sbinkertn@umich.edu ArmLiveProcess(LiveProcessParams * params, ObjectFile *objFile, 625735Snate@binkert.org ObjectFile::Arch _arch); 6312334Sgabeblack@google.com template<class IntType> 645314Sstever@gmail.com void argsInit(int pageSize, ArmISA::IntRegIndex spIndex); 656216Snate@binkert.org}; 6613347Sgabeblack@google.com 672392SN/Aclass ArmLiveProcess32 : public ArmLiveProcess 684167Sbinkertn@umich.edu{ 692394SN/A protected: 708737Skoansin.tan@gmail.com ObjectFile::Arch arch; 713349Sbinkertn@umich.edu ArmLiveProcess32(LiveProcessParams * params, ObjectFile *objFile, 722394SN/A ObjectFile::Arch _arch); 732812Srdreslin@umich.edu 7412351Snikos.nikoleris@arm.com void initState(); 752812Srdreslin@umich.edu 764022Sstever@eecs.umich.edu public: 774022Sstever@eecs.umich.edu 785735Snate@binkert.org ArmISA::IntReg getSyscallArg(ThreadContext *tc, int &i, int width); 795735Snate@binkert.org ArmISA::IntReg getSyscallArg(ThreadContext *tc, int &i); 804022Sstever@eecs.umich.edu void setSyscallArg(ThreadContext *tc, int i, ArmISA::IntReg val); 815735Snate@binkert.org void setSyscallReturn(ThreadContext *tc, SyscallReturn return_value); 825735Snate@binkert.org}; 835735Snate@binkert.org 844022Sstever@eecs.umich.educlass ArmLiveProcess64 : public ArmLiveProcess 854022Sstever@eecs.umich.edu{ 864022Sstever@eecs.umich.edu protected: 874022Sstever@eecs.umich.edu ObjectFile::Arch arch; 884473Sstever@eecs.umich.edu ArmLiveProcess64(LiveProcessParams * params, ObjectFile *objFile, 895319Sstever@gmail.com ObjectFile::Arch _arch); 904022Sstever@eecs.umich.edu 914022Sstever@eecs.umich.edu void initState(); 9211199Sandreas.hansson@arm.com 9311199Sandreas.hansson@arm.com public: 9412344Snikos.nikoleris@arm.com 9510883Sali.jafri@arm.com ArmISA::IntReg getSyscallArg(ThreadContext *tc, int &i, int width); 964022Sstever@eecs.umich.edu ArmISA::IntReg getSyscallArg(ThreadContext *tc, int &i); 9713367Syuetsu.kodama@riken.jp void setSyscallArg(ThreadContext *tc, int i, ArmISA::IntReg val); 984022Sstever@eecs.umich.edu void setSyscallReturn(ThreadContext *tc, SyscallReturn return_value); 994022Sstever@eecs.umich.edu}; 1004022Sstever@eecs.umich.edu 10110886Sandreas.hansson@arm.com#endif // __ARM_PROCESS_HH__ 1024022Sstever@eecs.umich.edu 1037465Ssteve.reinhardt@amd.com