Re: DxeCapsuleLib returns Status Issue

Yao, Jiewen

Hi Ankit Singh
This seems a missing feature in current EDKII. Thanks to catch that.

Would you please file a bugzillar tracker, so that it can recorded?

The Bugzilla is introduced @

The URL for Bugzilla is @

Thank you
Yao Jiewen

From: Ankit_Singh3@... [mailto:Ankit_Singh3@...]
Sent: Tuesday, August 30, 2016 12:05 AM
To: Yao, Jiewen <jiewen.yao@...>
Subject: RE: [EDK2] DxeCapsuleLib returns Status Issue

Dell - Internal Use - Confidential
Hi Jiewen,

Thanks for pointing me to Capsule Status Variable (UEFI spec - Section 7.5.6), looks like it exactly what I was expecting. But I looked into latest EDK2 code and could not find it being populated and stored/saved anywhere.

Ankit Singh

-----Original Message-----
From: Yao, Jiewen [mailto:jiewen.yao@...]
Sent: Monday, August 29, 2016 1:29 PM
To: Singh3, Ankit ; edk2-devel@...<mailto:edk2-devel@...>
Subject: RE: [EDK2] DxeCapsuleLib returns Status Issue

That is good problem statement.

Do you think we can use Capsule Status Variable to record such information?
It is defined in UEFI spec - "7.5.6 UEFI variable reporting on the Success or any Errors encountered in processing of capsules after restart"

The application can use this standard way to check status.

Thank you
Yao Jiewen

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@...] On Behalf Of
Sent: Monday, August 29, 2016 3:51 PM
To: edk2-devel@...<mailto:edk2-devel@...>
Subject: [edk2] [EDK2] DxeCapsuleLib returns Status Issue

Dell - Internal Use - Confidential
Hi EDK2 Developers,

We are incorporating DxeCapsuleLib for FMP Capsule Update into our
UEFI product, but we are hitting few issues as described below.

In case of Capsule Update "SetImage" is randomly done for all the FMP
Handles in case Image Type Id GUID and Image Index matches (this is
expected as there might be multiple similar hardware), but looks like
the returns of each FMP update is not handled.
For example if there are 5 FMP handles (can be for different-different
devices) and assume that any particular device handle is at 3rd index,
therefore the update goes through successfully on the 3rd attempt but
since HandleCount value is 5 it tries further with 4th and 5th Handle.
This 4th & 5th Handle attempt can fail for any of the calls within the FMP Handle "for loop"
(HandleProtocol/GetImageInfo) and hence the final status is returned
as FAILURE to application layer.

Below is the code-snippet from DxeCapsuleLib.c , in case of
HandleProtocol & GetImageInfo failure, "for" loop for Handle count is
continued and the previous Status value is over-written with this new
return (return from HandleProtocol & GetImageInfo) and finally returned to application.

Proposed Solution:-
Can ProcessFmpCapsuleImage() have an extra OUT parameter which gives
the list of all successful FMP Handles along with the updated GUID
values, so that any application can make the judgment of Update
SUCCESS/FAILURE based on FMP Handle and proceed accordingly at application layer.

Ankit Singh

edk2-devel mailing list

Join to automatically receive all group messages.