gem5
v20.1.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'. More... | |
~BaseBufferArg () | |
bool | copyIn (PortProxy &memproxy) |
copy data into simulator space (read from target memory) More... | |
bool | copyOut (PortProxy &memproxy) |
copy data out of simulator space (write to target memory) More... | |
Protected Attributes | |
const Addr | addr |
address of buffer in target address space More... | |
const int | size |
buffer size More... | |
uint8_t *const | bufPtr |
pointer to buffer in simulator space More... | |
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 54 of file syscall_emul_buf.hh.
|
inline |
Allocate a buffer of size 'size' representing the memory at target address 'addr'.
Definition at line 62 of file syscall_emul_buf.hh.
|
inline |
Definition at line 71 of file syscall_emul_buf.hh.
References bufPtr.
|
inline |
copy data into simulator space (read from target memory)
Definition at line 77 of file syscall_emul_buf.hh.
References addr, bufPtr, PortProxy::readBlob(), and size.
Referenced by acceptFunc(), bindFunc(), futexFunc(), getpeernameFunc(), getsocknameFunc(), GPUComputeDriver::ioctl(), ioctlFunc(), GPUDispatcher::notifyWgCompl(), pollFunc(), pwrite64Func(), recvfromFunc(), recvmsgFunc(), sendmsgFunc(), sendtoFunc(), setsockoptFunc(), setThreadArea32Func(), sysctlFunc(), and writeFunc().
|
inline |
copy data out of simulator space (write to target memory)
Definition at line 87 of file syscall_emul_buf.hh.
References addr, bufPtr, size, and PortProxy::writeBlob().
Referenced by _llseekFunc(), acceptFunc(), cloneFunc(), exitFutexWake(), futexFunc(), getcwdFunc(), getpeernameFunc(), SparcISA::getresuidFunc(), getsocknameFunc(), getsockoptFunc(), GPUComputeDriver::ioctl(), ioctlFunc(), pipe2Func(), pollFunc(), pread64Func(), readFunc(), readlinkFunc(), recvfromFunc(), recvmsgFunc(), setThreadArea32Func(), socketpairFunc(), sysctlFunc(), and wait4Func().
|
protected |
address of buffer in target address space
Definition at line 94 of file syscall_emul_buf.hh.
|
protected |
pointer to buffer in simulator space
Definition at line 96 of file syscall_emul_buf.hh.
Referenced by BaseBufferArg(), BufferArg::bufferPtr(), copyIn(), copyOut(), TypedBufferArg< T >::operator T*(), TypedBufferArg< T >::operator*(), TypedBufferArg< T >::operator->(), TypedBufferArg< T >::operator[](), and ~BaseBufferArg().
|
protected |
buffer size
Definition at line 95 of file syscall_emul_buf.hh.
Referenced by BaseBufferArg(), copyIn(), and copyOut().