From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web10.3130.1602557204295300585 for ; Mon, 12 Oct 2020 19:46:44 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=QVWAezzM; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: ray.ni@intel.com) IronPort-SDR: G/F/xIy2D0Iy8VFmNThgATPyWvDOaGWmHp2BEImDXecFt3Wq0rKy9y0ufMR+aaGu3C4p716nAP VzvFoHEhacqA== X-IronPort-AV: E=McAfee;i="6000,8403,9772"; a="162369269" X-IronPort-AV: E=Sophos;i="5.77,369,1596524400"; d="scan'208";a="162369269" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2020 19:46:43 -0700 IronPort-SDR: PqaW9m3ojjeQCuFvFRoyCGw6adawIJfhitD45+XExiMAdqozYmYGgaMGDSLBQrAYZ1KnnALRlb fLx1yatp7CAQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,369,1596524400"; d="scan'208";a="390130586" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga001.jf.intel.com with ESMTP; 12 Oct 2020 19:46:43 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 12 Oct 2020 19:46:42 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 12 Oct 2020 19:46:42 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Mon, 12 Oct 2020 19:46:42 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GGYUHzcGfxVzeCt9+FYvwleSRaA8S5+AIEiIV3SfsxyOK/EVvS4Nu0Zmeiq7XGc9XenKFebVztIjIszY5wP7cZhMmWg9yEtnraPT+q3MAWG4mTpxLFhVCIolXxA7hWRfb7u3ZkfARmuvDO3cv9TgrdtV+MSrIGzwFKZTnF+zRpHjdC0b/xs1TUQripApyXhLvVx8JWKYFXEDhll1CL0a7h0y5VXOUbx6Id4D6fCTR2AKl46q3uWf4Q9iRhVQJCAAi9dpu44jf82asrOf5qx7M89YgvcR+cEfqdvDDgfALgnYY0z6hI1sx1NtHYdfGj8XEnVZzM0Q6QftW5nmDJYOVg== 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-SenderADCheck; bh=vxGOeBzAbYoXGum7/3nitjwPkHoiAls01vd0TT3wZaQ=; b=eH4GJ62EKjTz4NrgCkd2y8qZizVMbiZDLms14Y8T75W90xC+v8kH4A7DwkP9pZnHYBu/J+V8ExjYDtaqvLX4yqM7Wlvwo0pQtWSs+3K6KtS1YaZ9R8GHqVSOMAJiFOyk334gkSPwHhUMWZjB9sgzEn06vt10a2L7oWzhVAHlVT5uO59qtHzOU/T1gDdHq6G9Ic2pnqlb2iLPHKuQtzlwgzREWs5DEZqQBRGWywgAagCvyQqWyJz4xLRORi6kgVbYwy0Sq8Jxgk7eb968I7wk6BeAo7m2N7lSF1IBvXpq+dbF+Hi770YJA4zC1PjwH9uIyxepRamKG6EIfNS/JuuUUw== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vxGOeBzAbYoXGum7/3nitjwPkHoiAls01vd0TT3wZaQ=; b=QVWAezzMafmzubDY7Zl6fXUgXlb9dC5TOqdmvzsKTu0gAvNit7hQKE9Wd9R3tfhup8OGw5a7rC3vVtTlpn6dkhz/tltFD2R6W4D6S9vp1cJu21UOGSKa5FUUM6aXQv+16W19bWDwDM0gu5Hpzw0Nlf/UEmOvpJmeCfnmmIkw6Xw= Received: from CO1PR11MB4930.namprd11.prod.outlook.com (2603:10b6:303:9b::11) by MWHPR11MB1615.namprd11.prod.outlook.com (2603:10b6:301:c::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.21; Tue, 13 Oct 2020 02:46:37 +0000 Received: from CO1PR11MB4930.namprd11.prod.outlook.com ([fe80::9804:f9c4:d0d7:9961]) by CO1PR11MB4930.namprd11.prod.outlook.com ([fe80::9804:f9c4:d0d7:9961%3]) with mapi id 15.20.3455.029; Tue, 13 Oct 2020 02:46:37 +0000 From: "Ni, Ray" To: "Fu, Siyuan" , "Li, Aaron" , "devel@edk2.groups.io" CC: "Chaganty, Rangasai V" Subject: Re: [PATCH v1 1/1] IntelSiliconPkg/ShadowMicrocodePei: Add PCD for shadowing all microcode. Thread-Topic: [PATCH v1 1/1] IntelSiliconPkg/ShadowMicrocodePei: Add PCD for shadowing all microcode. Thread-Index: AQHWcH3xyuJZ6EUoG028rAn2IG6CzKl2AuzAgAFBYQCAAGSP4IAdgNSAgAALapA= Date: Tue, 13 Oct 2020 02:46:37 +0000 Message-ID: References: <20200812075452.9054-1-aaron.li@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [222.67.55.216] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b9f674ab-f20c-435f-739c-08d86f2234b9 x-ms-traffictypediagnostic: MWHPR11MB1615: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: eUKKkUH4xLF6T8FM7gPFomwn0FwB+HtigNrLrgVcbRkhj6GcSluKjt8NCEyezKqCCXsjFqESWcHHCulKZZPs6IhB+ApB/ownbLhXahdO7/HfvjiyyJFHSLSq9fn0el8jUb7I695+7NeNX7F6KMNerKaD5LGf0IRje8PjmtxwxH0QMHOT5jAbOFIdkPKnwmmAmCkbtP257l+6C1oThAnkwBF/+qZPGzRSRc0AI4/fBGQXYVyZgT9UMvd/e+pZ1h3BHN7RJcdw2gAKZr9TY4hDU0nElKS7RWQRHApYbZCtdPZjpzWMFOwGUn65F1AjndxI/AWOuNvQrJgqCfgDp2ynHXbjsw/X1ENAUnICrBwsU+9VZLDWffOGWMbtUZtk6rIXozDbZSQcJsfwLBAxkhS1NUrgPIzHVxhM7OrDiWX7aQV7h6dO26eAkr/gGdsPIbNbto2gPAl7jZ7SPpi5yu+6dQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR11MB4930.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(376002)(136003)(346002)(39860400002)(366004)(76116006)(66556008)(64756008)(83380400001)(66946007)(66476007)(66446008)(55016002)(33656002)(966005)(7696005)(52536014)(6506007)(83080400001)(478600001)(53546011)(71200400001)(8936002)(8676002)(9686003)(5660300002)(86362001)(4326008)(110136005)(186003)(26005)(2906002)(316002)(107886003)(14943795004);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: q/mHIDDm0ME4yODPbnKtdDKxtqfCErgAlHlDKxw9oaA6SzpC55jD3tR1EaaDbaX3DEWz++PTkIjaQB7N7+PQO03IjvwZxAwKgAaalAwrw2rL9mWkwNZfzk5oq0jqSTU0RP06zz3vvV4vZoZhg+5UDqm8aQkTq8rL8EOmFOJiNBu0QjIJOkPGwXCj7rEBh5znj5ZyQ16QODVU0IFRw3kHRKkc+qDn84asA/qYGIGE/ii7SY6sxjfNaHmJ/wIjeR2mhDj8gVvAl4PTRdSVQIABK7NmNNVs0P30gDS9hO7wbwrPfR0RngNrvbigh+49BcWti5s4DlFCWwJ2afoxEE6ZS59X1QZFDgreTA9/v0g73YUoCD6LO8fOPkXs9HykojP9yYJiVfuKuNXF8d2sCwuy1cI0QsLLiAGJshqdI9cKI5uXVGyQjs0fX2hxlNe1NfxkMr+32ePZu71hBsYtTZ0fUCZ3p2xQ3D1LMN2tEZqzyD5vcupScBhWr2DA/hCp7lDzEN3vimkeRVfqyVdLtew2Zy+s8BWlFSz22hd/C39dFkX2/li7sifNCWnWZseu1HVelpkT7bgWi4DQ9lJGbN4+Tr2LbPLh0XFw7lsz+4UljWkRm2KIDxONWBSjuC9HtGsTOhDJZcLC7g+/6SjcfceyFw== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4930.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b9f674ab-f20c-435f-739c-08d86f2234b9 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Oct 2020 02:46:37.5930 (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: FiDxOiPkKBcOWOhK0p9rhkGOOiulj9Hsz/TagiPFTa+14MGD1Lc02/Bkc4F1u87x0bO0BibVNNgDzWeCYsMlKg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1615 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni > -----Original Message----- > From: Fu, Siyuan > Sent: Tuesday, October 13, 2020 10:06 AM > To: Ni, Ray ; Li, Aaron ; devel@edk= 2.groups.io > Cc: Chaganty, Rangasai V > Subject: RE: [PATCH v1 1/1] IntelSiliconPkg/ShadowMicrocodePei: Add PCD f= or shadowing all microcode. >=20 > > -----Original Message----- > > From: Ni, Ray > > Sent: 2020=1B$BG/=1B(B9=1B$B7n=1B(B24=1B$BF|=1B(B 16:56 > > To: Li, Aaron ; devel@edk2.groups.io > > Cc: Chaganty, Rangasai V ; Fu, Siyuan > > > > Subject: RE: [PATCH v1 1/1] IntelSiliconPkg/ShadowMicrocodePei: Add PCD= for > > shadowing all microcode. > > > > Aaron, > > I understand the requirement now. > > Can we avoid adding new PCD but re-interpret the ShadowMicrocode() > > parameter to achieve the same result? > > > > For example, we can say when CpuIdCount is 0 and MicrocodeCpuId =3D=3D = NULL, it > > means all microcode need to be shadowed. > > > > The benefit is: platform can use the single interface to control the be= havior. >=20 > Hi, Ray >=20 > It's the platform PEIM (the ShadowMicrocode() function itself) to decide = which > Microcode it should shadow to memory, not the caller. So we can't use the= input > Parameter to control the behavior. >=20 > Thanks. > Siyuan >=20 > > > > Thanks, > > Ray > > > > > -----Original Message----- > > > From: Li, Aaron > > > Sent: Thursday, September 24, 2020 9:38 AM > > > To: Ni, Ray ; devel@edk2.groups.io > > > Cc: Chaganty, Rangasai V ; Fu, Siyuan > > > > > > Subject: RE: [PATCH v1 1/1] IntelSiliconPkg/ShadowMicrocodePei: Add P= CD for > > > shadowing all microcode. > > > > > > Hi Ray, > > > > > > Accroding to > > > > > https://edk2.groups.io/g/devel/files/Designs/2020/0214/Support%20the%20= 2n > > d > > > %20Microcode%20FV%20Flash%20Region.pdf > > > The ShadowMicrocodePei provide a FIT based shadow microcode ppi to > > > MpInitLib. It's needed. > > > > > > > > > Best, > > > Aaron > > > > > > > -----Original Message----- > > > > From: Ni, Ray > > > > Sent: Wednesday, September 23, 2020 2:25 PM > > > > To: Li, Aaron ; devel@edk2.groups.io > > > > Cc: Chaganty, Rangasai V ; Fu, Siyua= n > > > > > > > > Subject: RE: [PATCH v1 1/1] IntelSiliconPkg/ShadowMicrocodePei: Add= PCD > > > > for shadowing all microcode. > > > > > > > > MpInitLib already contains logic to shadow microcode to memory. > > > > Is this still needed? > > > > > > > > > -----Original Message----- > > > > > From: Li, Aaron > > > > > Sent: Wednesday, August 12, 2020 3:55 PM > > > > > To: devel@edk2.groups.io > > > > > Cc: Ni, Ray ; Chaganty, Rangasai V > > > > > ; Fu, Siyuan > > > > > Subject: [PATCH v1 1/1] IntelSiliconPkg/ShadowMicrocodePei: Add P= CD for > > > > > shadowing all microcode. > > > > > > > > > > This patch is to add a PCD PcdShadowAllMicrocode to support shado= wing > > > > > all microcode patch to memory. > > > > > > > > > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2891 > > > > > > > > > > Signed-off-by: Aaron Li > > > > > Cc: Ray Ni > > > > > Cc: Rangasai V Chaganty > > > > > Cc: Siyuan Fu > > > > > --- > > > > > > > > > > > > > > Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicroco= deP > > > > ei.c > > > > > | 4 ++++ > > > > > > > > > > > > > > Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicroco= deP > > > > ei.i > > > > > nf | 3 +++ > > > > > Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec = | 7 > > > +++++++ > > > > > 3 files changed, 14 insertions(+) > > > > > > > > > > diff --git > > > > > > > > > a/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicro= cod > > > > ePei > > > > > .c > > > > > > > > > b/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicro= cod > > > > ePei > > > > > .c > > > > > index 8d6574f66794..5c7ee6910c8e 100644 > > > > > --- > > > > > > > > > a/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicro= cod > > > > ePei > > > > > .c > > > > > +++ > > > > > > > > > b/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicro= cod > > > > ePei > > > > > .c > > > > > @@ -132,6 +132,10 @@ IsMicrocodePatchNeedLoad ( > > > > > CPU_MICROCODE_EXTENDED_TABLE *ExtendedTable; > > > > > > > > > > UINTN Index; > > > > > > > > > > > > > > > > > > > > + if (FeaturePcdGet (PcdShadowAllMicrocode)) { > > > > > > > > > > + return TRUE; > > > > > > > > > > + } > > > > > > > > > > + > > > > > > > > > > // > > > > > > > > > > // Check the 'ProcessorSignature' and 'ProcessorFlags' in micr= ocode > > patch > > > > > header. > > > > > > > > > > // > > > > > > > > > > diff --git > > > > > > > > > a/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicro= cod > > > > ePei > > > > > .inf > > > > > > > > > b/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicro= cod > > > > ePei > > > > > .inf > > > > > index 019400ab31da..581780add891 100644 > > > > > --- > > > > > > > > > a/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicro= cod > > > > ePei > > > > > .inf > > > > > +++ > > > > > > > > > b/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicro= cod > > > > ePei > > > > > .inf > > > > > @@ -39,5 +39,8 @@ [Guids] > > > > > gEdkiiMicrocodeShadowInfoHobGuid > > > > > > > > > > gEdkiiMicrocodeStorageTypeFlashGuid > > > > > > > > > > > > > > > > > > > > +[Pcd] > > > > > > > > > > + gIntelSiliconPkgTokenSpaceGuid.PcdShadowAllMicrocode > > > > > > > > > > + > > > > > > > > > > [Depex] > > > > > > > > > > TRUE > > > > > > > > > > diff --git a/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec > > > > > b/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec > > > > > index e4a7fec3a3ea..3a12fe99fac6 100644 > > > > > --- a/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec > > > > > +++ b/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec > > > > > @@ -76,6 +76,13 @@ [Protocols] > > > > > # Include/Protocol/PlatformDeviceSecurityPolicy.h > > > > > > > > > > gEdkiiDeviceSecurityPolicyProtocolGuid =3D {0x7ea41a99, 0x5e32= , 0x4c97, > > > > > {0x88, 0xc4, 0xd6, 0xe7, 0x46, 0x84, 0x9, 0xd4}} > > > > > > > > > > > > > > > > > > > > +[PcdsFeatureFlag] > > > > > > > > > > + ## Indicates if all microcode update patches shall be shadowed= to > > > > memory. > > > > > > > > > > + # TRUE - All microcode patches will be shadowed.
> > > > > > > > > > + # FALSE - Only the microcode for current present processors = will be > > > > > shadowed.
> > > > > > > > > > + # @Prompt Shadow all microcode update patches. > > > > > > > > > > + > > > > > > > > > gIntelSiliconPkgTokenSpaceGuid.PcdShadowAllMicrocode|FALSE|BOOLEAN| > > > > 0x > > > > > 00000006 > > > > > > > > > > + > > > > > > > > > > [PcdsFixedAtBuild, PcdsPatchableInModule] > > > > > > > > > > ## Error code for VTd error.

> > > > > > > > > > # EDKII_ERROR_CODE_VTD_ERROR =3D (EFI_IO_BUS_UNSPECIFIED | > > > > > (EFI_OEM_SPECIFIC | 0x00000000)) =3D 0x02008000
> > > > > > > > > > -- > > > > > 2.23.0.windows.1