gem5
|
#include <se_translating_port_proxy.hh>
Public Types | |
enum | AllocType { Always, Never, NextPage } |
Public Member Functions | |
SETranslatingPortProxy (MasterPort &port, Process *p, AllocType alloc) | |
virtual | ~SETranslatingPortProxy () |
void | setPageTable (PageTableBase *p) |
void | setProcess (Process *p) |
bool | tryReadBlob (Addr addr, uint8_t *p, int size) const |
bool | tryWriteBlob (Addr addr, const uint8_t *p, int size) const |
bool | tryMemsetBlob (Addr addr, uint8_t val, int size) const |
bool | tryWriteString (Addr addr, const char *str) const |
bool | tryReadString (std::string &str, Addr addr) const |
virtual void | readBlob (Addr addr, uint8_t *p, int size) const |
Read size bytes memory at address and store in p. More... | |
virtual void | writeBlob (Addr addr, const uint8_t *p, int size) const |
Write size bytes from p to address. More... | |
virtual void | memsetBlob (Addr addr, uint8_t val, int size) const |
Fill size bytes starting at addr with byte value val. More... | |
void | writeString (Addr addr, const char *str) const |
void | readString (std::string &str, Addr addr) const |
Public Member Functions inherited from PortProxy | |
PortProxy (MasterPort &port, unsigned int cacheLineSize) | |
virtual | ~PortProxy () |
template<typename T > | |
T | read (Addr address) const |
Read sizeof(T) bytes from address and return as object T. More... | |
template<typename T > | |
void | write (Addr address, T data) const |
Write object T to address. More... | |
Private Attributes | |
PageTableBase * | pTable |
Process * | process |
AllocType | allocating |
Definition at line 67 of file se_translating_port_proxy.hh.
Enumerator | |
---|---|
Always | |
Never | |
NextPage |
Definition at line 71 of file se_translating_port_proxy.hh.
SETranslatingPortProxy::SETranslatingPortProxy | ( | MasterPort & | port, |
Process * | p, | ||
AllocType | alloc | ||
) |
Definition at line 58 of file se_translating_port_proxy.cc.
|
virtual |
Definition at line 64 of file se_translating_port_proxy.cc.
|
virtual |
Fill size bytes starting at addr with byte value val.
Reimplemented from PortProxy.
Definition at line 155 of file se_translating_port_proxy.cc.
References fatal, and tryMemsetBlob().
Referenced by brkFunc().
|
virtual |
Read size bytes memory at address and store in p.
Reimplemented from PortProxy.
Definition at line 86 of file se_translating_port_proxy.cc.
References fatal, and tryReadBlob().
Referenced by RiscvProcess::argsInit(), BaseBufferArg::copyIn(), X86ISA::m5PageFault(), BaseRemoteGDB::read(), Process::replicatePage(), and writevFunc().
void SETranslatingPortProxy::readString | ( | std::string & | str, |
Addr | addr | ||
) | const |
Definition at line 213 of file se_translating_port_proxy.cc.
References fatal, and tryReadString().
Referenced by RiscvProcess::argsInit().
|
inline |
Definition at line 86 of file se_translating_port_proxy.hh.
References MipsISA::p, and pTable.
Referenced by Process::clone().
|
inline |
Definition at line 87 of file se_translating_port_proxy.hh.
References MipsISA::p, and process.
bool SETranslatingPortProxy::tryMemsetBlob | ( | Addr | addr, |
uint8_t | val, | ||
int | size | ||
) | const |
Definition at line 133 of file se_translating_port_proxy.cc.
References Process::allocateMem(), allocating, Always, ChunkGenerator::done(), PortProxy::memsetBlob(), AlphaISA::PageBytes, process, pTable, roundDown(), and PageTableBase::translate().
Referenced by memsetBlob().
bool SETranslatingPortProxy::tryReadBlob | ( | Addr | addr, |
uint8_t * | p, | ||
int | size | ||
) | const |
Definition at line 68 of file se_translating_port_proxy.cc.
References ChunkGenerator::done(), AlphaISA::PageBytes, pTable, PortProxy::readBlob(), and PageTableBase::translate().
Referenced by readBlob().
bool SETranslatingPortProxy::tryReadString | ( | std::string & | str, |
Addr | addr | ||
) | const |
Definition at line 190 of file se_translating_port_proxy.cc.
References addr, ArmISA::c, pTable, PortProxy::readBlob(), PageTableBase::translate(), and MipsISA::vaddr.
Referenced by accessFunc(), chmodFunc(), chownFunc(), execveFunc(), fstatat64Func(), lstat64Func(), lstatFunc(), mkdirFunc(), openImpl(), readlinkFunc(), readString(), renameatFunc(), renameFunc(), stat64Func(), statfsFunc(), statFunc(), truncate64Func(), truncateFunc(), unlinkHelper(), and utimesFunc().
bool SETranslatingPortProxy::tryWriteBlob | ( | Addr | addr, |
const uint8_t * | p, | ||
int | size | ||
) | const |
Definition at line 94 of file se_translating_port_proxy.cc.
References Process::allocateMem(), allocating, Always, ChunkGenerator::done(), Process::fixupStackFault(), NextPage, AlphaISA::PageBytes, panic, process, pTable, roundDown(), PageTableBase::translate(), and PortProxy::writeBlob().
Referenced by Sparc32Process::flushWindows(), Sparc64Process::flushWindows(), and writeBlob().
bool SETranslatingPortProxy::tryWriteString | ( | Addr | addr, |
const char * | str | ||
) | const |
Definition at line 163 of file se_translating_port_proxy.cc.
References addr, ArmISA::c, pTable, PageTableBase::translate(), MipsISA::vaddr, and PortProxy::writeBlob().
Referenced by writeString().
|
virtual |
Write size bytes from p to address.
Reimplemented from PortProxy.
Definition at line 126 of file se_translating_port_proxy.cc.
References fatal, and tryWriteBlob().
Referenced by AlphaProcess::argsInit(), MipsProcess::argsInit(), PowerProcess::argsInit(), RiscvProcess::argsInit(), SparcProcess::argsInit(), ArmProcess::argsInit(), X86ISA::X86Process::argsInit(), Sparc32Process::argsInit(), Sparc64Process::argsInit(), BaseBufferArg::copyOut(), copyStringArray(), ArmLinuxProcess32::initState(), X86ISA::X86_64Process::initState(), X86ISA::I386Process::initState(), mmapImpl(), Process::replicatePage(), setTLSFunc32(), timeFunc(), and BaseRemoteGDB::write().
void SETranslatingPortProxy::writeString | ( | Addr | addr, |
const char * | str | ||
) | const |
Definition at line 183 of file se_translating_port_proxy.cc.
References fatal, and tryWriteString().
Referenced by PowerProcess::argsInit(), RiscvProcess::argsInit(), SparcProcess::argsInit(), ArmProcess::argsInit(), X86ISA::X86Process::argsInit(), and copyStringArray().
|
private |
Definition at line 80 of file se_translating_port_proxy.hh.
Referenced by tryMemsetBlob(), and tryWriteBlob().
|
private |
Definition at line 79 of file se_translating_port_proxy.hh.
Referenced by setProcess(), tryMemsetBlob(), and tryWriteBlob().
|
private |
Definition at line 78 of file se_translating_port_proxy.hh.
Referenced by setPageTable(), tryMemsetBlob(), tryReadBlob(), tryReadString(), tryWriteBlob(), and tryWriteString().