From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 47355D80CA0 for ; Fri, 1 Sep 2023 08:52:54 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=5Lduj0xsgpVqtzcx5oSPQKZ5vOiptVHOMurC3hYs93M=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1693558373; v=1; b=q54wkEEL0eYC3z0YD1yBQP4nzgwIlOcK87niMxSGI/ZM1pGZYIPPmkm/ZvglPtRO7tZe6dGR Fz3+DPT3yQftpByr2+k70l/AcIsnzOESNVBe/GCgMeW+OAaZTBYjBrmUJjPJmGTsGAT7pI6umv/ vplpnCtVEodZ863GBxVmkO94= X-Received: by 127.0.0.2 with SMTP id ikTDYY7687511xnwKOpIFFso; Fri, 01 Sep 2023 01:52:53 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web11.1157.1693551972631804503 for ; Fri, 01 Sep 2023 00:06:12 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10819"; a="375056288" X-IronPort-AV: E=Sophos;i="6.02,218,1688454000"; d="scan'208";a="375056288" X-Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Sep 2023 00:06:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10819"; a="739835166" X-IronPort-AV: E=Sophos;i="6.02,218,1688454000"; d="scan'208";a="739835166" X-Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga002.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 01 Sep 2023 00:06:10 -0700 X-Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 1 Sep 2023 00:06:09 -0700 X-Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 1 Sep 2023 00:06:09 -0700 X-Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27 via Frontend Transport; Fri, 1 Sep 2023 00:06:09 -0700 X-Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.170) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Fri, 1 Sep 2023 00:06:08 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g09NrMe9xCn95cxcb1ZiKiCIz/ycvy3kZgUgAWybr/S0hstt9DpYbr3pc9cEJX5M3cUMhuyjCSDkdvxg8Bvid+Wx3fBEuL9t9DkpSeqyoMLAeJ8awAUfjoRWyeQg42yaKzPKrSzeaN3YmKHLumg0YCHeD+6u9Jnalda0nYD8j54r+FyvG+vgM7tsVZ66wUTGD0q+QKaGPxA4K9Gm0Y5f2AVbZ5Kb/GsrLIFYissPgF6ePIWjRZWazuqOx89PeDS7vVbFtKWXhTsghRv9/YqCnvATSqUMfJKwmsCyn3/wv24MbH6C5C4uSSufyPzD3CzPN9UWxc0kgQa+QTZNeFHnhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=sRDkCPoY6CVcSWvMsNnWM5dr9cRV2zC8TQ44lhRa8Gw=; b=NQLfOLnmGPYXLUIxnNYHL4dPpC1yItWu65VdYSb0c4lMhCrFRq+WETNku3WK7HZFvA5G7gznK02zQUcvsCFWy/GDITHxTRYq2YU6CeRR1mCvizFxwwCvWVoO1YOirPDVgpsFbc4lytZhSD10rwGXN85l+bMorca1gFByRxeem0ng9B96t4UbTwhOp5+04kO6kED2Gnzotj6wRliH2sSYUEGVzrHUZZfkz42ji0kz9MNU1xGxs79WAjJdsmcjnPRZVC8s8+oHvSpUOsyfthdnblpRtWWkZSo9ciMmdKAG9Q95ale423OY4/YujP/mRFOUMv4unR/GHKiRQ8TW4+hIng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none X-Received: from BN6PR11MB4004.namprd11.prod.outlook.com (2603:10b6:405:7c::24) by SJ2PR11MB7519.namprd11.prod.outlook.com (2603:10b6:a03:4c0::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.22; Fri, 1 Sep 2023 07:06:06 +0000 X-Received: from BN6PR11MB4004.namprd11.prod.outlook.com ([fe80::5d97:5988:7682:1d62]) by BN6PR11MB4004.namprd11.prod.outlook.com ([fe80::5d97:5988:7682:1d62%7]) with mapi id 15.20.6745.023; Fri, 1 Sep 2023 07:06:05 +0000 From: "Lien, HoraceX" To: "Kinney, Michael D" , "devel@edk2.groups.io" CC: "Liu, Zhiguang" , "Bi, Dandan" , "Zeng, Star" , "Gao, Zhichao" Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/SmbiosDxe: Fix BcdRevision is not match with SMBIOS version Thread-Topic: [edk2-devel] [PATCH] MdeModulePkg/SmbiosDxe: Fix BcdRevision is not match with SMBIOS version Thread-Index: AQHZ2yI5ZipEk9zZa0SyA8s1H3WJpLAEkQEAgAD4/jA= Date: Fri, 1 Sep 2023 07:06:04 +0000 Message-ID: References: <0439b4b435989b2604d325451ae0fa6b70bb0a20.1693386097.git.horacex.lien@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BN6PR11MB4004:EE_|SJ2PR11MB7519:EE_ x-ms-office365-filtering-correlation-id: c60720a8-acee-4189-c9ae-08dbaab9e85c x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: CDnlB73flREK3uMjbbpw8OKqIWsWDmodrWFMgzuWg1IYrE7Gn4i2boeYflqX64cB4haNwjhsaAv+MsnY2Y6StPnzQG1XWTfj7a2QvYviKNQNGb7nBSlcj8pmlEOfNiGBJgpSsCdNRRWoKMkIB07Ud/6K9vZx7sG+9y+laQDjvo+E6RN1rvPm79Haz3sli2vz6wElzioZaoj9Ak/xYhMCDw+f/M+WSIkb/hunavhF+i6BdJwK5oUg9qFyAJv3FpV1KDDINebw9ZvxCWU+wMPrwvbw9l9Rhpm2Rp03qg8+bSC3rgBfx/FIV4D6CIlcAEYxox5/uLiNVuiNA+RP5xg7SDBn2Y0dvcw99PJtW1puG739PwXjuMGLqcPWWYKmZ9/FME05LsAnSmp5MyxbDCD7456pI0kVHhgP6IQbhEPDjWMwq7PnxvG0FbO0wLLaP6xZPkBJm/mgqYGE2ajDcGU40nE2eYIFFizXdvgqNhE7p7Q/xer6IIPTQXNCNowI5wGVlPNzM/oPh/mebLzKMtwZ8BvPBx4GRO91Jdsdxk7a7HatwT0yI/XnU268cnK7EmoK8zrjoK0ZIOIllfWxTUmeDpNXcwybkW3awAsod5+jV9j0wZsEICSfy2NJBySE+tBSxt11HDH23veR1B26NfMgIA== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?dQaU9GZGKOyoBWaLum/wley2/DA5ilggTbvR7l0S3Cty9B4efRwodpRFF0ai?= =?us-ascii?Q?AGFYPKdWphs/czZRXE2yYxBts++BPXYKXVRjcSJpYkDxZ0liQnOTxn9cVG69?= =?us-ascii?Q?rCech6MFhXnNRGkXR0Qcpp57eScEtxAfO+GhIqTsQmkuc9fGxhV+HxVzcTBI?= =?us-ascii?Q?I+vjGCs1TQ0I3WJhpP6UjQbTahWQ9ErwqTCeuYGPcgD3KSjK8Ma/YwV6cd4W?= =?us-ascii?Q?5Ja1lm2HkzUWdTVRMiDtRMDjbbyYyk/as00SO5I/a80WLbhL68+Nfp1f5cLW?= =?us-ascii?Q?S+fXr5xH+ve16IUNUyUEVZN2VYNgidV2g1A0xJjo7asG9rEDYv7ki5Sqy5Hs?= =?us-ascii?Q?Fk0rH3cHZRZQ2JpgV5s03qBQ9rCZytKsqYcTLFvbIAJqAYpAQJoexLwO+/We?= =?us-ascii?Q?CVmRjJJoDTif4+6WylD+tMO3kM8dFASqYT+9FNu0M5bF8sNxKqkW6mNWYRfT?= =?us-ascii?Q?1TBN0fAQOO9820HN5W3yHYygV3kZdEgl8Idlq7tXwtoNPPKv/bXA8yXyfzRX?= =?us-ascii?Q?UoGbnA4gfPPF3ePcPoGkYmO/d6m2/w7UZYlGfJWRGhSlcb7N4bwATRyje4tE?= =?us-ascii?Q?3PSp3U2T+aq3WevlJRW6GH2p/Krb7Aw2KNXwt4VYOR2x9mvTAtH0aXaG/IM8?= =?us-ascii?Q?++cC5O91/CJ1Q01/P2Q01Ny08rLOHUKTjCHgYavcOC0kjKDjsKQv5vE/N1Yq?= =?us-ascii?Q?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-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN6PR11MB4004.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c60720a8-acee-4189-c9ae-08dbaab9e85c X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Sep 2023 07:06:04.6678 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: EDnOOOHUB9VSU6K83tSScEipbFWQIjAUJAOknxUyHBQqdKFtslsl6jmQMzFexAYrmqaT7cz/XVAYL+mJsyYMRg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR11MB7519 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,horacex.lien@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: j8BV7X2WURFJip8SwwpY1iFfx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=q54wkEEL; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") Hi Mike, I have change code to=20 EntryPointStructureData.SmbiosBcdRevision =3D ((mPrivateData.Smbios.MajorVe= rsion & 0x0f) << 4) | (mPrivateData.Smbios.MinorVersion & 0x0f); Add &0x0F to mask upper nibble bit, do we still need to guarantee that rang= e is between 0-9? Because the old code only filtered 4 bits, instead of acc= urately filtering the number range 0-9. Thanks, Horace Lien -----Original Message----- From: Kinney, Michael D =20 Sent: Thursday, August 31, 2023 11:56 PM To: devel@edk2.groups.io; Lien, HoraceX Cc: Liu, Zhiguang ; Bi, Dandan ; Zeng, Star ; Gao, Zhichao ; = Kinney, Michael D Subject: RE: [edk2-devel] [PATCH] MdeModulePkg/SmbiosDxe: Fix BcdRevision i= s not match with SMBIOS version Are mPrivateData.Smbios.MajorVersion and mPrivateData.Smbios.MinorVersion g= uaranteed to be in range 0..9? Mike > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of=20 > horacex.lien@intel.com > Sent: Wednesday, August 30, 2023 2:13 AM > To: devel@edk2.groups.io > Cc: Lien, HoraceX ; Liu, Zhiguang=20 > ; Bi, Dandan ; Zeng, Star=20 > ; Gao, Zhichao > Subject: [edk2-devel] [PATCH] MdeModulePkg/SmbiosDxe: Fix BcdRevision=20 > is not match with SMBIOS version >=20 > From: HoraceX Lien >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4544 >=20 > These value of Major/Minor version are updated from SMBIOS memory=20 > data, but BCD Revision is updated from PCD PcdSmbiosVersion. > We should also update PCD PcdSmbiosVersion from SMBIOS memory data, to=20 > ensure that get consistent version value. >=20 > Cc: Zhiguang Liu > Cc: Dandan Bi > Cc: Star Zeng > Cc: Zhichao Gao > Signed-off-by: HoraceX Lien > --- > MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c > b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c > index 1a86e69d3c..e3f6215033 100644 > --- a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c > +++ b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c > @@ -1072,7 +1072,7 @@ SmbiosCreateTable ( > DEBUG ((DEBUG_INFO, "SmbiosCreateTable: Initialize 32-bit entry=20 > point structure\n")); >=20 > EntryPointStructureData.MajorVersion =3D > mPrivateData.Smbios.MajorVersion; >=20 > EntryPointStructureData.MinorVersion =3D > mPrivateData.Smbios.MinorVersion; >=20 > - EntryPointStructureData.SmbiosBcdRevision =3D (UINT8)((PcdGet16 > (PcdSmbiosVersion) >> 4) & 0xf0) | (UINT8)(PcdGet16 (PcdSmbiosVersion)=20 > & 0x0f); >=20 > + EntryPointStructureData.SmbiosBcdRevision =3D > (mPrivateData.Smbios.MajorVersion << 4) |=20 > mPrivateData.Smbios.MinorVersion; >=20 > PhysicalAddress =3D 0xffffffff; >=20 > Status =3D gBS->AllocatePages ( >=20 > =20 > AllocateMaxAddress, >=20 > -- > 2.31.1.windows.1 >=20 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#108150):=20 > https://edk2.groups.io/g/devel/message/108150 > Mute This Topic: https://groups.io/mt/101057293/1643496 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub > [michael.d.kinney@intel.com] > -=3D-=3D-=3D-=3D-=3D-=3D >=20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108227): https://edk2.groups.io/g/devel/message/108227 Mute This Topic: https://groups.io/mt/101057293/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-