gem5
|
This object is a proxy for a structural port, to be used for debug accesses. More...
#include <port_proxy.hh>
Public Member Functions | |
PortProxy (MasterPort &port, unsigned int cacheLineSize) | |
virtual | ~PortProxy () |
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 v, int size) const |
Fill size bytes starting at addr with byte value val. More... | |
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 | |
MasterPort & | _port |
The actual physical port used by this proxy. More... | |
const unsigned int | _cacheLineSize |
Granularity of any transactions issued through this proxy. More... | |
This object is a proxy for a structural port, to be used for debug accesses.
This proxy object is used when non structural entities (e.g. thread contexts, object file loaders) need access to the memory system. It calls the corresponding functions on the underlying structural port, and provides templatized convenience access functions.
The addresses are interpreted as physical addresses.
Definition at line 84 of file port_proxy.hh.
|
inline |
Definition at line 95 of file port_proxy.hh.
|
inlinevirtual |
Definition at line 97 of file port_proxy.hh.
|
virtual |
Fill size bytes starting at addr with byte value val.
Reimplemented in FSTranslatingPortProxy, and SETranslatingPortProxy.
Definition at line 71 of file port_proxy.cc.
References X86ISA::size(), and writeBlob().
Referenced by MultiLevelPageTable< ISAOps >::initState(), ObjectFile::loadSection(), FSTranslatingPortProxy::memsetBlob(), SETranslatingPortProxy::tryMemsetBlob(), and MultiLevelPageTable< ISAOps >::walk().
T PortProxy::read | ( | Addr | address | ) | const |
Read sizeof(T) bytes from address and return as object T.
Definition at line 146 of file port_proxy.hh.
References data, and readBlob().
Referenced by AlphaSystem::fixFuncEventAddr(), AlphaISA::getArgument(), SparcISA::getArgument(), ArmISA::getArgument(), MultiLevelPageTable< ISAOps >::isUnmapped(), AlphaISA::kernel_pte_lookup(), MultiLevelPageTable< ISAOps >::lookup(), MultiLevelPageTable< ISAOps >::map(), MultiLevelPageTable< ISAOps >::remap(), MultiLevelPageTable< ISAOps >::unmap(), SparcISA::vtophys(), and MultiLevelPageTable< ISAOps >::walk().
|
virtual |
Read size bytes memory at address and store in p.
Reimplemented in SETranslatingPortProxy, and FSTranslatingPortProxy.
Definition at line 45 of file port_proxy.cc.
References _cacheLineSize, _port, ChunkGenerator::done(), Request::funcMasterId, MemCmd::ReadReq, and MasterPort::sendFunctional().
Referenced by Linux::ThreadInfo::curThreadInfo(), TsunamiPChip::dmaAddr(), read(), VirtDescriptor::read(), VirtQueue::VirtRing< struct vring_used_elem >::read(), FSTranslatingPortProxy::readBlob(), VirtQueue::VirtRing< struct vring_used_elem >::readHeader(), DmaReadFifo::resumeFillFunctional(), SETranslatingPortProxy::tryReadBlob(), SETranslatingPortProxy::tryReadString(), and VirtDescriptor::update().
void PortProxy::write | ( | Addr | address, |
T | data | ||
) | const |
Write object T to address.
Writes sizeof(T) bytes.
Definition at line 155 of file port_proxy.hh.
References writeBlob().
Referenced by archPrctlFunc(), FreebsdAlphaSystem::doCalibrateClocks(), AlphaSystem::initState(), LinuxAlphaSystem::initState(), X86ISA::I386Process::initState(), MultiLevelPageTable< ISAOps >::map(), MultiLevelPageTable< ISAOps >::remap(), AlphaSystem::setAlphaAccess(), MultiLevelPageTable< ISAOps >::unmap(), and MultiLevelPageTable< ISAOps >::walk().
|
virtual |
Write size bytes from p to address.
Reimplemented in SETranslatingPortProxy, and FSTranslatingPortProxy.
Definition at line 58 of file port_proxy.cc.
References _cacheLineSize, _port, ChunkGenerator::done(), Request::funcMasterId, MasterPort::sendFunctional(), and MemCmd::WriteReq.
Referenced by LinuxX86System::initState(), LinuxArmSystem::initState(), X86System::initState(), X86ISA::X86_64Process::initState(), ArmSystem::initState(), ObjectFile::loadSection(), HexFile::loadSections(), memsetBlob(), SimpleDisk::read(), SETranslatingPortProxy::tryWriteBlob(), SETranslatingPortProxy::tryWriteString(), write(), VirtDescriptor::write(), VirtQueue::VirtRing< struct vring_used_elem >::write(), FSTranslatingPortProxy::writeBlob(), VirtQueue::VirtRing< struct vring_used_elem >::writeHeader(), X86ISA::SMBios::SMBiosStructure::writeOut(), X86ISA::IntelMP::FloatingPointer::writeOut(), X86ISA::IntelMP::BaseConfigEntry::writeOut(), X86ISA::IntelMP::ExtConfigEntry::writeOut(), X86ISA::SMBios::BiosInformation::writeOut(), X86ISA::IntelMP::ConfigTable::writeOut(), X86ISA::IntelMP::Processor::writeOut(), X86ISA::SMBios::SMBiosTable::writeOut(), X86ISA::IntelMP::BusHierarchy::writeOut(), writeOutField(), writeOutString(), X86ISA::SMBios::SMBiosStructure::writeOutStrings(), X86ISA::E820Table::writeTo(), and writeVal().
|
private |
Granularity of any transactions issued through this proxy.
Definition at line 92 of file port_proxy.hh.
Referenced by readBlob(), and writeBlob().
|
private |
The actual physical port used by this proxy.
Definition at line 89 of file port_proxy.hh.
Referenced by readBlob(), and writeBlob().