From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8E09521A0480E for ; Tue, 25 Apr 2017 01:19:21 -0700 (PDT) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Apr 2017 01:19:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,248,1488873600"; d="scan'208";a="93812543" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga006.fm.intel.com with ESMTP; 25 Apr 2017 01:19:20 -0700 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 25 Apr 2017 01:19:20 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 25 Apr 2017 01:19:20 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.193]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.117]) with mapi id 14.03.0319.002; Tue, 25 Apr 2017 16:19:18 +0800 From: "Tian, Feng" To: "Fan, Jeff" , "edk2-devel@lists.01.org" CC: "Kinney, Michael D" , "Tian, Feng" Thread-Topic: [PATCH] UefiCpuPkg: Move ProgramVirtualWireMode() to MpInitLib Thread-Index: AQHSumBYozinWvKVB0Ogt9nzzwfja6HVxHLA Date: Tue, 25 Apr 2017 08:19:17 +0000 Message-ID: <7F1BAD85ADEA444D97065A60D2E97EE5699EC340@SHSMSX101.ccr.corp.intel.com> References: <20170421052958.11476-1-jeff.fan@intel.com> In-Reply-To: <20170421052958.11476-1-jeff.fan@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] UefiCpuPkg: Move ProgramVirtualWireMode() to MpInitLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Apr 2017 08:19:21 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Feng Tian -----Original Message----- From: Fan, Jeff=20 Sent: Friday, April 21, 2017 1:30 PM To: edk2-devel@lists.01.org Cc: Tian, Feng ; Kinney, Michael D Subject: [PATCH] UefiCpuPkg: Move ProgramVirtualWireMode() to MpInitLib In PEI phase, BSP did not program vitural wired mode while APs did. Move program virtual wired mode from CpuDxe to MpInitLib, thus it could ben= efit on both CpuDxe and CpuMpPei. https://bugzilla.tianocore.org/show_bug.cgi?id=3D496 Cc: Feng Tian Cc: Michael Kinney Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan --- UefiCpuPkg/CpuDxe/CpuDxe.c | 5 ----- UefiCpuPkg/Library/MpInitLib/MpLib.c | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c b/UefiCpuPkg/CpuDxe/CpuDxe.c index = 4a5e282..8680656 100644 --- a/UefiCpuPkg/CpuDxe/CpuDxe.c +++ b/UefiCpuPkg/CpuDxe/CpuDxe.c @@ -1136,11 +1136,6 @@ InitializeCpu ( InitInterruptDescriptorTable (); =20 // - // Enable the local APIC for Virtual Wire Mode. - // - ProgramVirtualWireMode (); - - // // Install CPU Architectural Protocol // Status =3D gBS->InstallMultipleProtocolInterfaces ( diff --git a/UefiCpu= Pkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpInitLib/MpLib.c index 03d6c2d..e5e211d 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c @@ -1364,6 +1364,10 @@ MpInitLibInitialize ( // Store BSP's MTRR setting // MtrrGetAllMtrrs (&CpuMpData->MtrrTable); + // + // Enable the local APIC for Virtual Wire Mode. + // + ProgramVirtualWireMode (); =20 if (OldCpuMpData =3D=3D NULL) { if (MaxLogicalProcessorNumber > 1) { -- 2.9.3.windows.2