Changelog from v3: ------------------ - Fixed 'write size' in VIRTIO_DEVICE_WRITE comment - Made all the functions of the protocol return EFI_STATUS - Removed 'VIRTIO_GET_GUEST_FEATURES GetGuestFeatures' - Added a note about the fact VIRTIO_SET_QUEUE_ALIGN is a NOP - Fixed VIRTIO_GET_DEVICE_STATUS comment - Added a 'Revision' attribute to the protocol - Added a longer commit message to VirtioPciDeviceDxe patch - Clean comment in VirtioPciDeviceDxe - Empty the scope of VirtioPciUninit() to mirror VirtioPciInit() - Updated the comment of VIRTIO_SET_QUEUE_ADDRESS/VIRTIO_GET_QUEUE_ADDRESS with the required division by 4096 - Added VIRTIO_DEVICE_PROTOCOL.SetPageSize() protocol member - Removed VirtioWriteDevice() and VirtioReadDevice() from VirtioLib.
Limitation: ----------- - The ARM Foundation Model does not return a valid Vendor ID. As a consequence, the MMIO Virtio driver cannot return an error if the Vendor ID does not match the VirtIo Vendor ID. Not implemented: ---------------- - [Laszlo] A VIRTIO_GET_QUEUE_SEL member / typedef could have been appropriate for PCI, but I agree that virtio-mmio allows write-only here. - [Laszlo] A VIRTIO_GET_QUEUE_NOTIFY member / typedef could have been appropriate for PCI, but I agree that virtio-mmio allows write-only here. - Did not make the change 'VIRTIO_CFG_WRITE (Device, VIRTIO_MMIO_OFFSET_QUEUE_PFN, 0);' that fixes the VirtIo support in Linux - Did not implement VirtioPciGetDeviceName() Not changed: ------------ - Endianness: All the architectures supported by the UEFI spec are in 'little endian' mode. - Keep the PCI 64bit read/write break down into two 32bit accesses: The VirtiIo BlockIo driver makes (at least) one non 8-byte aligned access when trying to access the 'VIRTIO_BLK_CONFIG.Capacity' attribute. VIRTIO_BLK_CONFIG.Capacity is a 64bit field at the offset 0x0 of the device specific region. This region starts at the offset 20 (0x14) of the I/O region when there is no MSI-X capability. Olivier Martin (11): OvmfPkg/Virtio.h: Added the macros that define the Device Specific Configuration Offset OvmfPkg/Virtio.h: Added PCI/MMIO Virtio Headers Offsets OvmfPkg/Virtio.h: Added the Virtio Vendor and MMIO IDs OvmfPkg/VirtioDevice.h: Introduced VIRTIO_DEVICE_PROTOCOL protocol OvmfPkg/VirtioPciDeviceDxe: Implement VIRTIO_DEVICE_PROTOCOL for VirtIo Devices over PCI OvmfPkg/VirtioMmioDeviceLib: Implement VIRTIO_DEVICE_PROTOCOL for VirtIo Devices over MMIO OvmfPkg: Make the VirtIo devices use the new VIRTIO_DEVICE_PROTOCOL OvmfPkg/Virtio.h: Removed definition of VIRTIO_HDR ArmPlatformPkg/ArmVExpressPkg: Added the empty 'ArmFvpDxe' platform UEFI driver ArmPlatformPkg/ArmFvpDxe: Added Virtio Block support OvmfPkg/Virtio: Removed VirtioReadDevice() / VirtIoWriteDevice() functions .../ArmVExpressPkg/ArmFvpDxe/ArmFvpDxe.c | 73 +++ .../ArmVExpressPkg/ArmFvpDxe/ArmFvpDxe.inf | 35 + .../ArmVExpress-RTSM-AEMv8Ax4-foundation.dsc | 10 + .../ArmVExpress-RTSM-AEMv8Ax4-foundation.fdf | 6 + .../ArmVExpressPkg/ArmVExpress-RTSM-AEMv8Ax4.dsc | 10 + .../ArmVExpressPkg/ArmVExpress-RTSM-AEMv8Ax4.fdf | 8 +- OvmfPkg/Include/IndustryStandard/Virtio.h | 67 ++- OvmfPkg/Include/IndustryStandard/VirtioBlk.h | 21 +- OvmfPkg/Include/IndustryStandard/VirtioNet.h | 14 +- OvmfPkg/Include/IndustryStandard/VirtioScsi.h | 27 +- OvmfPkg/Include/Library/VirtioLib.h | 77 +-- OvmfPkg/Include/Library/VirtioMmioDeviceLib.h | 65 ++ OvmfPkg/Include/Protocol/VirtioDevice.h | 376 +++++++++++ OvmfPkg/Library/VirtioLib/VirtioLib.c | 158 +----- .../Library/VirtioMmioDeviceLib/VirtioMmioDevice.c | 204 ++++++ .../Library/VirtioMmioDeviceLib/VirtioMmioDevice.h | 147 +++++ .../VirtioMmioDeviceFunctions.c | 304 +++++++++ .../VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf | 43 ++ OvmfPkg/OvmfPkg.dec | 1 + OvmfPkg/OvmfPkgIa32.dsc | 1 + OvmfPkg/OvmfPkgIa32.fdf | 1 + OvmfPkg/OvmfPkgIa32X64.dsc | 1 + OvmfPkg/OvmfPkgIa32X64.fdf | 1 + OvmfPkg/OvmfPkgX64.dsc | 1 + OvmfPkg/OvmfPkgX64.fdf | 1 + OvmfPkg/VirtioBlkDxe/VirtioBlk.c | 185 +++---- OvmfPkg/VirtioBlkDxe/VirtioBlk.h | 32 +- OvmfPkg/VirtioBlkDxe/VirtioBlk.inf | 4 +- OvmfPkg/VirtioNetDxe/ComponentName.c | 6 +- OvmfPkg/VirtioNetDxe/DriverBinding.c | 130 ++--- OvmfPkg/VirtioNetDxe/Events.c | 2 +- OvmfPkg/VirtioNetDxe/SnpGetStatus.c | 2 +- OvmfPkg/VirtioNetDxe/SnpInitialize.c | 37 +- OvmfPkg/VirtioNetDxe/SnpReceive.c | 12 +- OvmfPkg/VirtioNetDxe/SnpShutdown.c | 2 +- OvmfPkg/VirtioNetDxe/SnpTransmit.c | 12 +- OvmfPkg/VirtioNetDxe/VirtioNet.h | 26 +- OvmfPkg/VirtioNetDxe/VirtioNet.inf | 2 +- OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c | 667 ++++++++++++++++++++ OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.h | 166 +++++ OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf | 43 ++ OvmfPkg/VirtioPciDeviceDxe/VirtioPciFunctions.c | 285 +++++++++ OvmfPkg/VirtioScsiDxe/VirtioScsi.c | 173 ++---- OvmfPkg/VirtioScsiDxe/VirtioScsi.h | 24 +- OvmfPkg/VirtioScsiDxe/VirtioScsi.inf | 2 +- 45 files changed, 2814 insertions(+), 650 deletions(-) create mode 100644 ArmPlatformPkg/ArmVExpressPkg/ArmFvpDxe/ArmFvpDxe.c create mode 100644 ArmPlatformPkg/ArmVExpressPkg/ArmFvpDxe/ArmFvpDxe.inf create mode 100644 OvmfPkg/Include/Library/VirtioMmioDeviceLib.h create mode 100644 OvmfPkg/Include/Protocol/VirtioDevice.h create mode 100644 OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c create mode 100644 OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.h create mode 100644 OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceFunctions.c create mode 100644 OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf create mode 100644 OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c create mode 100644 OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.h create mode 100644 OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf create mode 100644 OvmfPkg/VirtioPciDeviceDxe/VirtioPciFunctions.c ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel