process.hh revision 3669
12207SN/A/* 22207SN/A * Copyright (c) 2003-2004 The Regents of The University of Michigan 32207SN/A * All rights reserved. 42207SN/A * 52207SN/A * Redistribution and use in source and binary forms, with or without 62207SN/A * modification, are permitted provided that the following conditions are 72207SN/A * met: redistributions of source code must retain the above copyright 82207SN/A * notice, this list of conditions and the following disclaimer; 92207SN/A * redistributions in binary form must reproduce the above copyright 102207SN/A * notice, this list of conditions and the following disclaimer in the 112207SN/A * documentation and/or other materials provided with the distribution; 122207SN/A * neither the name of the copyright holders nor the names of its 132207SN/A * contributors may be used to endorse or promote products derived from 142207SN/A * this software without specific prior written permission. 152207SN/A * 162207SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 172207SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 182207SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 192207SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 202207SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 212207SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 222207SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 232207SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 242207SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 252207SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 262207SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 272665Ssaidi@eecs.umich.edu * 282665Ssaidi@eecs.umich.edu * Authors: Gabe Black 292665Ssaidi@eecs.umich.edu * Ali Saidi 302207SN/A */ 312207SN/A 322207SN/A#ifndef __SPARC_PROCESS_HH__ 332207SN/A#define __SPARC_PROCESS_HH__ 342207SN/A 352454SN/A#include <string> 362454SN/A#include <vector> 372474SN/A#include "sim/process.hh" 382454SN/A 392454SN/Aclass ObjectFile; 402454SN/Aclass System; 412207SN/A 422585SN/Atypedef struct 432585SN/A{ 442585SN/A int64_t a_type; 452585SN/A union { 462585SN/A int64_t a_val; 472585SN/A Addr a_ptr; 482585SN/A Addr a_fcn; 492585SN/A }; 502585SN/A} m5_auxv_t; 512585SN/A 522474SN/Aclass SparcLiveProcess : public LiveProcess 532207SN/A{ 542474SN/A protected: 552561SN/A 562561SN/A static const Addr StackBias = 2047; 572561SN/A 583415Sgblack@eecs.umich.edu //The locations of the fill and spill handlers 593415Sgblack@eecs.umich.edu Addr fillStart, spillStart; 603415Sgblack@eecs.umich.edu 612561SN/A std::vector<m5_auxv_t> auxv; 622561SN/A 632474SN/A SparcLiveProcess(const std::string &nm, ObjectFile *objFile, 642474SN/A System *_system, int stdin_fd, int stdout_fd, int stderr_fd, 652474SN/A std::vector<std::string> &argv, 663114Sgblack@eecs.umich.edu std::vector<std::string> &envp, 673669Sbinkertn@umich.edu const std::string &cwd, 683114Sgblack@eecs.umich.edu uint64_t _uid, uint64_t _euid, 693114Sgblack@eecs.umich.edu uint64_t _gid, uint64_t _egid, 703114Sgblack@eecs.umich.edu uint64_t _pid, uint64_t _ppid); 712207SN/A 722474SN/A void startup(); 732207SN/A 742474SN/A public: 752474SN/A 762561SN/A void argsInit(int intSize, int pageSize); 772561SN/A 783415Sgblack@eecs.umich.edu Addr readFillStart() 793415Sgblack@eecs.umich.edu { return fillStart; } 803415Sgblack@eecs.umich.edu 813415Sgblack@eecs.umich.edu Addr readSpillStart() 823415Sgblack@eecs.umich.edu { return spillStart; } 833415Sgblack@eecs.umich.edu 842474SN/A}; 852207SN/A 862207SN/A#endif // __SPARC_PROCESS_HH__ 87