From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a01:111:f400:fe1f::829; helo=eur01-ve1-obe.outbound.protection.outlook.com; envelope-from=marvin.haeuser@outlook.com; receiver=edk2-devel@lists.01.org Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01olkn0829.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe1f::829]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C38C320D7ADEE for ; Sat, 21 Jul 2018 15:17:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=n6V4jQ/FewPaaSxACY4+C6740g/X5gbaB8PuU4l0nRs=; b=gAvkpFtiSo17vv/iJQP928dIrEetWxixaMxRdeh7ApPLcdheU5yYXqEdZG1y4LFAFGvVODvl3EZYbXA5afcoBtMHfwgRBYEuxR4URonpPWk8Pl95bwJ5GPP6WpoytoUYiXM7tcKs/3cTz9DBydlb8WLv4tW0oP+NHY4Ru69OdNzBlBZ61X3l00BGrmqz/4Sm+YFTYc9y5flG6bRRgBh1gAD0BBCTKx9gfD88a81SyPL/7gt/dmg/BNzeWQkZUE5gAusVrCcv13lxP0uKExuj26ntKulD/kmnxCxesQvuBTwaDkbaDo79DeX63ZpXDh8dpH7+kLjwZoxP7SzySwQI4w== Received: from VE1EUR01FT005.eop-EUR01.prod.protection.outlook.com (10.152.2.57) by VE1EUR01HT246.eop-EUR01.prod.protection.outlook.com (10.152.3.228) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.952.17; Sat, 21 Jul 2018 22:17:17 +0000 Received: from VI1PR0801MB1790.eurprd08.prod.outlook.com (10.152.2.57) by VE1EUR01FT005.mail.protection.outlook.com (10.152.2.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.20.952.17 via Frontend Transport; Sat, 21 Jul 2018 22:17:17 +0000 Received: from VI1PR0801MB1790.eurprd08.prod.outlook.com ([fe80::7532:4dc6:e9f7:4765]) by VI1PR0801MB1790.eurprd08.prod.outlook.com ([fe80::7532:4dc6:e9f7:4765%2]) with mapi id 15.20.0973.018; Sat, 21 Jul 2018 22:17:17 +0000 From: =?iso-8859-1?Q?Marvin_H=E4user?= To: "edk2-devel@lists.01.org" CC: "eric.dong@intel.com" , "lersek@redhat.com" Thread-Topic: [PATCH] UefiCpuPkg/CpuMpPei: Correct BIST PPI logic. Thread-Index: AQHUIUCVO4ePb3RRRk+TNRSbXhvcmQ== Date: Sat, 21 Jul 2018 22:17:17 +0000 Message-ID: Accept-Language: de-DE, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1PR0301CA0008.eurprd03.prod.outlook.com (2603:10a6:3:76::18) To VI1PR0801MB1790.eurprd08.prod.outlook.com (2603:10a6:800:5b::15) x-incomingtopheadermarker: OriginalChecksum:AE4463F48C755A80DB1B678D7CA5A91D6B7277380D46F4632B89A74B234A60FD; UpperCasedChecksum:CB9FBC5DE93DAD633158A4830CA9EDB3FCB347700ADB34869D865226A3AAF01A; SizeAsReceived:7439; Count:48 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [PQxBbn6MO0ipCuTI0RJUyFqLjroFipTo] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VE1EUR01HT246; 7:UO9R6VBohs2AHw/KffMGuKdJm5PhIWSG2WbWlgsY+b6ZYEVJoBNlmEyERC9J6RjDJxvTmicYIOKCjNMB2ayZrgG8xveyicnDjyTCNNAYAoq20HHU5iEPwnUr0xjnXZlqOct6eTmFPHCrZVdOec2AaS5vRV85sAXsW6DmIpoJuACj/jgSC5uUKAwN59Hx+ZNlP4pP6n/KvKpyEh7aZb11PE0ppWdp08l5j8UGG3Pdh6tjwEy2D5xPeaTAwwG0dhpI x-incomingheadercount: 48 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1603101448)(1601125500)(1701031045); SRVR:VE1EUR01HT246; x-ms-traffictypediagnostic: VE1EUR01HT246: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(82015058); SRVR:VE1EUR01HT246; BCL:0; PCL:0; RULEID:; SRVR:VE1EUR01HT246; x-forefront-prvs: 074040B844 x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(6029001)(189003)(199004)(8676002)(81156014)(55016002)(8936002)(14454004)(256004)(97736004)(5640700003)(2501003)(386003)(74316002)(68736007)(305945005)(72206003)(56003)(14444005)(5250100002)(86362001)(6346003)(19627235002)(217873002)(106356001)(4326008)(26005)(1857600001)(2900100001)(5660300001)(82202002)(476003)(6916009)(87572001)(104016004)(426003)(2351001)(6436002)(7696005)(54906003)(102836004)(486006)(25786009)(33656002)(20460500001)(99286004)(105586002); DIR:OUT; SFP:1901; SCL:1; SRVR:VE1EUR01HT246; H:VI1PR0801MB1790.eurprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:; received-spf: None (protection.outlook.com: outlook.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Marvin.Haeuser@outlook.com; x-microsoft-antispam-message-info: Lg2PkR15rJ0Te2nrAEtprFb5PQ1gbVAUq1SS+8VkP17WNskrEoCbjOPu9ppe3iZvT/BGLJwRl/JCZhF6bvz+BD/+RHKTkRgCkz8mmYXv9tnQkKraubKY+OMvNY74CfgA0XXJlNk2LhLC1HpRc8aRuXIBUTfNFMsLGNucIpZ5q0hY2UEdz022iBvAy3G3rmREDb+YOCBdd9vViqbEePMtt85LgwPgUdcwkOuCBlfICSo= MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-Network-Message-Id: 780d88f5-91fe-458d-7142-08d5ef57b81c X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jul 2018 22:17:17.8693 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR01HT246 Subject: [PATCH] UefiCpuPkg/CpuMpPei: Correct BIST PPI logic. 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: Sat, 21 Jul 2018 22:17:24 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Currently, the SecPlatformInformation2 PPI is installed when either there is none present or the present one doesn't lack data. Update the logic to only install the SecPlatformInformation2 PPI when it's not already installed so that an up-to-date PPI remains the only one and unchanged. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marvin Haeuser --- UefiCpuPkg/CpuMpPei/CpuBist.c | 22 +++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/UefiCpuPkg/CpuMpPei/CpuBist.c b/UefiCpuPkg/CpuMpPei/CpuBist.c index 20728525e2d9..5312d9f01dc8 100644 --- a/UefiCpuPkg/CpuMpPei/CpuBist.c +++ b/UefiCpuPkg/CpuMpPei/CpuBist.c @@ -275,18 +275,20 @@ CollectBistDataFromPpi ( (UINTN) BistInformationSize ); =20 - if (SecPlatformInformation2 !=3D NULL && NumberOfData < NumberOfProcesso= rs) { - // - // Reinstall SecPlatformInformation2 PPI to include new BIST informati= on - // - Status =3D PeiServicesReInstallPpi ( - SecInformationDescriptor, - &mPeiSecPlatformInformation2Ppi - ); - ASSERT_EFI_ERROR (Status); + if (SecPlatformInformation2 !=3D NULL) { + if (NumberOfData < NumberOfProcessors) { + // + // Reinstall SecPlatformInformation2 PPI to include new BIST informa= tion + // + Status =3D PeiServicesReInstallPpi ( + SecInformationDescriptor, + &mPeiSecPlatformInformation2Ppi + ); + ASSERT_EFI_ERROR (Status); + } } else { // - // Install SecPlatformInformation2 PPI to include new BIST information + // Install SecPlatformInformation2 PPI // Status =3D PeiServicesInstallPpi (&mPeiSecPlatformInformation2Ppi); ASSERT_EFI_ERROR(Status); --=20 2.18.0.windows.1