Skip to content

Commit

Permalink
FmpDevicePkg: Assert on PcdFmpDeviceImageTypeIdGuid Size Mismatch
Browse files Browse the repository at this point in the history
This patch adds an assert to FmpDxe.c to catch a platform
misconfiguration of PcdFmpDeviceImageTypeIdGuid.
  • Loading branch information
Bret Barkelew authored and os-d committed Jul 3, 2024
1 parent 62fc5b8 commit a1eef99
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion FmpDevicePkg/FmpDxe/FmpDxe.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,10 @@ GetImageTypeIdGuid (
if (ImageTypeIdGuidSize == sizeof (EFI_GUID)) {
FmpDeviceLibGuid = (EFI_GUID *)PcdGetPtr (PcdFmpDeviceImageTypeIdGuid);
} else {
DEBUG ((DEBUG_WARN, "FmpDxe(%s): Fall back to ImageTypeIdGuid of gEfiCallerIdGuid\n", mImageIdName));
// MU_CHANGE start - this is a misconfiguration error, we should assert
ASSERT (FALSE);
DEBUG ((DEBUG_ERROR, "FmpDxe(%s): Fall back to ImageTypeIdGuid of gEfiCallerIdGuid. FmpDxe error: misconfiguration\n", mImageIdName));
// MU_CHANGE end
FmpDeviceLibGuid = &gEfiCallerIdGuid;
}
}
Expand Down

0 comments on commit a1eef99

Please sign in to comment.