gem5 v24.0.0.0
|
TypedBufferArg is a class template; instances of this template represent typed buffers in target user space that are passed by reference to an (emulated) system call. More...
#include <syscall_emul_buf.hh>
Public Member Functions | |
TypedBufferArg (Addr _addr, int _size=sizeof(T)) | |
Allocate a buffer of type T representing the memory at target address 'addr'. | |
operator T* () | |
Convert TypedBufferArg<T> to a pointer to T that points to the internal buffer. | |
T & | operator* () |
Convert TypedBufferArg<T> to a reference to T that references the internal buffer value. | |
T * | operator-> () |
Enable the use of '->' to reference fields where T is a struct type. | |
T & | operator[] (int i) |
Enable the use of '[]' to reference fields where T is an array type. | |
Public Member Functions inherited from gem5::BaseBufferArg | |
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) | |
Additional Inherited Members | |
Protected Attributes inherited from gem5::BaseBufferArg | |
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 | |
TypedBufferArg is a class template; instances of this template represent typed buffers in target user space that are passed by reference to an (emulated) system call.
This template provides operator overloads for convenience, allowing for example the use of '->' to reference fields within a struct type.
Definition at line 132 of file syscall_emul_buf.hh.
|
inline |
Allocate a buffer of type T representing the memory at target address 'addr'.
The user can optionally specify a specific number of bytes to allocate to deal with structs that have variable-size arrays at the end.
Definition at line 141 of file syscall_emul_buf.hh.
|
inline |
Convert TypedBufferArg<T> to a pointer to T that points to the internal buffer.
Definition at line 149 of file syscall_emul_buf.hh.
References gem5::BaseBufferArg::bufPtr.
|
inline |
Convert TypedBufferArg<T> to a reference to T that references the internal buffer value.
Definition at line 155 of file syscall_emul_buf.hh.
References gem5::BaseBufferArg::bufPtr.
|
inline |
Enable the use of '->' to reference fields where T is a struct type.
Definition at line 162 of file syscall_emul_buf.hh.
References gem5::BaseBufferArg::bufPtr.
|
inline |
Enable the use of '[]' to reference fields where T is an array type.
Definition at line 168 of file syscall_emul_buf.hh.
References gem5::BaseBufferArg::bufPtr, and gem5::ArmISA::i.