From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web09.21096.1659928928541349043 for ; Sun, 07 Aug 2022 20:22:08 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=ayRhno/t; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659928928; x=1691464928; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=rd5VywafAzCrwAtGKJvrGK2oAcQCHRKbuKxqCV9oiF8=; b=ayRhno/th8O6Z1DQqJcwDpybN8Wns3l+mIMqhbCnVGHcDssFHfVAkEWB ZevQ/hIaTP0xReTgH/NS1/DobX92pec4lBTsUzYbXhPMc2Oy8kspQ5V7T ewiwEvMunSHl2YJ2gIORHeFiC+1HmZgFo4Gjm9L/pD1TM108TRIjUs/eM YjiLXyjVzhQODkCFmiCVgvA5ZdL7mToUkDA1Y+jpgXpicKafdCe075rXW X8pFiV8VDpqhcuiuOBCeTX9M4vvERIHDfo6Zch+x8a7AxcIvKzEJdkEc4 LwmUqLzO0fZ5M0sCjlZNjkatAovY22beAAtpeD3CWGkjA6fptDYT4Ve6R A==; X-IronPort-AV: E=McAfee;i="6400,9594,10432"; a="270266260" X-IronPort-AV: E=Sophos;i="5.93,221,1654585200"; d="scan'208";a="270266260" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Aug 2022 20:22:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,221,1654585200"; d="scan'208";a="707274748" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by fmsmga002.fm.intel.com with ESMTP; 07 Aug 2022 20:22:08 -0700 Received: from orsmsx604.amr.corp.intel.com (10.22.229.17) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Sun, 7 Aug 2022 20:22:07 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28 via Frontend Transport; Sun, 7 Aug 2022 20:22:07 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.177) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.28; Sun, 7 Aug 2022 20:22:07 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X8EkW5709vheAfbl7KMoSVH4c1axEfSXIKGC7JhLBSNw2hXScRKzERsi+/NvqBuNrfkJYjFmtJSVBea13PZgolko29+pAjRwc1QT3LK//mZjqwL/QBORuNMukiy30s5bFZKUixEV9p+mXBjs9uT8yerRk33Y3vkUSwg6I9GNPj3zLJ/oiQo+rKJHS0qfmEKZd/pb4olpuPUCSaqq+WnR648EzYP0VbToZdVkk0Nfpxo/TB+YAVMp7++t53jqHuhhv6PI9T5fxpRXHPQvDismz8U17+Ek26qC5nn9OeAgz2qbMzK8cbqh90st5YZSW5HgdgztrCXBybxum5NFGJq+Tw== 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=H2fZVNz63QTnjB1dUyXMP/c4cCppy3m7ym5ySVgMU20=; b=a3/61609JhQyiLLnL6H7jMhENsR5AFX/klCmY8qq+0n4GQ7wsT6XpQxVT05WH5xrsuvkaVKDKN0IKoiTFm+JCO+PxpCoC+YVHb/2W3TMnJpGd0pxIuVC0RFlbcQdbl5zEXTFhhmCo+vHn89pO+03TOw/gcMOYhWPQ/IbHtsicd7OMwScrsc2ns/QEUIOHQ3Z/A5XHjLkMYIyKF/TMoEEplnlMBiypsokBuWnycTxk3rN2eqM8yOhrU3bZVAfXQBPNQpilwNOswNmbflTXoAVxNxOst+pkUOG0/gbpI/8H9HzZ1Lwa57sfuOEMEbpl9Vnp7Uzr2Y0PaFpdPTTJP4dxg== 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 Received: from MWHPR11MB1631.namprd11.prod.outlook.com (2603:10b6:301:10::10) by BN9PR11MB5338.namprd11.prod.outlook.com (2603:10b6:408:137::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.14; Mon, 8 Aug 2022 03:22:06 +0000 Received: from MWHPR11MB1631.namprd11.prod.outlook.com ([fe80::991b:97a0:7836:5174]) by MWHPR11MB1631.namprd11.prod.outlook.com ([fe80::991b:97a0:7836:5174%10]) with mapi id 15.20.5504.020; Mon, 8 Aug 2022 03:22:05 +0000 From: "Ni, Ray" To: "Liu, KasimX" CC: "devel@edk2.groups.io" , "Dong, Guo" , "Lu, James" , "Guo, Gua" Subject: Re: [PATCH] MdeModulePkg: Update the SMBIOS version by UPL Thread-Topic: [PATCH] MdeModulePkg: Update the SMBIOS version by UPL Thread-Index: AQHYqKfQAidd3yDcnUyAVbyjgYXxqq2kVe8AgAACG1CAAAI2UA== Date: Mon, 8 Aug 2022 03:22:05 +0000 Message-ID: References: <2cb7feba0ba1bb89c4ae34ec9aaa92e68c067f87.1659688813.git.kasimx.liu@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6e5bc93c-5105-48f6-7231-08da78ed2b28 x-ms-traffictypediagnostic: BN9PR11MB5338:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: GDzY4C2NB33Fls2R9XthL0TuwnVyyyIaJLf2aVdZEhBJ18PlaBKvUpSHKj0nv7mi+p1EVCttKUiKedEcckK0RcftJ1o30tqISqFJTNz4WTdngkDIcIHyWOmMo9Qrwy+qflNHgi9lcqrGzon9lt/8HggC/Fh/kzhBgLPBlBeuDT1H/GBCAeiC0BoAIiCZrXheDoDAmfDraRePj509+eIV/UKAeShyplNdXUQlgMa4atGSSynWhQfw2bt6bsdUK8JDZIDXiRGmFmFbbxnn8FVsV8/1Z0w9fZMjKjEK6dYvvY0F7jmGCE/FAEF7eTutNSXIkLsdMns+ji98JJMjFketOSsGKZrQn3QmwaNhxkuZ2Ltx/+/RRBaGlD106ThrtL4UoUkWi1gtkqYZ2sq12uqeS05XGwq2A5AVzNYW1jP4hEEzQPSaodF7ZQs3jLuofdaP9GVyfcSEWwK53u1opEoW/T1Xvupwn05HiYN+ZQnTv+fkESuWyZ7yCtIGKdQ+c4CpLHbDkyl7vG2Pyr6o4KGrxzoj9GkkFTa3qa5pjrUJnGUfYUb26ASbKUp+cQ9sKsxfvuXuq8/axzCEDd4nRvXTLbyjsmj9fGGDIziBM6XeoTAl0OWPPrTPysw+JDtcelwa+2sawBP5W/Ld4ysrmR+jMyKr/hgtAf7pUYvhD+Svi0giEF3O6BXzb3PjyXP8zCHZRHnQVBzIYqhWabbf6OonDzSyoGaMr2Z/Eq/Vp4KyraVS4v8b6WWKD8pse27rHoh4ab/XQxgZW7n770z8CYSuuvIq1GPwnc3OLLv9wlFfUHboAkJdTTz2ZQlpjES6u0S4Cv02rWe1kvY+IRKgawb9kg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR11MB1631.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(39860400002)(396003)(376002)(366004)(136003)(346002)(83380400001)(8936002)(52536014)(6862004)(82960400001)(19627235002)(6636002)(107886003)(71200400001)(6506007)(5660300002)(4326008)(2940100002)(54906003)(7696005)(9686003)(53546011)(26005)(316002)(41300700001)(15650500001)(186003)(64756008)(66556008)(66476007)(76116006)(66446008)(66946007)(2906002)(55016003)(38070700005)(8676002)(33656002)(38100700002)(86362001)(478600001)(966005)(122000001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?tVHxrinJjfATWP1fA27ndbdZB6WinrjwvCCxExX454lfM9Qa9qNpXoZDWZ4y?= =?us-ascii?Q?99Vl3dyCLnibMXU7bZD6iJrFq8tE6T4nQD/Ua8QLTRPcc0koJXFAKnNtSaCA?= =?us-ascii?Q?CYRv4AVFJpmufB5Vx3g+WGxCMTCLia0PP9oozM77jMGhGlvIJaxslqo7Z+M/?= =?us-ascii?Q?Q7lpXOb+0hYzf1bZTIS5XgOmyrzgsGBZ31zZw/0vSPfpb9MG2BsjwmyvGA41?= =?us-ascii?Q?slkF+Dq1Z79yCfZSQM2z1zkv5GV0bdiI6Wmm9k6TJUNnEtQW8qAtEc5VI7hG?= =?us-ascii?Q?4xnIcXhF+I+n2l0XsNdkKyh6jbtqjTnNMzqBzeJ9ED+NzSigXJ9ceVtPbyAl?= =?us-ascii?Q?TeRFIoFvMdMZS5xevmQYCJI2Tp6i3TwhImbmQGHOIAdZHvBf5vLpCAaR0Ueq?= =?us-ascii?Q?bAZyY+/qtW5Il0TKEndhBBAdwLKu3FqRnfzTOh1ZzafMgJxe4X+Hul7ALWez?= =?us-ascii?Q?C1Pxd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RUyPJ6ZH2ip2L?= =?us-ascii?Q?dXqC5dFCIWRv0mfqmMUYYe7VWTTMoP+7OxTbJZl41/H1o37GYK5rEWjCQNOW?= =?us-ascii?Q?MQ8WfaDoLBuFa6ufY/tdNo0SzCjZ6+78jyA6uqvcLg9SyogO/cxFyZ0mHCoY?= =?us-ascii?Q?n8EKjkmtAbHQB6itI7zmpeA5hxuBmiC/rItdcOXlC2yHvfZ0psGkWF5raCZU?= =?us-ascii?Q?sD803tVn1P34js2B+NE=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1631.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6e5bc93c-5105-48f6-7231-08da78ed2b28 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Aug 2022 03:22:05.2374 (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: ay6sOXl8mQDwzO+LeDdfvFgF0b+fJVe6atDaPDdxMX4RozwyfiYcypHEN+8v4A4osuZlfzQC5fTQWKm9UneCzw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR11MB5338 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Re-send to the mailing list. > -----Original Message----- > From: Ni, Ray > Sent: Monday, August 8, 2022 11:20 AM > To: Liu, KasimX > Subject: RE: [PATCH] MdeModulePkg: Update the SMBIOS version by UPL >=20 > Kasim, > If you read the existing code in RetrieveSmbiosFromHob(), it only uses th= e > HOB data when the data is valid. >=20 > Can you update the patch to: > 1. do not change SmbiosDriverEntryPoint(). (the entrypoint sets the initi= al > version to match to the PCD). > 2. Change the IsValidSmbios20/30Table () to return the version number > stored in hob. > 3. Change RetrieveSmbiosFromHob() to update the version in mPrivateData. > I am not sure if it's ok to update the version after > ParseAndAddExistingSmbiosTable(). Please double check the existing code > logic. >=20 >=20 > Thanks, > Ray >=20 > > > > -----Original Message----- > > From: Liu, KasimX > > Sent: Friday, August 5, 2022 4:46 PM > > To: devel@edk2.groups.io > > Cc: Liu, KasimX ; Dong, Guo ; > > Ni, Ray ; Lu, James ; Guo, Gua > > > > Subject: [PATCH] MdeModulePkg: Update the SMBIOS version by UPL > > > > From: KasimX Liu > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4013 > > > > For the SMBIOS version can be update by UPL,we create the > > gUniversalPayloadSmbios3TableGuid HOB to store the value then updated > > version. > > > > Cc: Guo Dong > > Cc: Ray Ni > > Cc: James Lu > > Cc: Gua Guo > > Signed-off-by: KasimX Liu > > --- > > MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c | 20 > > ++++++++++++++++++-- > > 1 file changed, 18 insertions(+), 2 deletions(-) > > > > diff --git a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c > > b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c > > index 81df59cd0f..5ee76c7129 100644 > > --- a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c > > +++ b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c > > @@ -1746,14 +1746,30 @@ SmbiosDriverEntryPoint ( > > ) { EFI_STATUS Status;+ EFI_HOB_GUID_TYPE *GuidHob= ;+ > > UNIVERSAL_PAYLOAD_SMBIOS_TABLE *Smbiostable;+ > > SMBIOS_TABLE_3_0_ENTRY_POINT *Smbios30EntryPoint;++ GuidHob =3D > > NULL;+ Smbiostable =3D NULL;+ Smbios30EntryPoint =3D NULL; > > mPrivateData.Signature =3D SMBIOS_INSTANCE_SIGNATURE; > > mPrivateData.Smbios.Add =3D SmbiosAdd; > > mPrivateData.Smbios.UpdateString =3D SmbiosUpdateString; > > mPrivateData.Smbios.Remove =3D SmbiosRemove; > > mPrivateData.Smbios.GetNext =3D SmbiosGetNext;- > > mPrivateData.Smbios.MajorVersion =3D (UINT8)(PcdGet16 > > (PcdSmbiosVersion) >> 8);- mPrivateData.Smbios.MinorVersion =3D > > (UINT8)(PcdGet16 (PcdSmbiosVersion) & 0x00ff);++ GuidHob =3D > > GetFirstGuidHob (&gUniversalPayloadSmbios3TableGuid);+ if (GuidHob != =3D > > NULL){+ Smbiostable =3D (UNIVERSAL_PAYLOAD_SMBIOS_TABLE *) (UINTN > > *)(GET_GUID_HOB_DATA (GuidHob));+ Smbios30EntryPoint =3D > > (SMBIOS_TABLE_3_0_ENTRY_POINT *)Smbiostable->SmBiosEntryPoint;+ > > mPrivateData.Smbios.MajorVersion =3D Smbios30EntryPoint- > >MajorVersion;+ > > mPrivateData.Smbios.MinorVersion =3D Smbios30EntryPoint- > >MinorVersion;+ } > > else {+ mPrivateData.Smbios.MajorVersion =3D (UINT8)(PcdGet16 > > (PcdSmbiosVersion) >> 8);+ mPrivateData.Smbios.MinorVersion =3D > > (UINT8)(PcdGet16 (PcdSmbiosVersion) & 0x00ff);+ } InitializeListHea= d > > (&mPrivateData.DataListHead); InitializeListHead > > (&mPrivateData.AllocatedHandleListHead);-- > > 2.32.0.windows.2