process.hh revision 2561
16242Sgblack@eecs.umich.edu/* 210324SCurtis.Dunham@arm.com * Copyright (c) 2003-2004 The Regents of The University of Michigan 37093Sgblack@eecs.umich.edu * All rights reserved. 47093Sgblack@eecs.umich.edu * 57093Sgblack@eecs.umich.edu * Redistribution and use in source and binary forms, with or without 67093Sgblack@eecs.umich.edu * modification, are permitted provided that the following conditions are 77093Sgblack@eecs.umich.edu * met: redistributions of source code must retain the above copyright 87093Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer; 97093Sgblack@eecs.umich.edu * redistributions in binary form must reproduce the above copyright 107093Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer in the 117093Sgblack@eecs.umich.edu * documentation and/or other materials provided with the distribution; 127093Sgblack@eecs.umich.edu * neither the name of the copyright holders nor the names of its 137093Sgblack@eecs.umich.edu * contributors may be used to endorse or promote products derived from 146242Sgblack@eecs.umich.edu * this software without specific prior written permission. 156242Sgblack@eecs.umich.edu * 166242Sgblack@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 176242Sgblack@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 186242Sgblack@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 196242Sgblack@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 206242Sgblack@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 216242Sgblack@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 226242Sgblack@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 236242Sgblack@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 246242Sgblack@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 256242Sgblack@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 266242Sgblack@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 276242Sgblack@eecs.umich.edu */ 286242Sgblack@eecs.umich.edu 296242Sgblack@eecs.umich.edu#ifndef __SPARC_LINUX_PROCESS_HH__ 306242Sgblack@eecs.umich.edu#define __SPARC_LINUX_PROCESS_HH__ 316242Sgblack@eecs.umich.edu 326242Sgblack@eecs.umich.edu#include "arch/sparc/process.hh" 336242Sgblack@eecs.umich.edu#include "sim/process.hh" 346242Sgblack@eecs.umich.edu 356242Sgblack@eecs.umich.edunamespace SparcISA { 366242Sgblack@eecs.umich.edu 376242Sgblack@eecs.umich.edu/// A process with emulated SPARC/Linux syscalls. 386242Sgblack@eecs.umich.educlass SparcLinuxProcess : public SparcLiveProcess 396242Sgblack@eecs.umich.edu{ 406242Sgblack@eecs.umich.edu public: 4110037SARM gem5 Developers /// Constructor. 426242Sgblack@eecs.umich.edu SparcLinuxProcess(const std::string &name, 436242Sgblack@eecs.umich.edu ObjectFile *objFile, 446242Sgblack@eecs.umich.edu System * system, 456242Sgblack@eecs.umich.edu int stdin_fd, int stdout_fd, int stderr_fd, 4610037SARM gem5 Developers std::vector<std::string> &argv, 4710037SARM gem5 Developers std::vector<std::string> &envp); 486242Sgblack@eecs.umich.edu 499256SAndreas.Sandberg@arm.com virtual SyscallDesc* getDesc(int callnum); 506242Sgblack@eecs.umich.edu 5110037SARM gem5 Developers /// The target system's hostname. 5210037SARM gem5 Developers static const char *hostname; 5310037SARM gem5 Developers 546242Sgblack@eecs.umich.edu /// Array of syscall descriptors, indexed by call number. 556242Sgblack@eecs.umich.edu static SyscallDesc syscallDescs[]; 566242Sgblack@eecs.umich.edu 5710037SARM gem5 Developers const int Num_Syscall_Descs; 5810037SARM gem5 Developers}; 5910037SARM gem5 Developers 6010037SARM gem5 DevelopersSyscallReturn getresuidFunc(SyscallDesc *desc, int num, 6110037SARM gem5 Developers Process *p, ExecContext *xc); 6210037SARM gem5 Developers 6310037SARM gem5 Developers} // namespace SparcISA 6410037SARM gem5 Developers#endif // __ALPHA_LINUX_PROCESS_HH__ 6510037SARM gem5 Developers