public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* How to handle USBIO operation during FmpDxe update capsule flow?
@ 2022-07-20  7:07 gordontcp
  0 siblings, 0 replies; only message in thread
From: gordontcp @ 2022-07-20  7:07 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 1575 bytes --]

Hi all,
According to the instructions of edk2-platforms, I can build MinnowMax.cap and CapsuleApp.efi.
Build command: build -a IA32 -a X64 -n 5 -t VS2019 -b DEBUG -p Vlv2TbltDevicePkg\PlatformPkgX64.dsc
reference:
https://github.com/tianocore/edk2-platforms/tree/master/Platform/Intel/Vlv2TbltDevicePkg
My system: MinnowMax board.
I can update capsule data to MinnowMax SPI flash with the following command:
Shell command: CapsuleApp MinnowMax.cap
But when I try to write data to an external USB device, I get an error. My modifications are as follows:
\edk2-platforms\Platform\Intel\Vlv2TbltDevicePkg\Feature\Capsule\Library\PlatformFlashAccessLib\PlatformFlashAccessLib.c

EFI_STATUS
EFIAPI
PerformFlashAccessLibConstructor (
VOID
)
{
EFI_STATUS Status;
Status = gBS->LocateProtocol(
&gEfiUsbIoProtocolGuid,
NULL,
(VOID**)&gUsbIOWDT
);
if (EFI_ERROR(Status)) return Status; //unsupport
return Status;
}

The error message is Status : EFI_NOT_FOUND.
Among them, PerformFlashAccessLibConstructor is executed in the FmpDxe(Minnow) driver, and it refers to the following method of Vlv2TbltDevicePkg:

Status = gBS->LocateProtocol (
&gEfiSpiProtocolGuid,
NULL,
(VOID **) &mSpiProtocol
);

My questions are:

* How to handle USBIO operation during FmpDxe update capsule flow? Is there any sample code?
* In FmpDxe, you can pass the gEfiSpiProtocolGuid parameter in the LocateProtocol function to get the handle. Why does passing gEfiUsbIoProtocolGuid cause an error? How should it be modified?
Any advice is greatly appreciated!
Thanks!

[-- Attachment #2: Type: text/html, Size: 6308 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-20  7:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-20  7:07 How to handle USBIO operation during FmpDxe update capsule flow? gordontcp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox