process.hh revision 2561
16019Shines@cs.fsu.edu/*
211861Snikos.nikoleris@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
146019Shines@cs.fsu.edu * this software without specific prior written permission.
156019Shines@cs.fsu.edu *
166019Shines@cs.fsu.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
176019Shines@cs.fsu.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
186019Shines@cs.fsu.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
196019Shines@cs.fsu.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
206019Shines@cs.fsu.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
216019Shines@cs.fsu.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
226019Shines@cs.fsu.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
236019Shines@cs.fsu.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
246019Shines@cs.fsu.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
256019Shines@cs.fsu.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
266019Shines@cs.fsu.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
276019Shines@cs.fsu.edu */
286019Shines@cs.fsu.edu
296019Shines@cs.fsu.edu#ifndef __SPARC_PROCESS_HH__
306019Shines@cs.fsu.edu#define __SPARC_PROCESS_HH__
316019Shines@cs.fsu.edu
326019Shines@cs.fsu.edu#include <string>
336019Shines@cs.fsu.edu#include <vector>
346019Shines@cs.fsu.edu#include "sim/process.hh"
356019Shines@cs.fsu.edu
366019Shines@cs.fsu.educlass ObjectFile;
376019Shines@cs.fsu.educlass System;
386019Shines@cs.fsu.edu
396019Shines@cs.fsu.educlass SparcLiveProcess : public LiveProcess
407399SAli.Saidi@ARM.com{
417399SAli.Saidi@ARM.com  protected:
426019Shines@cs.fsu.edu    typedef struct
436019Shines@cs.fsu.edu    {
446019Shines@cs.fsu.edu        int64_t a_type;
4510873Sandreas.sandberg@arm.com        union {
4610873Sandreas.sandberg@arm.com            int64_t a_val;
4710474Sandreas.hansson@arm.com            Addr    a_ptr;
486019Shines@cs.fsu.edu            Addr    a_fcn;
496019Shines@cs.fsu.edu        };
506019Shines@cs.fsu.edu    } m5_auxv_t;
516116Snate@binkert.org
526019Shines@cs.fsu.edu    static const Addr StackBias = 2047;
5311793Sbrandon.potter@amd.com
5411793Sbrandon.potter@amd.com    std::vector<m5_auxv_t> auxv;
558782Sgblack@eecs.umich.edu
568756Sgblack@eecs.umich.edu    SparcLiveProcess(const std::string &nm, ObjectFile *objFile,
576019Shines@cs.fsu.edu                System *_system, int stdin_fd, int stdout_fd, int stderr_fd,
5812005Sandreas.sandberg@arm.com                std::vector<std::string> &argv,
596019Shines@cs.fsu.edu                std::vector<std::string> &envp);
606019Shines@cs.fsu.edu
616019Shines@cs.fsu.edu    void startup();
6210024Sdam.sunwoo@arm.com
636019Shines@cs.fsu.edu  public:
648232Snate@binkert.org    // this function is used to create the LiveProcess object, since
658232Snate@binkert.org    // we can't tell which subclass of LiveProcess to use until we
668232Snate@binkert.org    // open and look at the object file.
676116Snate@binkert.org    static SparcLiveProcess *create(const std::string &nm,
6811608Snikos.nikoleris@arm.com                               System *_system,
696116Snate@binkert.org                               int stdin_fd, int stdout_fd, int stderr_fd,
708756Sgblack@eecs.umich.edu                               std::string executable,
716019Shines@cs.fsu.edu                               std::vector<std::string> &argv,
726019Shines@cs.fsu.edu                               std::vector<std::string> &envp);
736019Shines@cs.fsu.edu
746019Shines@cs.fsu.edu    void argsInit(int intSize, int pageSize);
756019Shines@cs.fsu.edu
7610037SARM gem5 Developers};
7710037SARM gem5 Developers
7810418Sandreas.hansson@arm.com#endif // __SPARC_PROCESS_HH__
7910418Sandreas.hansson@arm.com