Reviewed-by: Michael D Kinney <michael.d.kin...@intel.com> > -----Original Message----- > From: michael.kuba...@outlook.com > <michael.kuba...@outlook.com> > Sent: Thursday, July 30, 2020 8:15 PM > To: devel@edk2.groups.io > Cc: Gao, Liming <liming....@intel.com>; Kinney, Michael > D <michael.d.kin...@intel.com> > Subject: [PATCH v1 5/7] FmpDevicePkg/FmpDxe: Better warn > of potential ImageTypeId misconfig > > From: Michael Kubacki <michael.kuba...@microsoft.com> > > 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 <liming....@intel.com> > Cc: Michael D Kinney <michael.d.kin...@intel.com> > Signed-off-by: Michael Kubacki > <michael.kuba...@microsoft.com> > --- > > Notes: > The PCD documentation indicates it is valid behavior > for the user > to fall back to gEfiCallerIdGuid. Is that really > expected? > > Would an ASSERT be appropriate? > > 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 58841774fee0..14994ce4ee0e 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.<BR> > + Copyright (c) Microsoft Corporation.<BR> > Copyright (c) 2018 - 2020, Intel Corporation. All > rights reserved.<BR> > > 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; > } > } > -- > 2.27.0.windows.1
-=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#63731): https://edk2.groups.io/g/devel/message/63731 Mute This Topic: https://groups.io/mt/75900910/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-