From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web12.1150.1578034770819055881 for ; Thu, 02 Jan 2020 22:59:30 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: siyuan.fu@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jan 2020 22:59:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,389,1571727600"; d="scan'208";a="419940638" Received: from shwdeopenpsi787.ccr.corp.intel.com ([10.239.158.56]) by fmsmga005.fm.intel.com with ESMTP; 02 Jan 2020 22:59:29 -0800 From: "Siyuan, Fu" To: devel@edk2.groups.io Cc: Eric Dong , Ray Ni Subject: [Patch 1/1] UefiCpuPkg: Always load microcode patch on AP processor. Date: Fri, 3 Jan 2020 14:59:27 +0800 Message-Id: <20200103065927.2148-1-siyuan.fu@intel.com> X-Mailer: git-send-email 2.19.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This patch updates the microcode loader to always perform a microcode detect and load on both BSP and AP processor. This is to fix a potential microcode revision mismatch issue in below situation: 1. Assume there are two microcode co-exists in flash: one production version and one debug version microcode. 2. FIT loads production microcode to BSP and all AP. 3. UefiCpuPkg loader loads debug microcode to BSP, and skip the loading on AP. As a result, different microcode patches are loaded to BSP and AP, and trigger microcode mismatch error during OS boot. Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=2431 Cc: Eric Dong Cc: Ray Ni Signed-off-by: Siyuan Fu --- UefiCpuPkg/Library/MpInitLib/Microcode.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/UefiCpuPkg/Library/MpInitLib/Microcode.c b/UefiCpuPkg/Library/MpInitLib/Microcode.c index 3da5bfb9cf2f..fa6f9681e55a 100644 --- a/UefiCpuPkg/Library/MpInitLib/Microcode.c +++ b/UefiCpuPkg/Library/MpInitLib/Microcode.c @@ -1,7 +1,7 @@ /** @file Implementation of loading microcode on processors. - Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.
+ Copyright (c) 2015 - 2020, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -105,12 +105,6 @@ MicrocodeDetect ( CurrentRevision = GetCurrentMicrocodeSignature (); IsBspCallIn = (ProcessorNumber == (UINTN)CpuMpData->BspNumber) ? TRUE : FALSE; - if (CurrentRevision != 0 && !IsBspCallIn) { - // - // Skip loading microcode if it has been loaded successfully - // - return; - } GetProcessorLocationByApicId (GetInitialApicId (), NULL, NULL, &ThreadId); if (ThreadId != 0) { -- 2.19.1.windows.1