From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 7F1A681ECD for ; Wed, 16 Nov 2016 00:00:13 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP; 16 Nov 2016 00:00:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,647,1473145200"; d="scan'208";a="191994087" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga004.fm.intel.com with ESMTP; 16 Nov 2016 00:00:11 -0800 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 16 Nov 2016 00:00:11 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 16 Nov 2016 00:00:11 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.239]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.96]) with mapi id 14.03.0248.002; Wed, 16 Nov 2016 16:00:08 +0800 From: "Tian, Feng" To: "Fan, Jeff" , "edk2-devel@lists.01.org" CC: "Wu, Hao A" , "Kinney, Michael D" , "Tian, Feng" Thread-Topic: [PATCH 0/6] UefiCpuPkg/MpInitLib: Program AP stack in fixed address Thread-Index: AQHSPinL95DfywndLEWDl1xjJC9WhKDbQoHg Date: Wed, 16 Nov 2016 08:00:07 +0000 Message-ID: <7F1BAD85ADEA444D97065A60D2E97EE566E51604@SHSMSX101.ccr.corp.intel.com> References: <20161114034701.5996-1-jeff.fan@intel.com> In-Reply-To: <20161114034701.5996-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 0/6] UefiCpuPkg/MpInitLib: Program AP stack in fixed address X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Nov 2016 08:00:13 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Feng Tian Thanks Feng -----Original Message----- From: Fan, Jeff=20 Sent: Monday, November 14, 2016 11:47 AM To: edk2-devel@lists.01.org Cc: Tian, Feng ; Wu, Hao A ; Kinne= y, Michael D Subject: [PATCH 0/6] UefiCpuPkg/MpInitLib: Program AP stack in fixed addres= s Currently, MpInitLib will program AP stack in dynamic address. Each process= or will calculate its stack address by adding stack size based on the last = stack address. That means AP may have the different stack address everytime= it is wakeup by INIT-SIPI-SIPI. When all APs have wakeup to execute AP task, each each has been assigned on= e stack address. Once the timeout happened on some of APs, BSP will send IN= IT- SIPI-SIPI to wake up APs. We need to re-assign stack for APs. Based on = the current implementation, we might assign one stack address used by other= APs. It will cause the unexpected stack overlapped issue. This fix changed the stack assignment policy. We will record the stack addr= ess assigned to AP at first time AP wakeup. When AP failed on AP task, BSP = could reassigned the same stack for it. Cc: Feng Tian Cc: Hao Wu Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan Jeff Fan (6): UefiCpuPkg/MpInitLib: Fixed offset error on Cr3Location UefiCpuPkg/MpInitLib: Force sending INIT-SIPI-SIPI to reset APs UefiCpuPkg/MpInitLib: Remove CPU information from CPU_AP_DATA UefiCpuPkg/MpInitLib: Add InitFlag and CpuInfo in MP_CPU_EXCHANGE_INFO UefiCpuPkg/MpInitLib: Program AP stack in fixed address UefiCpuPkg/MpInitLib: Update AP information when BSP switched UefiCpuPkg/Library/MpInitLib/Ia32/MpEqu.inc | 4 +- UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm | 65 +++++++++++++++--- UefiCpuPkg/Library/MpInitLib/MpLib.c | 95 +++++++++++++++-------= ---- UefiCpuPkg/Library/MpInitLib/MpLib.h | 7 +- UefiCpuPkg/Library/MpInitLib/X64/MpEqu.inc | 4 +- UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | 68 ++++++++++++++---- 6 files changed, 176 insertions(+), 67 deletions(-) -- 2.9.3.windows.2