From nobody Mon May 13 07:02:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+111522+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+111522+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1700552409; cv=none; d=zohomail.com; s=zohoarc; b=MdNxho6fbnpO7MaME8hbooonIjLZ7OxU2khAn378dKJSEVf2FIgCw019vPrDovePUWEh4Ll2/Qj5T+ypSylNKPFJGLJqmvp2zfME6nIeRfAleFd+hDcRjt6G/e4CBw+U1sMqOqoODlotZIVXj7fEyc2Xc4u2R5Vna21Oz10O0lw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700552409; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=NsRdqUaGVYELcja4YY0z+zeeNgkaAiwMosZDPrmh8A4=; b=GczQX8jGH2wGtLG6n/0kVwTYWnW3j1shd+56sSlJQ912o/c8hqlVIfQZNULA9LO12+YmS7wrPovLOPmrzj7IDjchSrOzUfugUCRy5TRulwHrV0c0o7c9SH///xwGdt0TZsZYH/idqI20ptfD0jRa0nB2Nvd00Tbtml3+EuulizM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+111522+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1700552409930470.6042523123475; Mon, 20 Nov 2023 23:40:09 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=4ce+d7AN30AzjY50gIbWK8zZxbMEuWVv4gAhC3wAPas=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1700552409; v=1; b=R5bllu8Jl6Wjht7Lhp9tfe+1WeB8eaBciP4n/LDpvt71aR+qNZP6VMYo8qDqrmrG8Zmtp/Fg W1xhGMFle0wmdCM5/JhzfoX+VdnSYdRxwiGkviS4EfwK8c/O09Rq/CB0KYC1Eo+C2sdOAG6xePY eaq9knHOLx2FmKefJdX5NG4E= X-Received: by 127.0.0.2 with SMTP id yIEXYY1788612xyk0zyE03ic; Mon, 20 Nov 2023 23:40:09 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mx.groups.io with SMTP id smtpd.web11.30780.1700552401980407888 for ; Mon, 20 Nov 2023 23:40:04 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10900"; a="10449981" X-IronPort-AV: E=Sophos;i="6.04,215,1695711600"; d="scan'208";a="10449981" X-Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Nov 2023 23:40:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,215,1695711600"; d="scan'208";a="7989935" X-Received: from shwdeopenlab813.ccr.corp.intel.com ([10.239.55.230]) by fmviesa002.fm.intel.com with ESMTP; 20 Nov 2023 23:40:02 -0800 From: "Yuanhao Xie" To: devel@edk2.groups.io Cc: xieyuanh , Ray Ni , Eric Dong , Rahul Kumar , Tom Lendacky , Laszlo Ersek Subject: [edk2-devel] [Patch V2 1/3] UefiCpuPkg/MpInitLib:Repeat WakeUpAp of loading microcode,Syncing MTRR. Date: Tue, 21 Nov 2023 15:39:54 +0800 Message-Id: <20231121073956.2741-2-yuanhao.xie@intel.com> In-Reply-To: <20231121073956.2741-1-yuanhao.xie@intel.com> References: <20231121073956.2741-1-yuanhao.xie@intel.com> MIME-Version: 1.0 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,yuanhao.xie@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 19NpDSnOMDXtfbRBWHphhGWsx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1700552411714100007 Content-Type: text/plain; charset="utf-8" This patch replicates the WakeUpAp operation, encompassing both microcode loading and MTRR synchronization, regardless of whether MpHandOff is NULL. The purpose of this patch is to enhance the review process. The separation in this patch is aimed at facilitating a more straightforward review, with the ultimate goal of eliminating the microcode loading functionality for the second time Mp initialization. Cc: Ray Ni Cc: Eric Dong Cc: Rahul Kumar Cc: Tom Lendacky Cc: Laszlo Ersek Signed-off-by: Yuanhao Xie Reviewed-by: Laszlo Ersek Reviewed-by: Ray Ni --- UefiCpuPkg/Library/MpInitLib/MpLib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpIn= itLib/MpLib.c index 9a6ec5db5c..e8ffb99874 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c @@ -2256,9 +2256,11 @@ MpInitLibInitialize ( // in DXE. // CpuMpData->InitFlag =3D ApInitReconfig; + WakeUpAP (CpuMpData, TRUE, 0, ApInitializeSync, CpuMpData, TRUE); + } else { + WakeUpAP (CpuMpData, TRUE, 0, ApInitializeSync, CpuMpData, TRUE); } =20 - WakeUpAP (CpuMpData, TRUE, 0, ApInitializeSync, CpuMpData, TRUE); // // Wait for all APs finished initialization // --=20 2.39.1.windows.1 -=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 (#111522): https://edk2.groups.io/g/devel/message/111522 Mute This Topic: https://groups.io/mt/102724546/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon May 13 07:02:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+111523+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+111523+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1700552407; cv=none; d=zohomail.com; s=zohoarc; b=QdBHUvmM0RV+Hyu0T4/Ln+NEkBF0NoXnL7bRPYfvfGetuu46KoZFixk50fkDx1YiQOC6pufKm7qUqhyCCj4bIq41A5B336jL4OYuG9AO+RHaI1fZPReEMkAX3kWNJbjRrlXo+XuGQNtdgZNO7U8n4Tx7n8mnPd0BCHAI15TtoOk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700552407; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=eO7h0nFwXD4goJPbo3MRROuEaG3LzIBM1IQwYKw/V80=; b=PXtondNa4nwGH/cXanjlIelPZyw+D1rSiPJixMiVrSlTMu2KVX29IGzHpa/YQFF2ZAwaPy34gw05Td4N7/ExvB/CjQstK3U/kFLePPYD+JhUHNFTW/lO6MBbIyChg+gTX9WRDZKVR9hdWFaMt70mOEUGyQXfyWnezUKdvezkbpA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+111523+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1700552407950912.3087768310936; Mon, 20 Nov 2023 23:40:07 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=c2/ukZyUDxrqY/W51gtDLv6gqA+uGk4hMupyel+LAG8=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1700552407; v=1; b=QwHebni8F5MqV5P0LpoJKwBAvlfwKqON6/2blgNKEblgK9mh1sfwjrnBiPwZy4Un29v/KqMx CXtHryZ338GYy7giwSGfR6vIUK5/a3zLCZpfOT82lbmd8REFZ2QLic8bPSB9WXJH+Etgp5yqDfd t3aOpr962NbzJZA3Ru2dcxH0= X-Received: by 127.0.0.2 with SMTP id itaMYY1788612xDjeIpEWR7W; Mon, 20 Nov 2023 23:40:07 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mx.groups.io with SMTP id smtpd.web11.30780.1700552401980407888 for ; Mon, 20 Nov 2023 23:40:06 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10900"; a="10449992" X-IronPort-AV: E=Sophos;i="6.04,215,1695711600"; d="scan'208";a="10449992" X-Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Nov 2023 23:40:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,215,1695711600"; d="scan'208";a="7989958" X-Received: from shwdeopenlab813.ccr.corp.intel.com ([10.239.55.230]) by fmviesa002.fm.intel.com with ESMTP; 20 Nov 2023 23:40:05 -0800 From: "Yuanhao Xie" To: devel@edk2.groups.io Cc: xieyuanh , Ray Ni , Eric Dong , Rahul Kumar , Tom Lendacky , Laszlo Ersek Subject: [edk2-devel] [Patch V2 2/3] UefiCpuPkg/MpInitLib: Detect microcode and store MTRR when CpuCount > 1 Date: Tue, 21 Nov 2023 15:39:55 +0800 Message-Id: <20231121073956.2741-3-yuanhao.xie@intel.com> In-Reply-To: <20231121073956.2741-1-yuanhao.xie@intel.com> References: <20231121073956.2741-1-yuanhao.xie@intel.com> MIME-Version: 1.0 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,yuanhao.xie@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: I7lqezFSSBw8FYK77xufkHw5x1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1700552409713100003 Content-Type: text/plain; charset="utf-8" Detect and apply Microcode on BSP, store BSP's MTRR setting only when CpuCount > 1. The purpose of this patch is to enhance the review process. The separation in this patch is aimed at facilitating a more straightforward review, with the ultimate goal of eliminating the microcode loading functionality for the second time Mp initialization Cc: Ray Ni Cc: Eric Dong Cc: Rahul Kumar Cc: Tom Lendacky Cc: Laszlo Ersek Signed-off-by: Yuanhao Xie Reviewed-by: Laszlo Ersek --- UefiCpuPkg/Library/MpInitLib/MpLib.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpIn= itLib/MpLib.c index e8ffb99874..bb5d4188f0 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c @@ -2236,19 +2236,19 @@ MpInitLibInitialize ( ShadowMicrocodeUpdatePatch (CpuMpData); } =20 - // - // Detect and apply Microcode on BSP - // - MicrocodeDetect (CpuMpData, CpuMpData->BspNumber); - // - // Store BSP's MTRR setting - // - MtrrGetAllMtrrs (&CpuMpData->MtrrTable); - // // Wakeup APs to do some AP initialize sync (Microcode & MTRR) // if (CpuMpData->CpuCount > 1) { + // + // Detect and apply Microcode on BSP + // + MicrocodeDetect (CpuMpData, CpuMpData->BspNumber); + // + // Store BSP's MTRR setting + // + MtrrGetAllMtrrs (&CpuMpData->MtrrTable); + if (MpHandOff !=3D NULL) { // // Only needs to use this flag for DXE phase to update the wake up --=20 2.39.1.windows.1 -=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 (#111523): https://edk2.groups.io/g/devel/message/111523 Mute This Topic: https://groups.io/mt/102724547/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon May 13 07:02:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+111524+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+111524+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1700552410; cv=none; d=zohomail.com; s=zohoarc; b=lKrcZcfVYcV01AYD7TCB4YkCqXRoKpdk5sUaiOZLCaYSbUKbhdJuSmsRfwY0RpITjA5Cah8YwTgUNdY9yTnD2+x9qzq7uCfBNXhXh4xJUvxsbil8bRgU0PAxn+L9NkHNEZc+utqmpdVwddeSSR76F0cZ7lYSTy2ZlA5FQCu6z8I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700552410; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=aAVU8WdUssOU2ge27ISK2uJ8LOt1lV3K4kIL+Ip8f7U=; b=Nuta5n1j3GsZ6L+sZlDkhfbL7oqMGQjxfiVqHKo8SfHDPiiBYQoV5uge/wfjS46m53dhXGWvRTbukzdekvADDBIIOgOBPb6eU8zyBEx1/LXh8FWo91RPkiD20WZ4yWtJUDIgNFhYyjPX41UMtGzpacGZeQ6jbEEDwhS9ZeAaaIU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+111524+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1700552410696940.0524188294386; Mon, 20 Nov 2023 23:40:10 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=yTeXMKd4oIePJWh1dZIcoy6R5uXT9bjtf4wqRlQbDEI=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1700552410; v=1; b=e49LDkA1pNdj5NdbEtK/XQLwWMzURYsftEAu+ODA2rumDrqk5tMMjwsGinIVDFjlG7buVwON RmQ0rQVzr1r9+wnk3sXmLl5Mc97cHgy73OAP5YvKZg61A4tn4jDWv6uA6E9ZvZ4aRiJ/jSRuzgS pFinfAV8CfEEETVrx/CxS9V4= X-Received: by 127.0.0.2 with SMTP id JjqkYY1788612xvDILQtApbc; Mon, 20 Nov 2023 23:40:10 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mx.groups.io with SMTP id smtpd.web11.30780.1700552401980407888 for ; Mon, 20 Nov 2023 23:40:09 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10900"; a="10449999" X-IronPort-AV: E=Sophos;i="6.04,215,1695711600"; d="scan'208";a="10449999" X-Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Nov 2023 23:40:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,215,1695711600"; d="scan'208";a="7989985" X-Received: from shwdeopenlab813.ccr.corp.intel.com ([10.239.55.230]) by fmviesa002.fm.intel.com with ESMTP; 20 Nov 2023 23:40:08 -0800 From: "Yuanhao Xie" To: devel@edk2.groups.io Cc: xieyuanh , Ray Ni , Eric Dong , Rahul Kumar , Tom Lendacky , Laszlo Ersek Subject: [edk2-devel] [Patch V2 3/3] UefiCpuPkg/MpInitLib: Eliminate redundant microcode loading in DXE. Date: Tue, 21 Nov 2023 15:39:56 +0800 Message-Id: <20231121073956.2741-4-yuanhao.xie@intel.com> In-Reply-To: <20231121073956.2741-1-yuanhao.xie@intel.com> References: <20231121073956.2741-1-yuanhao.xie@intel.com> MIME-Version: 1.0 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,yuanhao.xie@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: ohH7TIyJyRuN7DKBfG3QNfdDx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1700552411723100008 Content-Type: text/plain; charset="utf-8" The DXE stage's Microcode loading process has been elimincated by: 1. Microcode HOB consumption in MP initialization within the DXE phase. 2. Restricting MicrocodeDetect to the PEI phase instead of DXE for BSP. 3. BSP now WakeUpAp only for synchronizing MTRR settings, with Microcode loading no longer a part of this process. Cc: Ray Ni Cc: Eric Dong Cc: Rahul Kumar Cc: Tom Lendacky Cc: Laszlo Ersek Signed-off-by: Yuanhao Xie Reviewed-by: Laszlo Ersek --- UefiCpuPkg/Library/MpInitLib/MpLib.c | 54 ++++++++++++++++++++++++++++++++= +++------------------- 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpIn= itLib/MpLib.c index bb5d4188f0..0cf3520f9e 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c @@ -434,7 +434,27 @@ ApFuncEnableX2Apic ( } =20 /** - Do sync on APs. + Sync BSP's MTRR table to AP during waking up APs. + @param[in, out] Buffer Pointer to private data buffer. +**/ +VOID +EFIAPI +ApMtrrSync ( + IN OUT VOID *Buffer + ) +{ + CPU_MP_DATA *CpuMpData; + + CpuMpData =3D (CPU_MP_DATA *)Buffer; + + // + // Sync BSP's MTRR table to AP + // + MtrrSetAllMtrrs (&CpuMpData->MtrrTable); +} + +/** + Do sync on APs, includes loading microcode, and sync MTRRs. =20 @param[in, out] Buffer Pointer to private data buffer. **/ @@ -2224,26 +2244,10 @@ MpInitLibInitialize ( } } =20 - if (!GetMicrocodePatchInfoFromHob ( - &CpuMpData->MicrocodePatchAddress, - &CpuMpData->MicrocodePatchRegionSize - )) - { - // - // The microcode patch information cache HOB does not exist, which mea= ns - // the microcode patches data has not been loaded into memory yet - // - ShadowMicrocodeUpdatePatch (CpuMpData); - } - // - // Wakeup APs to do some AP initialize sync (Microcode & MTRR) + // Wakeup APs to do some AP initialize sync. // if (CpuMpData->CpuCount > 1) { - // - // Detect and apply Microcode on BSP - // - MicrocodeDetect (CpuMpData, CpuMpData->BspNumber); // // Store BSP's MTRR setting // @@ -2256,8 +2260,20 @@ MpInitLibInitialize ( // in DXE. // CpuMpData->InitFlag =3D ApInitReconfig; - WakeUpAP (CpuMpData, TRUE, 0, ApInitializeSync, CpuMpData, TRUE); + // + // Wakeup APs to sync MTRR settings. + // For the case the PEI and DXE are in different bit mode. + // It is necessary to do the MTRRs syncing. + // + WakeUpAP (CpuMpData, TRUE, 0, ApMtrrSync, CpuMpData, TRUE); } else { + // + // Detect and apply Microcode on BSP + // + MicrocodeDetect (CpuMpData, CpuMpData->BspNumber); + // + // Wakeup APs to do some AP initialize sync load microcode and Sync = MTRRs + // WakeUpAP (CpuMpData, TRUE, 0, ApInitializeSync, CpuMpData, TRUE); } =20 --=20 2.39.1.windows.1 -=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 (#111524): https://edk2.groups.io/g/devel/message/111524 Mute This Topic: https://groups.io/mt/102724548/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-