gem5
v19.0.0.0
|
#include <se_translating_port_proxy.hh>
Public Types | |
enum | AllocType { Always, Never, NextPage } |
![]() | |
typedef std::function< void(PacketPtr pkt)> | SendFunctionalFunc |
Public Member Functions | |
SETranslatingPortProxy (SendFunctionalFunc func, Process *p, AllocType alloc) | |
SETranslatingPortProxy (MasterPort &port, Process *p, AllocType alloc) | |
~SETranslatingPortProxy () | |
void | setPageTable (EmulationPageTable *p) |
void | setProcess (Process *p) |
bool | tryReadBlob (Addr addr, void *p, int size) const override |
Methods to override in base classes. More... | |
bool | tryWriteBlob (Addr addr, const void *p, int size) const override |
Write size bytes from p to address. More... | |
bool | tryMemsetBlob (Addr addr, uint8_t val, int size) const override |
Fill size bytes starting at addr with byte value val. More... | |
![]() | |
PortProxy (SendFunctionalFunc func, unsigned int cacheLineSize) | |
PortProxy (const MasterPort &port, unsigned int cacheLineSize) | |
virtual | ~PortProxy () |
void | readBlobPhys (Addr addr, Request::Flags flags, void *p, int size) const |
Fixed functionality for use in base classes. More... | |
void | writeBlobPhys (Addr addr, Request::Flags flags, const void *p, int size) const |
Write size bytes from p to physical address. More... | |
void | memsetBlobPhys (Addr addr, Request::Flags flags, uint8_t v, int size) const |
Fill size bytes starting at physical addr with byte value val. More... | |
void | readBlob (Addr addr, void *p, int size) const |
Higher level interfaces based on the above. More... | |
void | writeBlob (Addr addr, const void *p, int size) const |
Same as tryWriteBlob, but insists on success. More... | |
void | memsetBlob (Addr addr, uint8_t v, int size) const |
Same as tryMemsetBlob, but insists on success. 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, const T &data) const |
Write object T to address. More... | |
template<typename T > | |
T | read (Addr address, ByteOrder guest_byte_order) const |
Read sizeof(T) bytes from address and return as object T. More... | |
template<typename T > | |
void | write (Addr address, T data, ByteOrder guest_byte_order) const |
Write object T to address. More... | |
bool | tryWriteString (Addr addr, const char *str) const |
Write the string str into guest memory at address addr. More... | |
void | writeString (Addr addr, const char *str) const |
Same as tryWriteString, but insists on success. More... | |
bool | tryReadString (std::string &str, Addr addr) const |
Reads the string at guest address addr into the std::string str. More... | |
void | readString (std::string &str, Addr addr) const |
Same as tryReadString, but insists on success. More... | |
bool | tryReadString (char *str, Addr addr, size_t maxlen) const |
Reads the string at guest address addr into the char * str, reading up to maxlen characters. More... | |
void | readString (char *str, Addr addr, size_t maxlen) const |
Same as tryReadString, but insists on success. More... | |
Private Attributes | |
EmulationPageTable * | 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 | ( | SendFunctionalFunc | func, |
Process * | p, | ||
AllocType | alloc | ||
) |
Definition at line 58 of file se_translating_port_proxy.cc.
SETranslatingPortProxy::SETranslatingPortProxy | ( | MasterPort & | port, |
Process * | p, | ||
AllocType | alloc | ||
) |
Definition at line 63 of file se_translating_port_proxy.cc.
|
inline |
Definition at line 86 of file se_translating_port_proxy.hh.
|
inline |
Definition at line 88 of file se_translating_port_proxy.hh.
References MipsISA::p.
Referenced by Process::clone().
|
inline |
Definition at line 89 of file se_translating_port_proxy.hh.
References addr, MipsISA::p, tryMemsetBlob(), tryReadBlob(), tryWriteBlob(), and X86ISA::val.
|
overridevirtual |
Fill size bytes starting at addr with byte value val.
Returns true on success and false on failure.
Reimplemented from PortProxy.
Definition at line 122 of file se_translating_port_proxy.cc.
References Process::allocateMem(), allocating, Always, ChunkGenerator::done(), PortProxy::memsetBlobPhys(), AlphaISA::PageBytes, process, pTable, roundDown(), and EmulationPageTable::translate().
Referenced by setProcess().
|
overridevirtual |
Methods to override in base classes.
Read size bytes memory at address and store in p. Returns true on success and false on failure.
Reimplemented from PortProxy.
Definition at line 70 of file se_translating_port_proxy.cc.
References ChunkGenerator::done(), MipsISA::p, AlphaISA::PageBytes, pTable, PortProxy::readBlobPhys(), and EmulationPageTable::translate().
Referenced by setProcess().
|
overridevirtual |
Write size bytes from p to address.
Returns true on success and false on failure.
Reimplemented from PortProxy.
Definition at line 90 of file se_translating_port_proxy.cc.
References Process::allocateMem(), allocating, Always, ChunkGenerator::done(), Process::fixupStackFault(), NextPage, MipsISA::p, AlphaISA::PageBytes, panic, process, pTable, roundDown(), EmulationPageTable::translate(), and PortProxy::writeBlobPhys().
Referenced by setProcess().
|
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 tryMemsetBlob(), and tryWriteBlob().
|
private |
Definition at line 78 of file se_translating_port_proxy.hh.
Referenced by tryMemsetBlob(), tryReadBlob(), and tryWriteBlob().