if (kernelSymtab->findAddress("loops_per_jiffy", addr)) {
Tick cpuFreq = tc->getCpuPtr()->frequency();
assert(intrFreq);
- FSTranslatingPortProxy &vp = tc->getVirtProxy();
+ PortProxy &vp = tc->getVirtProxy();
vp.write(addr, (uint32_t)((cpuFreq / intrFreq) * 0.9988),
GuestByteOrder);
}
: tc(_tc)
{
Addr addr = 0;
- FSTranslatingPortProxy &vp = tc->getVirtProxy();
+ PortProxy &vp = tc->getVirtProxy();
SymbolTable *symtab = tc->getSystemPtr()->kernelSymtab;
if (!symtab->findAddress("thread_info_size", addr))
Addr tsk;
- FSTranslatingPortProxy &vp = tc->getVirtProxy();
+ PortProxy &vp = tc->getVirtProxy();
tsk = vp.read<Addr>(base + task_off, GuestByteOrder);
return tsk;
uint16_t pd;
- FSTranslatingPortProxy &vp = tc->getVirtProxy();
+ PortProxy &vp = tc->getVirtProxy();
pd = vp.read<uint16_t>(task + pid_off, GuestByteOrder);
return pd;
return tc->readIntReg(16 + number);
} else {
Addr sp = tc->readIntReg(StackPointerReg);
- FSTranslatingPortProxy &vp = tc->getVirtProxy();
+ PortProxy &vp = tc->getVirtProxy();
uint64_t arg = vp.read<uint64_t>(sp +
(number-NumArgumentRegs) *
sizeof(uint64_t));
static int32_t
readSymbol(ThreadContext *tc, const std::string name)
{
- FSTranslatingPortProxy &vp = tc->getVirtProxy();
+ PortProxy &vp = tc->getVirtProxy();
SymbolTable *symtab = tc->getSystemPtr()->kernelSymtab;
Addr addr;
Addr tsk;
- FSTranslatingPortProxy &vp = tc->getVirtProxy();
+ PortProxy &vp = tc->getVirtProxy();
tsk = vp.read<Addr>(base + task_off, GuestByteOrder);
return tsk;
uint16_t pd;
- FSTranslatingPortProxy &vp = tc->getVirtProxy();
+ PortProxy &vp = tc->getVirtProxy();
pd = vp.read<uint16_t>(task + pid_off, GuestByteOrder);
return pd;
}
} else {
Addr sp = tc->readIntReg(StackPointerReg);
- FSTranslatingPortProxy &vp = tc->getVirtProxy();
+ PortProxy &vp = tc->getVirtProxy();
uint64_t arg;
if (size == sizeof(uint64_t)) {
// If the argument is even it must be aligned
Addr tsk;
- FSTranslatingPortProxy &vp = tc->getVirtProxy();
+ PortProxy &vp = tc->getVirtProxy();
tsk = vp.read<Addr>(base + task_off, GuestByteOrder);
return tsk;
uint16_t pd;
- FSTranslatingPortProxy &vp = tc->getVirtProxy();
+ PortProxy &vp = tc->getVirtProxy();
pd = vp.read<uint16_t>(task + pid_off, GuestByteOrder);
return pd;
return tc->readIntReg(8 + number);
} else {
Addr sp = tc->readIntReg(StackPointerReg);
- FSTranslatingPortProxy &vp = tc->getVirtProxy();
+ PortProxy &vp = tc->getVirtProxy();
uint64_t arg = vp.read<uint64_t>(sp + 92 +
(number-NumArgumentRegs) * sizeof(uint64_t));
return arg;
int code = process->getSyscallArg(tc, index);
uint64_t addr = process->getSyscallArg(tc, index);
uint64_t fsBase, gsBase;
- SETranslatingPortProxy &p = tc->getMemProxy();
+ PortProxy &p = tc->getMemProxy();
switch(code)
{
// Each of these valid options should actually check addr.
Process *p = tc->getProcessPtr();
if (!p->fixupStackFault(tc->readMiscReg(MISCREG_CR2))) {
- SETranslatingPortProxy proxy = tc->getMemProxy();
+ PortProxy &proxy = tc->getMemProxy();
// at this point we should have 6 values on the interrupt stack
int size = 6;
uint64_t is[size];
static int32_t
readSymbol(ThreadContext *tc, const std::string name)
{
- FSTranslatingPortProxy &vp = tc->getVirtProxy();
+ PortProxy &vp = tc->getVirtProxy();
SymbolTable *symtab = tc->getSystemPtr()->kernelSymtab;
Addr addr;
Addr tsk;
- FSTranslatingPortProxy &vp = tc->getVirtProxy();
+ PortProxy &vp = tc->getVirtProxy();
tsk = vp.read<Addr>(base + task_off, GuestByteOrder);
return tsk;
uint16_t pd;
- FSTranslatingPortProxy &vp = tc->getVirtProxy();
+ PortProxy &vp = tc->getVirtProxy();
pd = vp.read<uint16_t>(task + pid_off, GuestByteOrder);
return pd;
DPRINTF(GDBRead, "read: addr=%#x, size=%d", vaddr, size);
if (FullSystem) {
- FSTranslatingPortProxy &proxy = tc->getVirtProxy();
+ PortProxy &proxy = tc->getVirtProxy();
proxy.readBlob(vaddr, data, size);
} else {
- SETranslatingPortProxy &proxy = tc->getMemProxy();
+ PortProxy &proxy = tc->getMemProxy();
proxy.readBlob(vaddr, data, size);
}
DPRINTFNR("\n");
}
if (FullSystem) {
- FSTranslatingPortProxy &proxy = tc->getVirtProxy();
+ PortProxy &proxy = tc->getVirtProxy();
proxy.writeBlob(vaddr, data, size);
} else {
- SETranslatingPortProxy &proxy = tc->getMemProxy();
+ PortProxy &proxy = tc->getMemProxy();
proxy.writeBlob(vaddr, data, size);
}
void
copyStringArray(std::vector<std::string> &strings,
AddrType array_ptr, AddrType data_ptr,
- SETranslatingPortProxy& memProxy)
+ PortProxy& memProxy)
{
AddrType data_ptr_swap;
for (std::vector<std::string>::size_type i = 0; i < strings.size(); ++i) {
// if the address is already there, zero it out
else {
uint8_t zero = 0;
- SETranslatingPortProxy &tp = tc->getMemProxy();
+ PortProxy &tp = tc->getMemProxy();
// split non-page aligned accesses
Addr next_page = roundUp(gen.addr(), PageBytes);
// Here are a couple of convenience functions
template<class OS>
void
-copyOutStatBuf(SETranslatingPortProxy &mem, Addr addr,
+copyOutStatBuf(PortProxy &mem, Addr addr,
hst_stat *host, bool fakeTTY = false)
{
typedef TypedBufferArg<typename OS::tgt_stat> tgt_stat_buf;
template<class OS>
void
-copyOutStat64Buf(SETranslatingPortProxy &mem, Addr addr,
+copyOutStat64Buf(PortProxy &mem, Addr addr,
hst_stat64 *host, bool fakeTTY = false)
{
typedef TypedBufferArg<typename OS::tgt_stat64> tgt_stat_buf;
template <class OS>
void
-copyOutStatfsBuf(SETranslatingPortProxy &mem, Addr addr,
+copyOutStatfsBuf(PortProxy &mem, Addr addr,
hst_statfs *host)
{
TypedBufferArg<typename OS::tgt_statfs> tgt(addr);
return -EBADF;
int sim_fd = ffdp->getSimFD();
- SETranslatingPortProxy &prox = tc->getMemProxy();
+ PortProxy &prox = tc->getMemProxy();
uint64_t tiov_base = p->getSyscallArg(tc, index);
size_t count = p->getSyscallArg(tc, index);
typename OS::tgt_iovec tiov[count];
return -EBADF;
int sim_fd = hbfdp->getSimFD();
- SETranslatingPortProxy &prox = tc->getMemProxy();
+ PortProxy &prox = tc->getMemProxy();
uint64_t tiov_base = p->getSyscallArg(tc, index);
size_t count = p->getSyscallArg(tc, index);
struct iovec hiov[count];
p->allocateMem(start, length, clobber);
// Transfer content into target address space.
- SETranslatingPortProxy &tp = tc->getMemProxy();
+ PortProxy &tp = tc->getMemProxy();
if (tgt_flags & OS::TGT_MAP_ANONYMOUS) {
// In general, we should zero the mapped area for anonymous mappings,
// with something like:
int index = 0;
std::string path;
- SETranslatingPortProxy & mem_proxy = tc->getMemProxy();
+ PortProxy & mem_proxy = tc->getMemProxy();
if (!mem_proxy.tryReadString(path, p->getSyscallArg(tc, index)))
return -EFAULT;
if (access(path.c_str(), F_OK) == -1)
return -EACCES;
- auto read_in = [](std::vector<std::string> & vect,
- SETranslatingPortProxy & mem_proxy,
- Addr mem_loc)
+ auto read_in = [](std::vector<std::string> &vect,
+ PortProxy &mem_proxy, Addr mem_loc)
{
for (int inc = 0; ; inc++) {
BufferArg b((mem_loc + sizeof(Addr) * inc), sizeof(Addr));
if (taddr != 0) {
typename OS::time_t t = sec;
t = TheISA::htog(t);
- SETranslatingPortProxy &p = tc->getMemProxy();
+ PortProxy &p = tc->getMemProxy();
p.writeBlob(taddr, &t, (int)sizeof(typename OS::time_t));
}
return sec;
/**
* copy data into simulator space (read from target memory)
*/
- bool copyIn(SETranslatingPortProxy &memproxy)
+ bool
+ copyIn(PortProxy &memproxy)
{
memproxy.readBlob(addr, bufPtr, size);
return true; // no EFAULT detection for now
/**
* copy data out of simulator space (write to target memory)
*/
- bool copyOut(SETranslatingPortProxy &memproxy)
+ bool
+ copyOut(PortProxy &memproxy)
{
memproxy.writeBlob(addr, bufPtr, size);
return true; // no EFAULT detection for now
if (!ptr)
return;
- FSTranslatingPortProxy &proxy = tc->getVirtProxy();
+ PortProxy &proxy = tc->getVirtProxy();
proxy.readBlob(ptr, buffer, sizeof(T));
}