mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-26 17:01:07 +00:00
643747b912
The key changes in this patch are: * Buffer allocation is moved into a separate Buffer_pool helper. The implementation of the buffer allocation strategy does not change. The helper allocates a single RAM dataspace and splits it in multiple, equally sized chunks. * Management of main descriptor ring is enacapsulated in Descriptor_ring helper class. * Use separate RAM dataspaces for descriptor rings and buffers. Previously both of them were packed into a single dataspace. This might have been more RAM efficient, but IMO it made the code uglier and harder to understand. * All of the VirtIO::Queue members are now initialized on the class member initializer list. This is possible due to previously listed changes. * Since all VirtIO::Queue members are initalized on member initalizer list, some additional ones can be marked as const, ex _avail, _used ring pointers. * Move descriptor writing code into a common method used by both write_data and write_data_read_reply members. This avoids some code duplication between those methods. * Get rid of request_irq argument that most public VirtIO::Queue methods accept. None of the existing drivers use it and I doubt this will change any time soon. * Use Genode namespace by default in Virtio. This patch also fixes at least one bug that I discovered while working on VirtIO block device driver. Namely, when chaining descriptors only the first descriptor in the chain should be exposed in the available ring. Issue #4347 |
||
---|---|---|
.. | ||
mmio_device.h | ||
pci_device.h | ||
queue.h |