On 13/03/15 14:36, Laszlo Ersek wrote:
> The "virt" machine type of qemu-system-(arm|aarch64) had no PCIe support
> prior to qemu commit
>
>    4ab29b82 arm: Add PCIe host bridge in virt machine
>
> With that commit, the "virt" board acquired the capability to expose an
> XHCI controller. Using a USB keyboard as example, the command line options
> were
>
>    -device nec-usb-xhci -device usb-kbd
>
> However, due to a slight XHCI emulation bug in QEMU --  dating back to
> several years earlier -- edk2's XHCI driver would encounter a failed
> ASSERT().
>
> This emulation problem has been fixed in QEMU commit
>
>    aa685789 xhci: generate a Transfer Event for each Transfer TRB with the
>             IOC bit set
>
> and now edk2's XHCI driver works well on QEMU's "nec-usb-xhci" device.
> Let's enable the driver in ArmVirtualizationQemu, as XHCI emulation is
> reportedly more virtualization-friendly than EHCI, consuming less CPU.
>
> (ArmVirtualizationXen is not modified because it includes no USB-related
> drivers at all.)
>
> This patch should not regress existing QEMU command lines (ie. expose the
> failed ASSERT()) because QEMU's "-device nec-usb-xhci" has never before
> resulted in USB devices that worked with edk2 firmware builds, hence users
> have never had a reason to add that option.
>
> Now that they learn about XHCI support in ArmVirtualizationQemu by reading
> this commit message, they (or their packagers) will also know to update
> qemu to aa685789 or later (in practice that means the upcoming 2.3
> release), at least if they want to use '-device nec-usb-xhci' with edk2,
> for the first time ever.

Very happy with this commit message - thanks!

Reviewed-by: Leif Lindholm <[email protected]>

> Cc: Leif Lindholm <[email protected]>
> Cc: Ard Biesheuvel <[email protected]>
> Cc: Alexander Graf <[email protected]>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Laszlo Ersek <[email protected]>
> Reviewed-by: Ard Biesheuvel <[email protected]>
> ---
>   ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc | 1 +
>   ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.fdf | 1 +
>   2 files changed, 2 insertions(+)
>
> diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc 
> b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc
> index 71929ac..ea411b9 100644
> --- a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc
> +++ b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc
> @@ -338,5 +338,6 @@
>     #
>     MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
>     MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
> +  MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
>     MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
>     MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
> diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.fdf 
> b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.fdf
> index 1f5d530..e0ec44b 100644
> --- a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.fdf
> +++ b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.fdf
> @@ -215,6 +215,7 @@ READ_LOCK_STATUS   = TRUE
>     #
>     INF MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
>     INF MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
> +  INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
>     INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
>     INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
>
>


-- IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium.  Thank you.

ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered 
in England & Wales, Company No:  2557590
ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, 
Registered in England & Wales, Company No:  2548782


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to