From b7f963d570ec5e27bc04d546372c6fc47e4f3b17 Mon Sep 17 00:00:00 2001 From: Bret Barkelew Date: Tue, 6 Nov 2018 18:34:49 +0000 Subject: [PATCH] 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 --- FmpDevicePkg/FmpDxe/FmpDxe.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/FmpDevicePkg/FmpDxe/FmpDxe.c b/FmpDevicePkg/FmpDxe/FmpDxe.c index 1e7ec4a09e16..b04998ba0461 100644 --- a/FmpDevicePkg/FmpDxe/FmpDxe.c +++ b/FmpDevicePkg/FmpDxe/FmpDxe.c @@ -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; } }