gem5 [DEVELOP-FOR-25.0]
Loading...
Searching...
No Matches
gem5::BaseBufferArg Class Reference

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

#include <syscall_emul_buf.hh>

Inheritance diagram for gem5::BaseBufferArg:
gem5::BufferArg gem5::TypedBufferArg< T >

Public Member Functions

 BaseBufferArg (Addr _addr, uint64_t _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 uint64_t size
 buffer size
 
uint8_t *const bufPtr
 pointer to buffer in simulator space
 

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 57 of file syscall_emul_buf.hh.

Constructor & Destructor Documentation

◆ BaseBufferArg()

gem5::BaseBufferArg::BaseBufferArg ( Addr _addr,
uint64_t _size )
inline

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

Definition at line 66 of file syscall_emul_buf.hh.

References addr, bufPtr, and size.

Referenced by gem5::BufferArg::BufferArg(), and gem5::TypedBufferArg< T >::TypedBufferArg().

◆ ~BaseBufferArg()

gem5::BaseBufferArg::~BaseBufferArg ( )
inline

Definition at line 75 of file syscall_emul_buf.hh.

References bufPtr.

Member Function Documentation

◆ copyIn()

◆ copyOut()

Member Data Documentation

◆ addr

const Addr gem5::BaseBufferArg::addr
protected

address of buffer in target address space

Definition at line 98 of file syscall_emul_buf.hh.

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

◆ bufPtr

◆ size

const uint64_t gem5::BaseBufferArg::size
protected

buffer size

Definition at line 99 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 Mon May 26 2025 09:19:18 for gem5 by doxygen 1.13.2