From 14a359e833680a51d122821e06ce2fe4d8651c07 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. --- FmpDevicePkg/FmpDxe/FmpDxe.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/FmpDevicePkg/FmpDxe/FmpDxe.c b/FmpDevicePkg/FmpDxe/FmpDxe.c index 1e7ec4a09e..ee13c3436c 100644 --- a/FmpDevicePkg/FmpDxe/FmpDxe.c +++ b/FmpDevicePkg/FmpDxe/FmpDxe.c @@ -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 + DEBUG ((DEBUG_ERROR, "FmpDxe(%s): Fall back to ImageTypeIdGuid of gEfiCallerIdGuid. FmpDxe error: misconfiguration\n", mImageIdName)); + ASSERT (FALSE); + // MU_CHANGE end FmpDeviceLibGuid = &gEfiCallerIdGuid; } }