> -----Original Message-----
> From: Laszlo Ersek [mailto:ler...@redhat.com]
> Sent: 18 September 2013 12:01
> To: Olivier Martin
> Cc: edk2-devel@lists.sourceforge.net
> Subject: Re: [edk2] [PATCH 0/8] OvmfPkg: Introduce and use the new
> VIRTIO_DEVICE_PROTOCOL protocol
> 
> On 09/17/13 18:54, Olivier Martin wrote:
> > 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.
> 
> This sounds great! I intend to start reviewing the series soon.
> 
> > Note: The AArch64 ARM Foundation and Base models use VirtIo Block
> > device over VirtIo MMIO to expose block device to the ARM models.
> 
> Can you please tell me more about this? What are these models?

Sorry, the term 'model' was maybe not appropriate for people not familiar
with ARM's tools.
The ARM Models are Virtual Platform (a bit like qEmu) - see
http://www.arm.com/products/tools/models/index.php

We could say there are 2 types of ARM models:
- Versatile Express Models: replicate the ARM Versatile Express development
hardware platform
(http://www.arm.com/products/tools/development-boards/versatile-express/inde
x.php) [required a license]
  Actually, I was told there is no VirtIo support in the external version of
the Versatile Express Models.
- Foundation Model: a ARMv8 cut down version of the base model
(http://www.arm.com/products/tools/models/fast-models/foundation-model.php)
[FREE]


> 
> Do these (physical hardware) ARM models use virtio to drive physical
> disks? (Probably very stupid question, sorry, but I know nothing about
> ARM.)

These Virtual Platforms use VirtIo technology to expose devices to the
emulated ARM environment such as qEmu is doing.
For instance to expose a disk image to the ARM Foundation model, you need to
pass the argument '--block-device virtio-block.dat' to the model.

> If you have the time, can you please give more background for the
> series? Not only about ARM but also any architectural changes in the
> drivers. (It's easier to review knowing what to expect broadly.)
> 

# 0001 OvmfPkg/Virtio.h: Added VirtIo Subsystem Ids: This patch was intended
to remove the magic values in the PCI device drivers.
But I have just realized I forgot to remove them from the drivers. A new
patch will be sent to remove the magic value at the next iteration.

# 0002 OvmfPkg/VirtioDevice.h: Introduced VIRTIO_DEVICE_PROTOCOL protocol
This protocol introduces an abstraction to access the VirtIo Configuration
and Device spaces. The registers in these spaces are located at a different
offset and have a different width whether the transport layer is either PCI
or MMIO. This protocol would also allow to support VirtIo PCI devices with
MSI-X capability in a transparent way (Device space is at a different offset
when a PCIe device has MSI-X capability)

# 0003 OvmfPkg/VirtioPciDeviceDxe: Implement VIRTIO_DEVICE_PROTOCOL for
VirtIo Devices over PCI
This change implements the new VIRTIO_DEVICE_PROTOCOL protocol for the PCI
transport layer.

# 0004 OvmfPkg/VirtioMmioDeviceLib: Implement VIRTIO_DEVICE_PROTOCOL for
VirtIo Devices over MMIO
This change implements the VIRTIO_DEVICE_PROTOCOL protocol in a helper
library. A driver will instantiate this protocol by calling the function
VirtioMmioInstallDevice(PHYSICAL_ADDRESS BaseAddress, EFI_HANDLE Handle);

# 0005 OvmfPkg: Make the VirtIo devices use the new VIRTIO_DEVICE_PROTOCOL
Update the VirtIo PCI devices to use the VIRTIO_DEVICE_PROTOCOL instead of
the EFI_PCI_IO_PROTOCOL.

# 0006 OvmfPkg/Virtio.h: Removed definition of VIRTIO_HDR
The VIRTIO_HDR header is no more required after moving to the
VIRTIO_DEVICE_PROTOCOL protocol.

These two last changes expose the VirtIo block device available on the ARM
models to UEFI using VirtioMmioDeviceLib:
# 0007 ArmPlatformPkg/ArmVExpressPkg: Added the empty 'ArmFvpDxe' platform
UEFI driver
# 0008 ArmPlatformPkg/ArmFvpDxe: Added Virtio Block support

Note: There is no ARM architectural code in this patchset.

> >
> > This patchset has been validated on:
> > - OvmfPkg X64 with the Block, Scsi and Net Virtio devices
> > - AArch64 Foundation and VExpress ARM models
> 
> I hope I can give it some testing too. Exciting!
> 

If you want to have a look at the use of VirtIo on the ARM models then I
would recommend you to have a look to the AArch64 Foundation model
(http://www.arm.com/fvp).
The main reason is because it is free. And the other reasons is most ARM
Partners already use it and provide software stack for it:
- Fedora project:
https://fedoraproject.org/wiki/Architectures/ARM/AArch64/FoundationModel
- Linaro: http://www.linaro.org/engineering/engineering-projects/armv8
- UEFI development:
http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=ArmPlatformP
kg/AArch64


I will send a new patchset in a couple of minutes taking in account the
initial comments from Jordan and you.

Olivier




------------------------------------------------------------------------------
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