41#include "debug/VIORng.hh"
42#include "params/VirtIORng.hh"
79 DPRINTF(VIORng,
"Got descriptor (len: %i)\n",
d->size());
82 uint8_t
byte =
rng->random<uint8_t>();
83 d->chainWrite(
len, &
byte,
sizeof(uint8_t));
void makeResponse()
Take a request packet and modify it in place to be suitable for returning as a response to that reque...
This object is a proxy for a port or other object which implements the functional response protocol,...
VirtIO descriptor (chain) wrapper.
ByteOrder byteOrder
The byte order of the queues, descriptors, etc.
VirtIODeviceBase(const Params ¶ms, DeviceId id, size_t config_size, FeatureBits features)
void registerQueue(VirtQueue &queue)
Register a new VirtQueue with the device model.
RngQueue(PortProxy &proxy, ByteOrder bo, uint16_t size, VirtIORng &_parent)
void trySend()
Try to send data pending data from the terminal.
RngQueue qReq
Receive queue for port 0.
VirtIORng(const Params ¶ms)
void readConfig(PacketPtr pkt, Addr cfgOffset)
Read from the configuration space of a device.
static const DeviceId ID_RNG
VirtIO device ID.
void produceDescriptor(VirtDescriptor *desc, uint32_t len)
Send a descriptor chain to the guest.
VirtDescriptor * consumeDescriptor()
Get an incoming descriptor chain from the queue.
VirtQueue(PortProxy &proxy, ByteOrder bo, uint16_t size)
Instantiate a new virtqueue.
const Params & params() const
Copyright (c) 2024 Arm Limited All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.