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.

Signed-off-by: Oliver Smith-Denny <[email protected]>
  • Loading branch information
Bret Barkelew authored and mergify[bot] committed Jul 27, 2024
1 parent 52eb643 commit b7f963d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion FmpDevicePkg/FmpDxe/FmpDxe.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,12 @@ 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));
DEBUG ((
DEBUG_ERROR,
"FmpDxe(%s): Fall back to ImageTypeIdGuid of gEfiCallerIdGuid. FmpDxe error: misconfiguration\n",
mImageIdName
));
ASSERT (FALSE);
FmpDeviceLibGuid = &gEfiCallerIdGuid;
}
}
Expand Down

0 comments on commit b7f963d

Please sign in to comment.