mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
FmpDevicePkg: Assert on PcdFmpDeviceImageTypeIdGuid Size Mismatch
This patch adds an assert to FmpDxe.c to catch a platform misconfiguration of PcdFmpDeviceImageTypeIdGuid. Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
This commit is contained in:
parent
52eb643d07
commit
b7f963d570
1 changed files with 6 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue