process.hh revision 2665
12623SN/A/* 210596Sgabeblack@google.com * Copyright (c) 2003-2004 The Regents of The University of Michigan 310030SAli.Saidi@ARM.com * All rights reserved. 48926Sandreas.hansson@arm.com * 58926Sandreas.hansson@arm.com * Redistribution and use in source and binary forms, with or without 68926Sandreas.hansson@arm.com * modification, are permitted provided that the following conditions are 78926Sandreas.hansson@arm.com * met: redistributions of source code must retain the above copyright 88926Sandreas.hansson@arm.com * notice, this list of conditions and the following disclaimer; 98926Sandreas.hansson@arm.com * redistributions in binary form must reproduce the above copyright 108926Sandreas.hansson@arm.com * notice, this list of conditions and the following disclaimer in the 118926Sandreas.hansson@arm.com * documentation and/or other materials provided with the distribution; 128926Sandreas.hansson@arm.com * neither the name of the copyright holders nor the names of its 138926Sandreas.hansson@arm.com * contributors may be used to endorse or promote products derived from 148926Sandreas.hansson@arm.com * this software without specific prior written permission. 152623SN/A * 162623SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 172623SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 182623SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 192623SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 202623SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 212623SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 222623SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 232623SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 242623SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 252623SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 262623SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 272623SN/A * 282623SN/A * Authors: Steve Reinhardt 292623SN/A */ 302623SN/A 312623SN/A#ifndef __SPARC_LINUX_PROCESS_HH__ 322623SN/A#define __SPARC_LINUX_PROCESS_HH__ 332623SN/A 342623SN/A#include "arch/sparc/linux/linux.hh" 352623SN/A#include "arch/sparc/process.hh" 362623SN/A#include "sim/process.hh" 372623SN/A 382623SN/Anamespace SparcISA { 392623SN/A 402665Ssaidi@eecs.umich.edu/// A process with emulated SPARC/Linux syscalls. 412665Ssaidi@eecs.umich.educlass SparcLinuxProcess : public SparcLiveProcess 422623SN/A{ 432623SN/A public: 443170Sstever@eecs.umich.edu /// Constructor. 458105Sgblack@eecs.umich.edu SparcLinuxProcess(const std::string &name, 462623SN/A ObjectFile *objFile, 474040Ssaidi@eecs.umich.edu System * system, 489647Sdam.sunwoo@arm.com int stdin_fd, int stdout_fd, int stderr_fd, 496658Snate@binkert.org std::vector<std::string> &argv, 508229Snate@binkert.org std::vector<std::string> &envp); 512623SN/A 529443SAndreas.Sandberg@ARM.com virtual SyscallDesc* getDesc(int callnum); 538232Snate@binkert.org 548232Snate@binkert.org /// The target system's hostname. 553348Sbinkertn@umich.edu static const char *hostname; 563348Sbinkertn@umich.edu 578926Sandreas.hansson@arm.com /// Array of syscall descriptors, indexed by call number. 584762Snate@binkert.org static SyscallDesc syscallDescs[]; 597678Sgblack@eecs.umich.edu 602901Ssaidi@eecs.umich.edu const int Num_Syscall_Descs; 618779Sgblack@eecs.umich.edu}; 622623SN/A 632623SN/ASyscallReturn getresuidFunc(SyscallDesc *desc, int num, 642623SN/A Process *p, ExecContext *xc); 652623SN/A 662623SN/A} // namespace SparcISA 675606Snate@binkert.org#endif // __ALPHA_LINUX_PROCESS_HH__ 682623SN/A