public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Tian, Feng" <feng.tian@intel.com>
To: "Fan, Jeff" <jeff.fan@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Wu, Hao A" <hao.a.wu@intel.com>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>,
	"Tian, Feng" <feng.tian@intel.com>
Subject: Re: [PATCH 0/6] UefiCpuPkg/MpInitLib: Program AP stack in fixed address
Date: Wed, 16 Nov 2016 08:00:07 +0000	[thread overview]
Message-ID: <7F1BAD85ADEA444D97065A60D2E97EE566E51604@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20161114034701.5996-1-jeff.fan@intel.com>

Reviewed-by: Feng Tian <feng.tian@Intel.com>

Thanks
Feng

-----Original Message-----
From: Fan, Jeff 
Sent: Monday, November 14, 2016 11:47 AM
To: edk2-devel@lists.01.org
Cc: Tian, Feng <feng.tian@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>
Subject: [PATCH 0/6] UefiCpuPkg/MpInitLib: Program AP stack in fixed address

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 <feng.tian@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>

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



      parent reply	other threads:[~2016-11-16  8:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-14  3:46 [PATCH 0/6] UefiCpuPkg/MpInitLib: Program AP stack in fixed address Jeff Fan
2016-11-14  3:46 ` [PATCH 1/6] UefiCpuPkg/MpInitLib: Fixed offset error on Cr3Location Jeff Fan
2016-11-14  3:46 ` [PATCH 2/6] UefiCpuPkg/MpInitLib: Force sending INIT-SIPI-SIPI to reset APs Jeff Fan
2016-11-14  3:46 ` [PATCH 3/6] UefiCpuPkg/MpInitLib: Remove CPU information from CPU_AP_DATA Jeff Fan
2016-11-14  3:46 ` [PATCH 4/6] UefiCpuPkg/MpInitLib: Add InitFlag and CpuInfo in MP_CPU_EXCHANGE_INFO Jeff Fan
2016-11-14  3:47 ` [PATCH 5/6] UefiCpuPkg/MpInitLib: Program AP stack in fixed address Jeff Fan
2016-11-14  3:47 ` [PATCH 6/6] UefiCpuPkg/MpInitLib: Update AP information when BSP switched Jeff Fan
2016-11-16  8:00 ` Tian, Feng [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7F1BAD85ADEA444D97065A60D2E97EE566E51604@SHSMSX101.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox