Skip to content

Commit

Permalink
REBASE: Merged PR 262: Restore capsule functionality after bad merge.
Browse files Browse the repository at this point in the history
Restore capsule functionality after bad merge.

Capsules sent from the UEFI shell still worked, but capsules from Windows were broken due to extra header information. Restore the code to strip extra header information.
Need to audit this code to bring more in-line with previous solution.
  • Loading branch information
Bret Barkelew committed Mar 20, 2019
1 parent f3b937f commit 1c39756
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1164,15 +1164,16 @@ ProcessFmpCapsuleImage (
// MS_CHANGE [BEGIN]
// Validate the capsule (perhaps again) before processing in case some one calls
// ProcessFmpCapsuleImage() before or without calling ValidateFmpCapsule()
// if (!IsFmpCapsuleGuid(&CapsuleHeader->CapsuleGuid)) {
// return ProcessFmpCapsuleImage ((EFI_CAPSULE_HEADER *)((UINTN)CapsuleHeader + CapsuleHeader->HeaderSize), ResetRequired);
// }
Status = ValidateFmpCapsule(CapsuleHeader, NULL);
if (EFI_ERROR(Status)) {
return Status;
}
// MS_CHANGE [END]

if (!IsFmpCapsuleGuid(&CapsuleHeader->CapsuleGuid)) {
return ProcessFmpCapsuleImage ((EFI_CAPSULE_HEADER *)((UINTN)CapsuleHeader + CapsuleHeader->HeaderSize), ResetRequired);
}

NotReady = FALSE;
Abort = FALSE;

Expand Down

0 comments on commit 1c39756

Please sign in to comment.