Merge zizzer:/z/m5/Bitkeeper/m5

into zizzer.eecs.umich.edu:/.automount/zazzer/z/rdreslin/m5bk/timing_L1

--HG--
extra : convert_revision : 848757d0f18cfb33620cfa4b084a9b102b2744c0
This commit is contained in:
Ron Dreslinski 2005-03-16 10:31:22 -05:00
commit d97590e29d
4 changed files with 19 additions and 1 deletions

View file

@ -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;
}

View file

@ -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
}

View file

@ -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,14 @@ class Process : public SimObject
bool validDataAddr(Addr addr)
{
return ((data_base <= addr && addr < brk_point) ||
#ifdef FULLSYSTEM
((stack_base - 16*1024*1024) <= addr && addr < stack_base) ||
#else
(next_thread_stack_base <= addr && addr < stack_base) ||
#endif
(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;

View file

@ -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)) {