This patchset introduces the new protocol VIRTIO_DEVICE_PROTOCOL that abstracts 
the VirtIo transport layer.
It allows to enable VirtIo on devices that do not have PCI support. These 
devices might use a memory mapped view of the VirtIo controller (see Appendix 
X: virtio-mmio of the Virtio spec v0.9.5).
This patchset also allows to remove the duplicated PCI code over the different 
VirtIo devices.

Note: The AArch64 ARM Foundation and Base models use VirtIo Block device over 
VirtIo MMIO to expose block device to the ARM models.

This patchset has been validated on:
- OvmfPkg X64 with the Block, Scsi and Net Virtio devices
- AArch64 Foundation and VExpress ARM models

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.mar...@arm.com>

Olivier Martin (8):
  OvmfPkg/Virtio.h: Added VirtIo Subsystem 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

 .../ArmVExpressPkg/ArmFvpDxe/ArmFvpDxe.c           |   73 +++
 .../ArmVExpressPkg/ArmFvpDxe/ArmFvpDxe.inf         |   38 ++
 .../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          |   31 +-
 OvmfPkg/Include/IndustryStandard/VirtioBlk.h       |   21 +-
 OvmfPkg/Include/IndustryStandard/VirtioNet.h       |   13 +-
 OvmfPkg/Include/IndustryStandard/VirtioScsi.h      |   27 +-
 OvmfPkg/Include/Library/VirtioLib.h                |   49 +-
 OvmfPkg/Include/Library/VirtioMmioDeviceLib.h      |   48 ++
 OvmfPkg/Include/Protocol/VirtioDevice.h            |  284 +++++++++
 OvmfPkg/Library/VirtioLib/VirtioLib.c              |  126 +---
 .../Library/VirtioMmioDeviceLib/VirtioMmioDevice.c |  199 ++++++
 .../Library/VirtioMmioDeviceLib/VirtioMmioDevice.h |  147 +++++
 .../VirtioMmioDeviceFunctions.c                    |  281 +++++++++
 .../VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf    |   42 ++
 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                   |  164 ++----
 OvmfPkg/VirtioBlkDxe/VirtioBlk.h                   |   15 +-
 OvmfPkg/VirtioBlkDxe/VirtioBlk.inf                 |    4 +-
 OvmfPkg/VirtioNetDxe/ComponentName.c               |    4 +-
 OvmfPkg/VirtioNetDxe/DriverBinding.c               |  145 ++---
 OvmfPkg/VirtioNetDxe/Events.c                      |    2 +-
 OvmfPkg/VirtioNetDxe/SnpGetStatus.c                |    2 +-
 OvmfPkg/VirtioNetDxe/SnpInitialize.c               |   32 +-
 OvmfPkg/VirtioNetDxe/SnpReceive.c                  |   12 +-
 OvmfPkg/VirtioNetDxe/SnpShutdown.c                 |    2 +-
 OvmfPkg/VirtioNetDxe/SnpTransmit.c                 |   12 +-
 OvmfPkg/VirtioNetDxe/VirtioNet.h                   |   12 +-
 OvmfPkg/VirtioNetDxe/VirtioNet.inf                 |    2 +-
 OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c       |  637 ++++++++++++++++++++
 OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.h       |  246 ++++++++
 OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf  |   42 ++
 OvmfPkg/VirtioPciDeviceDxe/VirtioPciFunctions.c    |  188 ++++++
 OvmfPkg/VirtioScsiDxe/VirtioScsi.c                 |  149 ++----
 OvmfPkg/VirtioScsiDxe/VirtioScsi.h                 |    4 +-
 OvmfPkg/VirtioScsiDxe/VirtioScsi.inf               |    2 +-
 45 files changed, 2573 insertions(+), 523 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


------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to