From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id E3E75780091 for ; Fri, 24 Nov 2023 02:56:47 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=rfqqk5SHztJlEt1Sixc68OOZTPEJ02w26Su5XHcjccQ=; 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=1700794606; v=1; b=Ygo/ZWkyyd4pp08mDrcSOrraMcmaTrP5f94wJALueoZZHESBK8mI1aOGMMfRDOvYPYxNmlfK 8+cE3dTsNyBWsSjEBrRnwYuUxg2cHgaMetuqVZZRU7lnTHn1D/YjkcivPu5IAaOLU+V0Wq/NGOV 5jqgFCmIb/Qz3UNYJmDBwNO4= X-Received: by 127.0.0.2 with SMTP id NG2SYY7687511xOftVHupGzq; Thu, 23 Nov 2023 18:56:46 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web11.128508.1700794600506959702 for ; Thu, 23 Nov 2023 18:56:46 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="377386860" X-IronPort-AV: E=Sophos;i="6.04,223,1695711600"; d="scan'208";a="377386860" X-Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2023 18:56:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="802087283" X-IronPort-AV: E=Sophos;i="6.04,223,1695711600"; d="scan'208";a="802087283" X-Received: from shwdeopenlab813.ccr.corp.intel.com ([10.239.55.230]) by orsmga001.jf.intel.com with ESMTP; 23 Nov 2023 18:56:43 -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 V4 2/3] UefiCpuPkg/MpInitLib: Store MTRRs settings only when CpuCount>1 Date: Fri, 24 Nov 2023 10:56:34 +0800 Message-Id: <20231124025635.3629-3-yuanhao.xie@intel.com> In-Reply-To: <20231124025635.3629-1-yuanhao.xie@intel.com> References: <20231124025635.3629-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: u61VV9Elqh00OBm2JoIZ6Yn1x7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b="Ygo/ZWky"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Store BSP's MTRR setting only when CpuCount>1. Reviewed-by: Ray Ni Cc: Ray Ni Cc: Eric Dong Cc: Rahul Kumar Cc: Tom Lendacky Cc: Laszlo Ersek Signed-off-by: Yuanhao Xie --- UefiCpuPkg/Library/MpInitLib/MpLib.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpInitLib/MpLib.c index 1fd6440a53..4dac931fa5 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c @@ -2244,15 +2244,14 @@ MpInitLibInitialize ( MicrocodeDetect (CpuMpData, CpuMpData->BspNumber); } - // - // Store BSP's MTRR setting - // - MtrrGetAllMtrrs (&CpuMpData->MtrrTable); - // // Wakeup APs to do some AP initialize sync (MTRR and/or Microcode). // if (CpuMpData->CpuCount > 1) { + // + // Store BSP's MTRR setting + // + MtrrGetAllMtrrs (&CpuMpData->MtrrTable); if (MpHandOff != NULL) { // // Only needs to use this flag for DXE phase to update the wake up -- 2.39.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#111688): https://edk2.groups.io/g/devel/message/111688 Mute This Topic: https://groups.io/mt/102775772/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-