gem5 v24.0.0.0
|
Virtqueue for data going from the host to the guest. More...
#include <console.hh>
Public Member Functions | |
TermRecvQueue (PortProxy &proxy, ByteOrder bo, uint16_t size, VirtIOConsole &_parent) | |
virtual | ~TermRecvQueue () |
void | onNotify () |
Notify queue of pending events. | |
void | trySend () |
Try to send data pending data from the terminal. | |
std::string | name () const |
Public Member Functions inherited from gem5::VirtQueue | |
virtual | ~VirtQueue () |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. | |
void | reset () |
Reset cached state in this queue and in the associated ring buffers. | |
void | setAddress (Addr address) |
Set the base address of this queue. | |
Addr | getAddress () const |
Get the guest physical address of this queue. | |
uint16_t | getSize () const |
Get the number of descriptors available in this queue. | |
VirtDescriptor * | getDescriptor (VirtDescriptor::Index index) |
Get a pointer to a specific descriptor in the queue. | |
VirtDescriptor * | consumeDescriptor () |
Get an incoming descriptor chain from the queue. | |
void | produceDescriptor (VirtDescriptor *desc, uint32_t len) |
Send a descriptor chain to the guest. | |
virtual void | onNotifyDescriptor (VirtDescriptor *desc) |
Notify queue of pending incoming descriptor. | |
void | dump () const |
Dump the contents of a queue. | |
Public Member Functions inherited from gem5::Serializable | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Protected Attributes | |
VirtIOConsole & | parent |
Protected Attributes inherited from gem5::VirtQueue | |
ByteOrder | byteOrder |
Byte order in this queue. | |
Additional Inherited Members | |
Static Public Member Functions inherited from gem5::Serializable | |
static const std::string & | currentSection () |
Gets the fully-qualified name of the active section. | |
static void | generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream) |
Generate a checkpoint file so that the serialization can be routed to it. | |
Static Public Attributes inherited from gem5::VirtQueue | |
static const Addr | ALIGN_BITS = 12 |
Page size used by VirtIO. It's hard-coded to 4096 bytes in the spec for historical reasons. | |
static const Addr | ALIGN_SIZE = 1 << ALIGN_BITS |
Protected Member Functions inherited from gem5::VirtQueue | |
VirtQueue (PortProxy &proxy, ByteOrder bo, uint16_t size) | |
Instantiate a new virtqueue. | |
Virtqueue for data going from the host to the guest.
Definition at line 110 of file console.hh.
|
inline |
Definition at line 114 of file console.hh.
|
inlinevirtual |
Definition at line 117 of file console.hh.
|
inline |
Definition at line 124 of file console.hh.
References gem5::Named::name(), and parent.
|
inlinevirtual |
Notify queue of pending events.
This method is called by VirtIODeviceBase::onNotify() to notify the device model of pending data in a virtqueue. The default implementation of this method iterates over the available descriptor chains and calls onNotifyDescriptor() for every new incoming chain.
Device models should normally overload one of onNotify() and onNotifyDescriptor().
Reimplemented from gem5::VirtQueue.
Definition at line 119 of file console.hh.
References trySend().
void gem5::VirtIOConsole::TermRecvQueue::trySend | ( | ) |
Try to send data pending data from the terminal.
Definition at line 77 of file console.cc.
References gem5::VirtQueue::consumeDescriptor(), gem5::ArmISA::d, gem5::SerialDevice::dataAvailable(), gem5::VirtIOConsole::device, DPRINTF, gem5::VirtIODeviceBase::kick(), gem5::ArmISA::len, parent, gem5::VirtQueue::produceDescriptor(), and gem5::SerialDevice::readData().
Referenced by onNotify(), and gem5::VirtIOConsole::VirtIOConsole().
|
protected |
Definition at line 127 of file console.hh.