From de6859ec0cdbc6f524d2ac4691cb528ff83ed222 Mon Sep 17 00:00:00 2001 From: Michael Kubacki Date: Thu, 6 Aug 2020 12:05:40 -0700 Subject: FmpDevicePkg/FmpDxe: Better warn of potential ImageTypeId misconfig A user may fall through to the case they depend on the PcdFmpDeviceImageTypeIdGuid value to get the ImageTypeId GUID value. The default PCD value is 0 (NULL) so the code would further fall back on the gEfiCallerIdGuid value. This change modifies the print error level for the message that indicates this occurred to DEBUG_WARN from DEBUG_INFO to better warn the user that this occurred. Cc: Liming Gao Cc: Michael D Kinney Cc: Guomin Jiang Cc: Wei6 Xu Signed-off-by: Michael Kubacki Reviewed-by: Michael D Kinney Reviewed-by: Guomin Jiang Reviewed-by: Wei6 Xu --- FmpDevicePkg/FmpDxe/FmpDxe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FmpDevicePkg/FmpDxe/FmpDxe.c b/FmpDevicePkg/FmpDxe/FmpDxe.c index 58841774fe..14994ce4ee 100644 --- a/FmpDevicePkg/FmpDxe/FmpDxe.c +++ b/FmpDevicePkg/FmpDxe/FmpDxe.c @@ -3,7 +3,7 @@ image stored in a firmware device with platform and firmware device specific information provided through PCDs and libraries. - Copyright (c) 2016, Microsoft Corporation. All rights reserved.
+ Copyright (c) Microsoft Corporation.
Copyright (c) 2018 - 2020, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent @@ -179,7 +179,7 @@ GetImageTypeIdGuid ( if (ImageTypeIdGuidSize == sizeof (EFI_GUID)) { FmpDeviceLibGuid = (EFI_GUID *)PcdGetPtr (PcdFmpDeviceImageTypeIdGuid); } else { - DEBUG ((DEBUG_INFO, "FmpDxe(%s): Fall back to ImageTypeIdGuid of gEfiCallerIdGuid\n", mImageIdName)); + DEBUG ((DEBUG_WARN, "FmpDxe(%s): Fall back to ImageTypeIdGuid of gEfiCallerIdGuid\n", mImageIdName)); FmpDeviceLibGuid = &gEfiCallerIdGuid; } } -- cgit v1.2.3