gem5
|
Virtqueue for data going from the host to the guest. More...
#include <console.hh>
Public Member Functions | |
TermRecvQueue (PortProxy &proxy, uint16_t size, VirtIOConsole &_parent) | |
virtual | ~TermRecvQueue () |
void | onNotify () |
Notify queue of pending events. More... | |
void | trySend () |
Try to send data pending data from the terminal. More... | |
std::string | name () const |
Public Member Functions inherited from VirtQueue | |
virtual | ~VirtQueue () |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. More... | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. More... | |
void | setAddress (Addr address) |
Set the base address of this queue. More... | |
Addr | getAddress () const |
Get the guest physical address of this queue. More... | |
uint16_t | getSize () const |
Get the number of descriptors available in this queue. More... | |
VirtDescriptor * | getDescriptor (VirtDescriptor::Index index) |
Get a pointer to a specific descriptor in the queue. More... | |
VirtDescriptor * | consumeDescriptor () |
Get an incoming descriptor chain from the queue. More... | |
void | produceDescriptor (VirtDescriptor *desc, uint32_t len) |
Send a descriptor chain to the guest. More... | |
virtual void | onNotifyDescriptor (VirtDescriptor *desc) |
Notify queue of pending incoming descriptor. More... | |
void | dump () const |
Dump the contents of a queue. More... | |
Public Member Functions inherited from Serializable | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. More... | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. More... | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Protected Attributes | |
VirtIOConsole & | parent |
Additional Inherited Members | |
Static Public Member Functions inherited from Serializable | |
static const std::string & | currentSection () |
Get the fully-qualified name of the active section. More... | |
static void | serializeAll (const std::string &cpt_dir) |
static void | unserializeGlobals (CheckpointIn &cp) |
Static Public Attributes inherited from VirtQueue | |
static const unsigned | ALIGN_BITS = 12 |
Page size used by VirtIO. It's hard-coded to 4096 bytes in the spec for historical reasons. More... | |
static const unsigned | ALIGN_SIZE = 1 << ALIGN_BITS |
Static Public Attributes inherited from Serializable | |
static int | ckptCount = 0 |
static int | ckptMaxCount = 0 |
static int | ckptPrevCount = -1 |
Protected Member Functions inherited from VirtQueue | |
VirtQueue (PortProxy &proxy, uint16_t size) | |
Instantiate a new virtqueue. More... | |
Virtqueue for data going from the host to the guest.
Definition at line 107 of file console.hh.
|
inline |
Definition at line 111 of file console.hh.
|
inlinevirtual |
Definition at line 113 of file console.hh.
|
inline |
Definition at line 120 of file console.hh.
References SimObject::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 VirtQueue.
Definition at line 115 of file console.hh.
References trySend().
void VirtIOConsole::TermRecvQueue::trySend | ( | ) |
Try to send data pending data from the terminal.
Definition at line 76 of file console.cc.
References VirtDescriptor::chainWrite(), VirtQueue::consumeDescriptor(), ArmISA::d, Terminal::dataAvailable(), DPRINTF, Terminal::in(), VirtIODeviceBase::kick(), ArmISA::len, parent, VirtQueue::produceDescriptor(), VirtDescriptor::size(), and VirtIOConsole::term.
Referenced by onNotify().
|
protected |
Definition at line 123 of file console.hh.