[edk2-devel] [PATCH v2] OvmfPkg: Use DxeRuntimeCapsuleLib from DxeCapsuleLibFmp in X64 builds

Tomas Pilar (tpilar) tpilar at solarflare.com
Tue Jun 25 15:14:54 UTC 2019


I mean you need a PCI device with a UEFI driver that implements FMP to test this. Our Solarflare driver currently does, so I can test this, I've sent two of our NICs to Peter Jones @ RedHat (If you are interested, I can get you a sample of our adapter along with drivers).

Once you have your PCI device and a driver, you make a capsule using GenerateCapsule, adding the driver alongside your payload. 

With newish qemu and ovmf you can use PCI passthrough (also called hostdev) to pass the PCI device entirely into the VM. Then you run CapsuleApp.efi (built from MdeModulePkg) in UEFI shell in that VM and pass the capsule as first parameter. That's all there is to it.

I can share my libvirt XML containing the hostdev configuration if you'd like.

Cheers,
Tom

-----Original Message-----
From: Philippe Mathieu-Daudé <philmd at redhat.com> 
Sent: 25 June 2019 15:52
To: Devel EDK2 <devel at edk2.groups.io>; Tomas Pilar <tpilar at solarflare.com>
Cc: jordan.l.justen at intel.com; Laszlo Ersek <lersek at redhat.com>; Ard Biesheuvel <ard.biesheuvel at linaro.org>
Subject: Re: [edk2-devel] [PATCH v2] OvmfPkg: Use DxeRuntimeCapsuleLib from DxeCapsuleLibFmp in X64 builds

Hi Tomas,

On 6/24/19 5:53 PM, Tomas Pilar (tpilar) wrote:
> Switching to this library enables capsule support for FMP devices.
> This will allow testing of FMP for PCI devices using OVMF and PCI 
> passthrough as well as software parts of the FMP API.
> 
> Simple tests show that a capsule with an embedded driver now updates 
> using CapsuleApp.

How can I test this?

Thanks,

Phil.

> Cc: Jordan Justen <jordan.l.justen at intel.com>
> Cc: Laszlo Ersek <lersek at redhat.com>
> Cc: Ard Biesheuvel <ard.biesheuvel at linaro.org>
> Signed-off-by: Tomas Pilar <tpilar at solarflare.com>
> ---
>  OvmfPkg/OvmfPkgX64.dsc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index 
> 39ac791565..4c41e59a75 100644
> --- a/OvmfPkg/OvmfPkgX64.dsc
> +++ b/OvmfPkg/OvmfPkgX64.dsc
> @@ -125,7 +125,7 @@
>    UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
>    BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
>    
> FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.i
> nf
> -  
> CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.in
> f
> +  
> + CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibFmp/DxeRuntimeCapsuleLi
> + b.inf
>    DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
>    DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
>    
> PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BaseP
> eCoffGetEntryPointLib.inf
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42832): https://edk2.groups.io/g/devel/message/42832
Mute This Topic: https://groups.io/mt/32193560/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list