summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Dreslinski <rdreslin@umich.edu>2005-03-16 18:31:20 -0500
committerRon Dreslinski <rdreslin@umich.edu>2005-03-16 18:31:20 -0500
commit901aeb24ebff9254da2bef09f94c65a955b1d479 (patch)
tree2268831bd10f7805a33c5015e22a6e362712ed1f
parent14c461c93c9b83fffb0d629d347a28d4f7b79198 (diff)
parentf2dd82097263a726888af2a097547f3c6d2d6a03 (diff)
downloadgem5-901aeb24ebff9254da2bef09f94c65a955b1d479.tar.xz
Merge zizzer:/z/m5/Bitkeeper/m5
into zizzer.eecs.umich.edu:/.automount/zazzer/z/rdreslin/m5bk/timing_L1 --HG-- extra : convert_revision : f7c6ead8e9b2d0b5682d7bb40f5a85d4fe402896
-rw-r--r--arch/alpha/alpha_tru64_process.cc4
-rw-r--r--sim/process.cc1
-rw-r--r--sim/process.hh9
-rw-r--r--sim/syscall_emul.hh4
4 files changed, 16 insertions, 2 deletions
diff --git a/arch/alpha/alpha_tru64_process.cc b/arch/alpha/alpha_tru64_process.cc
index 1722b658e..a211e0ae8 100644
--- a/arch/alpha/alpha_tru64_process.cc
+++ b/arch/alpha/alpha_tru64_process.cc
@@ -877,6 +877,10 @@ class Tru64 {
*configptr_ptr = config_addr;
configptr_ptr.copyOut(xc->mem);
+ // Register this as a valid address range with the process
+ process->nxm_start = base_addr;
+ process->nxm_end = cur_addr;
+
return 0;
}
diff --git a/sim/process.cc b/sim/process.cc
index 7111e8733..c18b31da7 100644
--- a/sim/process.cc
+++ b/sim/process.cc
@@ -89,6 +89,7 @@ Process::Process(const string &nm,
}
mmap_start = mmap_end = 0;
+ nxm_start = nxm_end = 0;
// other parameters will be initialized when the program is loaded
}
diff --git a/sim/process.hh b/sim/process.hh
index 1ab43cd62..51d7639ac 100644
--- a/sim/process.hh
+++ b/sim/process.hh
@@ -97,6 +97,10 @@ class Process : public SimObject
Addr mmap_start;
Addr mmap_end;
+ // Base of region for nxm data
+ Addr nxm_start;
+ Addr nxm_end;
+
std::string prog_fname; // file name
Addr prog_entry; // entry point (initial PC)
@@ -159,9 +163,10 @@ class Process : public SimObject
bool validDataAddr(Addr addr)
{
return ((data_base <= addr && addr < brk_point) ||
- ((stack_base - 16*1024*1024) <= addr && addr < stack_base) ||
+ (next_thread_stack_base <= addr && addr < stack_base) ||
(text_base <= addr && addr < (text_base + text_size)) ||
- (mmap_start <= addr && addr < mmap_end));
+ (mmap_start <= addr && addr < mmap_end) ||
+ (nxm_start <= addr && addr < nxm_end));
}
virtual void syscall(ExecContext *xc) = 0;
diff --git a/sim/syscall_emul.hh b/sim/syscall_emul.hh
index 51a075a28..69c17c330 100644
--- a/sim/syscall_emul.hh
+++ b/sim/syscall_emul.hh
@@ -412,6 +412,10 @@ mmapFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc)
// user didn't give an address... pick one from our "mmap region"
start = p->mmap_end;
p->mmap_end += RoundUp<Addr>(length, VMPageSize);
+ if (p->nxm_start != 0) {
+ //If we have an nxm space, make sure we haven't colided
+ assert(p->mmap_end < p->nxm_start);
+ }
}
if (!(flags & OS::TGT_MAP_ANONYMOUS)) {