AlphaDTB *getDTBPtr() { return dtb; }
- bool validInstAddr(Addr addr) { return true; }
- bool validDataAddr(Addr addr) { return true; }
int getInstAsid() { return regs.instAsid(); }
int getDataAsid() { return regs.dataAsid(); }
#else
Process *getProcessPtr() { return process; }
- bool validInstAddr(Addr addr)
- { return process->validInstAddr(addr); }
-
- bool validDataAddr(Addr addr)
- { return process->validDataAddr(addr); }
-
int getInstAsid() { return asid; }
int getDataAsid() { return asid; }
virtual int getThreadNum() = 0;
- virtual bool validInstAddr(Addr addr) = 0;
- virtual bool validDataAddr(Addr addr) = 0;
virtual int getInstAsid() = 0;
virtual int getDataAsid() = 0;
int getThreadNum() { return actualXC->getThreadNum(); }
- bool validInstAddr(Addr addr) { return actualXC->validInstAddr(addr); }
- bool validDataAddr(Addr addr) { return actualXC->validDataAddr(addr); }
int getInstAsid() { return actualXC->getInstAsid(); }
int getDataAsid() { return actualXC->getDataAsid(); }
#include "base/loader/symtab.hh"
#include "base/statistics.hh"
#include "config/full_system.hh"
-#include "cpu/cpu_exec_context.hh"
#include "cpu/exec_context.hh"
-#include "cpu/smt.hh"
-#include "encumbered/cpu/full/thread.hh"
-#include "encumbered/eio/eio.hh"
#include "mem/page_table.hh"
#include "mem/memory.hh"
#include "mem/translating_port.hh"
{
prog_fname = argv[0];
- prog_entry = objFile->entryPoint();
- text_base = objFile->textBase();
- text_size = objFile->textSize();
- data_base = objFile->dataBase();
- data_size = objFile->dataSize() + objFile->bssSize();
- brk_point = roundUp(data_base + data_size, VMPageSize);
+ brk_point = objFile->dataBase() + objFile->dataSize() + objFile->bssSize();
+ brk_point = roundUp(brk_point, VMPageSize);
// Set up stack. On Alpha, stack goes below text section. This
// code should get moved to some architecture-specific spot.
- stack_base = text_base - (409600+4096);
+ stack_base = objFile->textBase() - (409600+4096);
// Set up region for mmaps. Tru64 seems to start just above 0 and
// grow up from there.
execContexts[0]->setIntReg(ArgumentReg1, argv_array_base);
execContexts[0]->setIntReg(StackPointerReg, stack_min);
execContexts[0]->setIntReg(GlobalPointerReg, objFile->globalPointer());
+
+ Addr prog_entry = objFile->entryPoint();
execContexts[0]->setPC(prog_entry);
execContexts[0]->setNextPC(prog_entry + sizeof(MachInst));
// list of all blocked contexts
std::list<WaitRec> waitList;
- Addr text_base; // text (code) segment base
- unsigned text_size; // text (code) size in bytes
-
- Addr data_base; // initialized data segment base
- unsigned data_size; // initialized data + bss size in bytes
-
Addr brk_point; // top of the data segment
Addr stack_base; // stack segment base (highest address)
Addr nxm_end;
std::string prog_fname; // file name
- Addr prog_entry; // entry point (initial PC)
Stats::Scalar<> num_syscalls; // number of syscalls executed
// look up simulator fd for given target fd
int sim_fd(int tgt_fd);
- // is this a valid instruction fetch address?
- bool validInstAddr(Addr addr)
- {
- return (text_base <= addr &&
- addr < text_base + text_size &&
- !(addr & (sizeof(MachInst)-1)));
- }
-
- // is this a valid address? (used to filter data fetches)
- // note that we just assume stack size <= 16MB
- // this may be alpha-specific
- bool validDataAddr(Addr addr)
- {
- return ((data_base <= addr && addr < brk_point) ||
- (next_thread_stack_base <= addr && addr < stack_base) ||
- (text_base <= addr && addr < (text_base + text_size)) ||
- (mmap_start <= addr && addr < mmap_end) ||
- (nxm_start <= addr && addr < nxm_end));
- }
-
virtual void syscall(ExecContext *xc) = 0;
};