Go to the documentation of this file.
40 #include "debug/VIOConsole.hh"
41 #include "params/VirtIOConsole.hh"
47 qTrans(params->
system->physProxy,
byteOrder, params->qTransSize, *this),
48 device(*params->device)
76 DPRINTF(VIOConsole,
"trySend\n");
83 DPRINTF(VIOConsole,
"Got descriptor (len: %i)\n",
d->size());
87 d->chainWrite(
len, &in,
sizeof(uint8_t));
100 DPRINTF(VIOConsole,
"Got input data descriptor (len: %i)\n",
108 for (
int i = 0;
i < desc->
size(); ++
i)
109 parent.device.writeData(
data[
i]);
112 produceDescriptor(desc, 0);
117 VirtIOConsoleParams::create()
size_t size() const
Retrieve the size of this descriptor.
TermTransQueue qTrans
Transmit queue for port 0.
void produceDescriptor(VirtDescriptor *desc, uint32_t len)
Send a descriptor chain to the guest.
ByteOrder byteOrder(const ThreadContext *tc)
void readConfig(PacketPtr pkt, Addr cfgOffset)
Read from the configuration space of a device.
void registerQueue(VirtQueue &queue)
Register a new VirtQueue with the device model.
Base class for all VirtIO-based devices.
VirtIOConsoleParams Params
void regInterfaceCallback(const std::function< void()> &callback)
Register a data available callback into the host interface layer.
virtual bool dataAvailable() const =0
Check if there is pending data from the serial device.
T htog(T value, ByteOrder guest_byte_order)
void readConfigBlob(PacketPtr pkt, Addr cfgOffset, const uint8_t *cfg)
Read configuration data from a device structure.
size_t chainSize() const
Retrieve the size of this descriptor chain.
virtual uint8_t readData()=0
Read a character from the device.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Console configuration structure.
void chainRead(size_t offset, uint8_t *dst, size_t size) const
Read the contents of a descriptor chain.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
VirtIOConsole(Params *params)
Config config
Currently active configuration (host byte order)
void onNotifyDescriptor(VirtDescriptor *desc)
Notify queue of pending incoming descriptor.
VirtDescriptor * consumeDescriptor()
Get an incoming descriptor chain from the queue.
TermRecvQueue qRecv
Receive queue for port 0.
void kick()
Inform the guest of available buffers.
void trySend()
Try to send data pending data from the terminal.
ByteOrder byteOrder
The byte order of the queues, descriptors, etc.
VirtIO descriptor (chain) wrapper.
Generated on Wed Sep 30 2020 14:02:11 for gem5 by doxygen 1.8.17