From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 04E0B81DCB for ; Sun, 13 Nov 2016 19:47:10 -0800 (PST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP; 13 Nov 2016 19:47:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,488,1473145200"; d="scan'208";a="30688970" Received: from jfan12-desk.ccr.corp.intel.com ([10.239.9.5]) by orsmga004.jf.intel.com with ESMTP; 13 Nov 2016 19:47:12 -0800 From: Jeff Fan To: edk2-devel@lists.01.org Cc: Feng Tian , Hao Wu , Michael D Kinney Date: Mon, 14 Nov 2016 11:46:55 +0800 Message-Id: <20161114034701.5996-1-jeff.fan@intel.com> X-Mailer: git-send-email 2.9.3.windows.2 Subject: [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: Mon, 14 Nov 2016 03:47:11 -0000 Currently, MpInitLib will program AP stack in dynamic address. Each processor 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 one stack address. Once the timeout happened on some of APs, BSP will send INIT- 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 address 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