Re: ESRT in OVMF


Michael D Kinney
 

Sandeep,

I agree with Laszlo that a new DSC/FDF file would be required.

Adding full set of UEFI feature to a new DSC/FDF file would
also enable more platform tests in EDK II CI as well, so it
would be valuable for more than just the use case described
here.

It is not a large change to add ESRT/FMP support. You can look
at edk2-platforms/Platform/Intel/Vlv2TbltDevicePkg for a
working platform example.

Best regards,

Mike

-----Original Message-----
From: Peter Jones <pjones@...>
Sent: Wednesday, July 29, 2020 8:36 AM
To: Laszlo Ersek <lersek@...>
Cc: sandeep.dhanvada@...; discuss@edk2.groups.io;
Kinney, Michael D <michael.d.kinney@...>
Subject: Re: [edk2-discuss] ESRT in OVMF

On Wed, Jul 29, 2020 at 11:52:42AM +0200, Laszlo Ersek
wrote:
Hello Sandeep,

On 07/29/20 05:03, Sandeep Dhanvada wrote:
Hi,

I am trying to test capsule based FMP device upgrade
in OVMF.

This is out of scope for the current OvmfPkg
platforms.

Clearly I'm not saying that capsule updates "should
not" be supported by
OVMF "ever", all I'm saying is that for such use
cases, a new OvmfPkg
platform DSC will be necessary.

(If the intent with the capsule update is to upgrade
the firmware add-on
devices *only*, that is, not the platform firmware
itself, then *maybe*
the current OVMF DSC files could accommodate that,
introducing a new
(default-off) build feature flag. I'm not sure.)

Mike Kinney and Peter Jones have done some work around
capsule updates
in OVMF; I'm CC'ing them. Perhaps you can use their
results for your
experiments.
I have a couple of ancient branches in various states of
disrepair that
were used as part of an API tester at one point. It's
from before FMP
was really driving anything and before the ESRT data
structures were
fully pushed to edk2, and such they are clearly well
unmaintained and
have totally rotted, but if there's any chance they help
at all, they're
at:

https://github.com/vathpela/edk2/tree/fake-capsule
https://github.com/vathpela/edk2/tree/fake-capsule-0
https://github.com/vathpela/edk2/tree/fake-capsule-1

Thanks
Laszlo

I have a PCI NIC Adapter with PCI Passthrough
enabled and need to
upgrade firmware for this NIC in ovmf. I generated
capsule file with
embedded driver as FMP driver and payload as option
ROM image.

I tried CapsuleApp.efi from OVMF Shell and also
fwupdate tool from
Linux.

Below is the observation with CapsuleApp.efi:
1. "CapsuleApp.efi -E" command from ovmf shell, but,
it is not displaying any entries.
2. "CapsuleApp.efi -D <CapsuleFile>" is showing
Capsule Header, Fmp Header and Fmp Payload Image Header
properly.

Below is the observation with fwupdate tool in
Linux:
1. CONFIG_EFI_ESRT is enabled in Kernel Config.
2. /sys/firmware/efi sysfs entry is created, but,
there is no esrt entry under this.
3. Since there is no esrt sysfs entry, "fwupdate -s"
command is showing that firmware updates are not
supported.

Please let me know how to add ESRT table in OVMF so
that i can upgrade device firmware.

--
Peter

Join discuss@edk2.groups.io to automatically receive all group messages.