gem5 v24.0.0.0
|
Base class for BufferArg and TypedBufferArg, Not intended to be used directly. More...
#include <syscall_emul_buf.hh>
Public Member Functions | |
BaseBufferArg (Addr _addr, int _size) | |
Allocate a buffer of size 'size' representing the memory at target address 'addr'. | |
~BaseBufferArg () | |
bool | copyIn (const PortProxy &memproxy) |
copy data into simulator space (read from target memory) | |
bool | copyOut (const PortProxy &memproxy) |
copy data out of simulator space (write to target memory) | |
Protected Attributes | |
const Addr | addr |
address of buffer in target address space | |
const int | size |
buffer size | |
uint8_t *const | bufPtr |
pointer to buffer in simulator space | |
Base class for BufferArg and TypedBufferArg, Not intended to be used directly.
The BufferArg classes represent buffers in target user space that are passed by reference to an (emulated) system call. Each instance provides an internal (simulator-space) buffer of the appropriate size and tracks the user-space address. The copyIn() and copyOut() methods copy the user-space buffer to and from the simulator-space buffer, respectively.
Definition at line 57 of file syscall_emul_buf.hh.
|
inline |
Allocate a buffer of size 'size' representing the memory at target address 'addr'.
Definition at line 66 of file syscall_emul_buf.hh.
|
inline |
Definition at line 75 of file syscall_emul_buf.hh.
References bufPtr.
|
inline |
copy data into simulator space (read from target memory)
Definition at line 81 of file syscall_emul_buf.hh.
References addr, bufPtr, gem5::PortProxy::readBlob(), and size.
Referenced by gem5::acceptFunc(), gem5::GPUComputeDriver::allocateQueue(), gem5::bindFunc(), gem5::futexFunc(), gem5::getpeernameFunc(), gem5::getsocknameFunc(), gem5::GPUComputeDriver::ioctl(), gem5::ioctlFunc(), gem5::pollFunc(), gem5::pwrite64Func(), gem5::recvfromFunc(), gem5::recvmsgFunc(), gem5::schedGetaffinityFunc(), gem5::sendmsgFunc(), gem5::sendtoFunc(), gem5::setsockoptFunc(), gem5::X86ISA::setThreadArea32Func(), gem5::ArmISA::sysctlFunc(), and gem5::writeFunc().
|
inline |
copy data out of simulator space (write to target memory)
Definition at line 91 of file syscall_emul_buf.hh.
References addr, bufPtr, size, and gem5::PortProxy::writeBlob().
Referenced by gem5::_llseekFunc(), gem5::acceptFunc(), gem5::GPUComputeDriver::allocateQueue(), gem5::doClone(), gem5::exitFutexWake(), gem5::futexFunc(), gem5::getcwdFunc(), gem5::getpeernameFunc(), gem5::getrandomFunc(), gem5::SparcISA::getresuidFunc(), gem5::getsocknameFunc(), gem5::getsockoptFunc(), gem5::GPUComputeDriver::ioctl(), gem5::ioctlFunc(), gem5::pipe2Func(), gem5::pollFunc(), gem5::pread64Func(), gem5::readFunc(), gem5::readlinkatFunc(), gem5::recvfromFunc(), gem5::recvmsgFunc(), gem5::schedGetaffinityFunc(), gem5::X86ISA::setThreadArea32Func(), gem5::socketpairFunc(), gem5::ArmISA::sysctlFunc(), and gem5::wait4Func().
|
protected |
address of buffer in target address space
Definition at line 98 of file syscall_emul_buf.hh.
|
protected |
pointer to buffer in simulator space
Definition at line 100 of file syscall_emul_buf.hh.
Referenced by BaseBufferArg(), gem5::BufferArg::bufferPtr(), copyIn(), copyOut(), gem5::TypedBufferArg< T >::operator T*(), gem5::TypedBufferArg< T >::operator*(), gem5::TypedBufferArg< T >::operator->(), gem5::TypedBufferArg< T >::operator[](), and ~BaseBufferArg().
|
protected |
buffer size
Definition at line 99 of file syscall_emul_buf.hh.
Referenced by BaseBufferArg(), copyIn(), copyOut(), and gem5::GPUComputeDriver::ioctl().