gem5 v24.0.0.0
|
VirtIO ring buffer wrapper. More...
Classes | |
struct | Header |
Public Types | |
typedef uint16_t | Flags |
typedef uint16_t | Index |
Public Member Functions | |
VirtRing (PortProxy &proxy, ByteOrder bo, uint16_t size) | |
void | reset () |
Reset any state in the ring buffer. | |
void | setAddress (Addr addr) |
Set the base address of the VirtIO ring buffer. | |
void | readHeader () |
Update the ring buffer header with data from the guest. | |
void | writeHeader () |
void | read () |
void | write () |
Public Attributes | |
Header | header |
Ring buffer header in host byte order. | |
std::vector< T > | ring |
Elements in ring in host byte order. | |
Private Member Functions | |
VirtRing () | |
Private Attributes | |
PortProxy & | _proxy |
Guest physical memory proxy. | |
Addr | _base |
Guest physical base address of the ring buffer. | |
ByteOrder | byteOrder |
Byte order in the ring. | |
VirtIO ring buffer wrapper.
This class wraps a VirtIO ring buffer. The template parameter T is used to select the data type for the items in the ring (used or available descriptors).
typedef uint16_t gem5::VirtQueue::VirtRing< T >::Flags |
typedef uint16_t gem5::VirtQueue::VirtRing< T >::Index |
|
inline |
|
private |
|
inline |
Definition at line 520 of file base.hh.
References gem5::VirtQueue::VirtRing< T >::_base, gem5::VirtQueue::VirtRing< T >::_proxy, gem5::VirtQueue::VirtRing< T >::byteOrder, gem5::gtoh(), gem5::VirtQueue::VirtRing< T >::header, gem5::ArmISA::i, gem5::PortProxy::readBlob(), gem5::VirtQueue::VirtRing< T >::readHeader(), and gem5::VirtQueue::VirtRing< T >::ring.
Referenced by gem5::VirtQueue::consumeDescriptor().
|
inline |
Update the ring buffer header with data from the guest.
Definition at line 501 of file base.hh.
References gem5::VirtQueue::VirtRing< T >::_base, gem5::VirtQueue::VirtRing< T >::_proxy, gem5::VirtQueue::VirtRing< T >::byteOrder, gem5::VirtQueue::VirtRing< T >::Header::flags, gem5::gtoh(), gem5::VirtQueue::VirtRing< T >::header, gem5::VirtQueue::VirtRing< T >::Header::index, and gem5::PortProxy::readBlob().
Referenced by gem5::VirtQueue::produceDescriptor(), and gem5::VirtQueue::VirtRing< T >::read().
|
inline |
Reset any state in the ring buffer.
Definition at line 486 of file base.hh.
References gem5::VirtQueue::VirtRing< T >::_base, and gem5::VirtQueue::VirtRing< T >::header.
Referenced by gem5::VirtQueue::reset().
|
inline |
Set the base address of the VirtIO ring buffer.
addr | New host physical address |
Definition at line 497 of file base.hh.
References gem5::VirtQueue::VirtRing< T >::_base, and gem5::X86ISA::addr.
Referenced by gem5::VirtQueue::setAddress().
|
inline |
Definition at line 533 of file base.hh.
References gem5::VirtQueue::VirtRing< T >::_base, gem5::VirtQueue::VirtRing< T >::_proxy, gem5::VirtQueue::VirtRing< T >::byteOrder, gem5::VirtQueue::VirtRing< T >::header, gem5::htog(), gem5::ArmISA::i, gem5::VirtQueue::VirtRing< T >::ring, gem5::PortProxy::writeBlob(), and gem5::VirtQueue::VirtRing< T >::writeHeader().
Referenced by gem5::VirtQueue::produceDescriptor().
|
inline |
Definition at line 510 of file base.hh.
References gem5::VirtQueue::VirtRing< T >::_base, gem5::VirtQueue::VirtRing< T >::_proxy, gem5::VirtQueue::VirtRing< T >::byteOrder, gem5::VirtQueue::VirtRing< T >::Header::flags, gem5::VirtQueue::VirtRing< T >::header, gem5::htog(), gem5::VirtQueue::VirtRing< T >::Header::index, and gem5::PortProxy::writeBlob().
Referenced by gem5::VirtQueue::VirtRing< T >::write().
|
private |
Guest physical base address of the ring buffer.
Definition at line 558 of file base.hh.
Referenced by gem5::VirtQueue::VirtRing< T >::read(), gem5::VirtQueue::VirtRing< T >::readHeader(), gem5::VirtQueue::VirtRing< T >::reset(), gem5::VirtQueue::VirtRing< T >::setAddress(), gem5::VirtQueue::VirtRing< T >::write(), and gem5::VirtQueue::VirtRing< T >::writeHeader().
|
private |
Guest physical memory proxy.
Definition at line 556 of file base.hh.
Referenced by gem5::VirtQueue::VirtRing< T >::read(), gem5::VirtQueue::VirtRing< T >::readHeader(), gem5::VirtQueue::VirtRing< T >::write(), and gem5::VirtQueue::VirtRing< T >::writeHeader().
|
private |
Byte order in the ring.
Definition at line 560 of file base.hh.
Referenced by gem5::VirtQueue::VirtRing< T >::read(), gem5::VirtQueue::VirtRing< T >::readHeader(), gem5::VirtQueue::VirtRing< T >::write(), and gem5::VirtQueue::VirtRing< T >::writeHeader().
Header gem5::VirtQueue::VirtRing< T >::header |
Ring buffer header in host byte order.
Definition at line 547 of file base.hh.
Referenced by gem5::VirtQueue::consumeDescriptor(), gem5::VirtQueue::produceDescriptor(), gem5::VirtQueue::VirtRing< T >::read(), gem5::VirtQueue::VirtRing< T >::readHeader(), gem5::VirtQueue::VirtRing< T >::reset(), gem5::VirtQueue::VirtRing< T >::write(), and gem5::VirtQueue::VirtRing< T >::writeHeader().
std::vector<T> gem5::VirtQueue::VirtRing< T >::ring |
Elements in ring in host byte order.
Definition at line 549 of file base.hh.
Referenced by gem5::VirtQueue::consumeDescriptor(), gem5::VirtQueue::produceDescriptor(), gem5::VirtQueue::VirtRing< T >::read(), and gem5::VirtQueue::VirtRing< T >::write().