diff options
-rw-r--r-- | arch/alpha/alpha_tru64_process.cc | 4 | ||||
-rw-r--r-- | configs/splash2/run.mpy | 4 | ||||
-rw-r--r-- | python/m5/config.py | 10 | ||||
-rw-r--r-- | sim/process.cc | 1 | ||||
-rw-r--r-- | sim/process.hh | 9 | ||||
-rw-r--r-- | sim/syscall_emul.hh | 4 |
6 files changed, 24 insertions, 8 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/configs/splash2/run.mpy b/configs/splash2/run.mpy index a19dcdc93..800bff6f8 100644 --- a/configs/splash2/run.mpy +++ b/configs/splash2/run.mpy @@ -5,12 +5,12 @@ if 'SYSTEM' not in env: if env['SYSTEM'] == 'Simple': from SimpleConfig import * - BaseCPU.workload = Super.workload + BaseCPU.workload = parent.workload SimpleStandAlone.cpu = [ CPU() for i in xrange(int(env['NP'])) ] root = SimpleStandAlone elif env['SYSTEM'] == 'Detailed': from DetailedConfig import * - BaseCPU.workload = Super.workload + BaseCPU.workload = parent.workload DetailedStandAlone.cpu = [ DetailedCPU() for i in xrange(int(env['NP'])) ] root = DetailedStandAlone else: diff --git a/python/m5/config.py b/python/m5/config.py index bb880cd29..64ec99490 100644 --- a/python/m5/config.py +++ b/python/m5/config.py @@ -27,6 +27,7 @@ from __future__ import generators import os, re, sys, types, inspect +from m5 import panic from convert import * noDot = False @@ -197,12 +198,13 @@ class Proxy(object): raise AttributeError, \ 'Parent of %s type %s not found at path %s' \ % (base.name, ptype, self._path) - found, done = obj.find(ptype, self._path) - if isinstance(found, Proxy): - done = False + result, done = obj.find(ptype, self._path) obj = obj.parent - return self._mulcheck(found) + if isinstance(result, Proxy): + result = result.unproxy(obj, ptype) + + return self._mulcheck(result) def getindex(obj, index): if index == None: 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)) { |