summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2006-07-14 04:52:08 -0400
committerKorey Sewell <ksewell@umich.edu>2006-07-14 04:52:08 -0400
commitf1a7e0d3b3dcd04d8bde65ebb7f22b5bc6f98747 (patch)
tree179a4ac3d903f991125885643d07f2492cf674bf /src/arch
parentefc06d0545912f4589e86fe32deac98805786ee6 (diff)
downloadgem5-f1a7e0d3b3dcd04d8bde65ebb7f22b5bc6f98747.tar.xz
MIPS specific fixes ... the main thing is that SMT threads get their own stack space instead of all stacks start to space
src/arch/mips/isa_traits.hh: MaxAddr is defined in config.py now src/arch/mips/process.cc: adjust process so SMT threads get their own stack space src/arch/mips/process.hh: add stack_start static variable --HG-- extra : convert_revision : 73fdf3da9831d86536651835d209806c7f0d59da
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/mips/isa_traits.hh2
-rw-r--r--src/arch/mips/process.cc5
-rw-r--r--src/arch/mips/process.hh3
3 files changed, 8 insertions, 2 deletions
diff --git a/src/arch/mips/isa_traits.hh b/src/arch/mips/isa_traits.hh
index ff994bef9..2f485c7fd 100644
--- a/src/arch/mips/isa_traits.hh
+++ b/src/arch/mips/isa_traits.hh
@@ -129,7 +129,7 @@ namespace MipsISA
template <class TC>
void zeroRegisters(TC *tc);
- const Addr MaxAddr = (Addr)-1;
+// const Addr MaxAddr = (Addr)-1;
void copyRegs(ThreadContext *src, ThreadContext *dest);
diff --git a/src/arch/mips/process.cc b/src/arch/mips/process.cc
index 031c2030e..cb847fe04 100644
--- a/src/arch/mips/process.cc
+++ b/src/arch/mips/process.cc
@@ -41,6 +41,8 @@
using namespace std;
using namespace MipsISA;
+Addr MipsLiveProcess::stack_start = 0x7FFFFFFF;
+
MipsLiveProcess::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)
@@ -49,10 +51,11 @@ MipsLiveProcess::MipsLiveProcess(const std::string &nm, ObjectFile *objFile,
{
// Set up stack. On MIPS, stack starts at the top of kuseg
// user address space. MIPS stack grows down from here
- stack_base = 0x7FFFFFFF;
+ stack_base = stack_start;
// Set pointer for next thread stack. Reserve 8M for main stack.
next_thread_stack_base = stack_base - (8 * 1024 * 1024);
+ stack_start = next_thread_stack_base;
// Set up break point (Top of Heap)
brk_point = objFile->dataBase() + objFile->dataSize() + objFile->bssSize();
diff --git a/src/arch/mips/process.hh b/src/arch/mips/process.hh
index b0ef20399..4baee134b 100644
--- a/src/arch/mips/process.hh
+++ b/src/arch/mips/process.hh
@@ -50,6 +50,9 @@ class MipsLiveProcess : public LiveProcess
std::vector<std::string> &envp);
void startup();
+
+
+ static Addr stack_start;
};