gem5  v20.1.0.0
Public Member Functions | Protected Attributes | List of all members
BaseBufferArg Class Reference

Base class for BufferArg and TypedBufferArg, Not intended to be used directly. More...

#include <syscall_emul_buf.hh>

Inheritance diagram for BaseBufferArg:
BufferArg TypedBufferArg< T >

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ BaseBufferArg()

BaseBufferArg::BaseBufferArg ( Addr  _addr,
int  _size 
)
inline

Allocate a buffer of size 'size' representing the memory at target address 'addr'.

Definition at line 62 of file syscall_emul_buf.hh.

References bufPtr, and size.

◆ ~BaseBufferArg()

BaseBufferArg::~BaseBufferArg ( )
inline

Definition at line 71 of file syscall_emul_buf.hh.

References bufPtr.

Member Function Documentation

◆ copyIn()

bool BaseBufferArg::copyIn ( PortProxy memproxy)
inline

◆ copyOut()

bool BaseBufferArg::copyOut ( PortProxy memproxy)
inline

Member Data Documentation

◆ addr

const Addr BaseBufferArg::addr
protected

address of buffer in target address space

Definition at line 94 of file syscall_emul_buf.hh.

Referenced by copyIn(), and copyOut().

◆ bufPtr

uint8_t* const BaseBufferArg::bufPtr
protected

◆ size

const int BaseBufferArg::size
protected

buffer size

Definition at line 95 of file syscall_emul_buf.hh.

Referenced by BaseBufferArg(), copyIn(), and copyOut().


The documentation for this class was generated from the following file:

Generated on Wed Sep 30 2020 14:02:21 for gem5 by doxygen 1.8.17