process.hh revision 11800
17199Sgblack@eecs.umich.edu/*
27199Sgblack@eecs.umich.edu * Copyright (c) 2006 The Regents of The University of Michigan
37199Sgblack@eecs.umich.edu * All rights reserved.
47199Sgblack@eecs.umich.edu *
57199Sgblack@eecs.umich.edu * Redistribution and use in source and binary forms, with or without
67199Sgblack@eecs.umich.edu * modification, are permitted provided that the following conditions are
77199Sgblack@eecs.umich.edu * met: redistributions of source code must retain the above copyright
87199Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer;
97199Sgblack@eecs.umich.edu * redistributions in binary form must reproduce the above copyright
107199Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer in the
117199Sgblack@eecs.umich.edu * documentation and/or other materials provided with the distribution;
127199Sgblack@eecs.umich.edu * neither the name of the copyright holders nor the names of its
137199Sgblack@eecs.umich.edu * contributors may be used to endorse or promote products derived from
147199Sgblack@eecs.umich.edu * this software without specific prior written permission.
157199Sgblack@eecs.umich.edu *
167199Sgblack@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
177199Sgblack@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
187199Sgblack@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
197199Sgblack@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
207199Sgblack@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
217199Sgblack@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
227199Sgblack@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
237199Sgblack@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
247199Sgblack@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
257199Sgblack@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
267199Sgblack@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
277199Sgblack@eecs.umich.edu *
287199Sgblack@eecs.umich.edu * Authors: Gabe Black
297199Sgblack@eecs.umich.edu *          Ali Saidi
307199Sgblack@eecs.umich.edu */
317199Sgblack@eecs.umich.edu
327199Sgblack@eecs.umich.edu#ifndef __MIPS_PROCESS_HH__
337199Sgblack@eecs.umich.edu#define __MIPS_PROCESS_HH__
347199Sgblack@eecs.umich.edu
357199Sgblack@eecs.umich.edu#include <string>
367199Sgblack@eecs.umich.edu#include <vector>
377199Sgblack@eecs.umich.edu
387199Sgblack@eecs.umich.edu#include "mem/page_table.hh"
397199Sgblack@eecs.umich.edu#include "sim/process.hh"
407199Sgblack@eecs.umich.edu
417199Sgblack@eecs.umich.educlass LiveProcess;
427199Sgblack@eecs.umich.educlass ObjectFile;
437199Sgblack@eecs.umich.educlass System;
447199Sgblack@eecs.umich.edu
457199Sgblack@eecs.umich.educlass MipsLiveProcess : public LiveProcess
467199Sgblack@eecs.umich.edu{
477199Sgblack@eecs.umich.edu  protected:
487199Sgblack@eecs.umich.edu    MipsLiveProcess(LiveProcessParams * params, ObjectFile *objFile);
497199Sgblack@eecs.umich.edu
507199Sgblack@eecs.umich.edu    void initState();
517199Sgblack@eecs.umich.edu
527199Sgblack@eecs.umich.edu    template<class IntType>
537199Sgblack@eecs.umich.edu    void argsInit(int pageSize);
547199Sgblack@eecs.umich.edu
557199Sgblack@eecs.umich.edu  public:
567199Sgblack@eecs.umich.edu    MipsISA::IntReg getSyscallArg(ThreadContext *tc, int &i);
577199Sgblack@eecs.umich.edu    /// Explicitly import the otherwise hidden getSyscallArg
587202Sgblack@eecs.umich.edu    using LiveProcess::getSyscallArg;
597202Sgblack@eecs.umich.edu    void setSyscallArg(ThreadContext *tc, int i, MipsISA::IntReg val);
607202Sgblack@eecs.umich.edu    void setSyscallReturn(ThreadContext *tc, SyscallReturn return_value);
617202Sgblack@eecs.umich.edu};
627202Sgblack@eecs.umich.edu
637202Sgblack@eecs.umich.edu/* No architectural page table defined for this ISA */
647202Sgblack@eecs.umich.edutypedef NoArchPageTable ArchPageTable;
657202Sgblack@eecs.umich.edu
667202Sgblack@eecs.umich.edu
677202Sgblack@eecs.umich.edu#endif // __MIPS_PROCESS_HH__
687202Sgblack@eecs.umich.edu