summaryrefslogtreecommitdiff
path: root/sim/syscall_emul.hh
diff options
context:
space:
mode:
authorRon Dreslinski <rdreslin@umich.edu>2005-03-16 10:30:33 -0500
committerRon Dreslinski <rdreslin@umich.edu>2005-03-16 10:30:33 -0500
commitdf012f26fa9797896e3f571c81d336bec0a97b98 (patch)
tree8fd88577c6c3542256f8d8ab4d28075892a6f594 /sim/syscall_emul.hh
parentaa8c9db159422a313f6dfc9a76fd827515b32126 (diff)
downloadgem5-df012f26fa9797896e3f571c81d336bec0a97b98.tar.xz
Fix the bad addr check to check for allowable addresses in the nxm address space
arch/alpha/alpha_tru64_process.cc: sim/process.cc: sim/process.hh: Add an address range for the nxm sim/syscall_emul.hh: Check to make sure that if we have an nxm config space that the mmap hasn't grown into it --HG-- extra : convert_revision : e479e5240080ae488080d228bafea488835d6e77
Diffstat (limited to 'sim/syscall_emul.hh')
-rw-r--r--sim/syscall_emul.hh4
1 files changed, 4 insertions, 0 deletions
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)) {