arch: Make and use endian specific versions of the mem helpers.
[gem5.git] / src / arch / mips / process.hh
index dae8911253ed1e1801b630360de10fc48e9561ad..a607bd285732c9f1c07fee0751ae045b24f08042 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003-2004 The Regents of The University of Michigan
+ * Copyright (c) 2006 The Regents of The University of Michigan
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,6 @@
  *
  * Authors: Gabe Black
  *          Ali Saidi
- *          Korey Sewell
  */
 
 #ifndef __MIPS_PROCESS_HH__
 
 #include <string>
 #include <vector>
+
+#include "mem/page_table.hh"
 #include "sim/process.hh"
 
-class LiveProcess;
 class ObjectFile;
-class System;
 
-class MipsLiveProcess : public LiveProcess
+class MipsProcess : public Process
 {
   protected:
-    MipsLiveProcess(const std::string &nm, ObjectFile *objFile,
-                System *_system, int stdin_fd, int stdout_fd, int stderr_fd,
-                std::vector<std::string> &argv,
-                std::vector<std::string> &envp);
+    MipsProcess(ProcessParams * params, ObjectFile *objFile);
 
-    void startup();
+    void initState();
 
-  public:
-    // this function is used to create the LiveProcess object, since
-    // we can't tell which subclass of LiveProcess to use until we
-    // open and look at the object file.
-    static MipsLiveProcess *create(const std::string &nm,
-                               System *_system,
-                               int stdin_fd, int stdout_fd, int stderr_fd,
-                               std::string executable,
-                               std::vector<std::string> &argv,
-                               std::vector<std::string> &envp);
+    template<class IntType>
+    void argsInit(int pageSize);
 
+  public:
+    RegVal getSyscallArg(ThreadContext *tc, int &i);
+    /// Explicitly import the otherwise hidden getSyscallArg
+    using Process::getSyscallArg;
+    void setSyscallArg(ThreadContext *tc, int i, RegVal val);
+    void setSyscallReturn(ThreadContext *tc, SyscallReturn return_value);
 };
 
-
 #endif // __MIPS_PROCESS_HH__