From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=michael.d.kinney@intel.com; receiver=edk2-devel@lists.01.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E036F2098C8C9 for ; Thu, 19 Jul 2018 08:37:07 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jul 2018 08:37:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,375,1526367600"; d="scan'208";a="56252957" Received: from orsmsx103.amr.corp.intel.com ([10.22.225.130]) by fmsmga008.fm.intel.com with ESMTP; 19 Jul 2018 08:35:32 -0700 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.96]) by ORSMSX103.amr.corp.intel.com ([169.254.5.19]) with mapi id 14.03.0319.002; Thu, 19 Jul 2018 08:35:21 -0700 From: "Kinney, Michael D" To: "Zeng, Star" , "edk2-devel@lists.01.org" , "Kinney, Michael D" Thread-Topic: [staging/FmpDevicePkg-master][PATCH] FmpDevicePkg FmpDxe: Return 0 when LSV check is not required Thread-Index: AQHUH0u0RvE/Gcpag0qCJxjKnFs10aSWrYpg Date: Thu, 19 Jul 2018 15:35:20 +0000 Message-ID: References: <1531996298-28516-1-git-send-email-star.zeng@intel.com> In-Reply-To: <1531996298-28516-1-git-send-email-star.zeng@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [10.22.254.139] MIME-Version: 1.0 Subject: Re: [staging/FmpDevicePkg-master][PATCH] FmpDevicePkg FmpDxe: Return 0 when LSV check is not required X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 15:37:08 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Michael D Kinney =20 Mike > -----Original Message----- > From: Zeng, Star > Sent: Thursday, July 19, 2018 3:32 AM > To: edk2-devel@lists.01.org > Cc: Zeng, Star ; Kinney, Michael D > > Subject: [staging/FmpDevicePkg-master][PATCH] FmpDevicePkg > FmpDxe: Return 0 when LSV check is not required >=20 > Current code return 1 when LSV check is not required, > but 1 LSV will make 0 Version capsule image update failed. >=20 > 0 LSV is valid, this patch updates the code to return 0 > when > LSV check is not required > We can see even the DEFAULT_LOWESTSUPPORTEDVERSION is 0. >=20 > Cc: Michael D Kinney > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Star Zeng > --- > FmpDevicePkg/FmpDxe/FmpDxe.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) >=20 > diff --git a/FmpDevicePkg/FmpDxe/FmpDxe.c > b/FmpDevicePkg/FmpDxe/FmpDxe.c > index c0c1383723fb..d6b599ee1a56 100644 > --- a/FmpDevicePkg/FmpDxe/FmpDxe.c > +++ b/FmpDevicePkg/FmpDxe/FmpDxe.c > @@ -210,12 +210,15 @@ GetLowestSupportedVersion ( > // Get the LowestSupportedVersion. > // >=20 > - DeviceLibLowestSupportedVersion =3D > DEFAULT_LOWESTSUPPORTEDVERSION; > - ReturnLsv =3D PcdGet32 > (PcdFmpDeviceBuildTimeLowestSupportedVersion); > if (!IsLowestSupportedVersionCheckRequired ()) { > - return 1; > + // > + // Any Versioon can pass the 0 LowestSupportedVersion > check. > + // > + return 0; > } >=20 > + ReturnLsv =3D PcdGet32 > (PcdFmpDeviceBuildTimeLowestSupportedVersion); > + > // > // Check the FmpDeviceLib > // > -- > 2.7.0.windows.1