public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ruiyu" <ruiyu.ni@Intel.com>
To: Jian J Wang <jian.j.wang@intel.com>, edk2-devel@lists.01.org
Cc: Eric Dong <eric.dong@intel.com>, Laszlo Ersek <lersek@redhat.com>
Subject: Re: [PATCH v2] UefiCpuPkg/MpInitLib: fix AP init issue in 64-bit PEI
Date: Thu, 25 Jan 2018 16:22:41 +0800	[thread overview]
Message-ID: <212bc278-a163-dc86-8e7e-bd96d0bbae43@Intel.com> (raw)
In-Reply-To: <20180125074219.7220-1-jian.j.wang@intel.com>

On 1/25/2018 3:42 PM, Jian J Wang wrote:
>> v2:
>>     Roll back changes (just white spaces) caused by misoperation in git
> 
> This issue is introduced by a patch at
> 
>     f32bfe6d061420a15bac6083063d227c567e6388
> 
> The above patch miss the case of 64-bit PEI, which will link
> X64/MpFuncs.nasm instead of Ia32/MpFuncs.nasm. For X64/MpFuncs.nasm,
> ExchangeInfo->ModeHighMemory should be always initialized no matter
> if separate wakeup buffer is allocated or not. Ia32/MpFuncs.nasm will
> not need ModeHighMemory during AP init. So the changes made in this
> patch should not affect the functionality of it.
> 
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
> ---
>   UefiCpuPkg/Library/MpInitLib/MpLib.c | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpInitLib/MpLib.c
> index 42011d6231..0b7073fd02 100644
> --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c
> +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c
> @@ -834,14 +834,15 @@ FillExchangeInfoData (
>         );
>   
>       ExchangeInfo->ModeTransitionMemory = (UINT32)CpuMpData->WakeupBufferHigh;
> -    ExchangeInfo->ModeHighMemory = (UINT32)CpuMpData->WakeupBufferHigh +
> -                                   (UINT32)ExchangeInfo->ModeOffset -
> -                                   (UINT32)CpuMpData->AddressMap.ModeTransitionOffset;
> -    ExchangeInfo->ModeHighSegment = (UINT16)ExchangeInfo->CodeSegment;
>     } else {
>       ExchangeInfo->ModeTransitionMemory = (UINT32)
>         (ExchangeInfo->BufferStart + CpuMpData->AddressMap.ModeTransitionOffset);
>     }
> +
> +  ExchangeInfo->ModeHighMemory = ExchangeInfo->ModeTransitionMemory +
> +                         (UINT32)ExchangeInfo->ModeOffset -
> +                         (UINT32)CpuMpData->AddressMap.ModeTransitionOffset;
> +  ExchangeInfo->ModeHighSegment = (UINT16)ExchangeInfo->CodeSegment;
>   }
>   
>   /**
> 
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

-- 
Thanks,
Ray


      reply	other threads:[~2018-01-25  8:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-25  7:42 [PATCH v2] UefiCpuPkg/MpInitLib: fix AP init issue in 64-bit PEI Jian J Wang
2018-01-25  8:22 ` Ni, Ruiyu [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=212bc278-a163-dc86-8e7e-bd96d0bbae43@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