[edk2] [PATCH v3 0/2] Fix wrong address set as Stack Guard for APs

Jian J Wang posted 2 patches 6 years, 11 months ago
Failed in applying to current master (apply log)
UefiCpuPkg/Library/MpInitLib/DxeMpLib.c | 19 ++++++++++++++++++-
UefiCpuPkg/Library/MpInitLib/MpLib.c    |  2 +-
2 files changed, 19 insertions(+), 2 deletions(-)
[edk2] [PATCH v3 0/2] Fix wrong address set as Stack Guard for APs
Posted by Jian J Wang 6 years, 11 months ago
> v3 changes:
> a. Split the patch into two patch files.
> b. Pass MpServiceProtocol test cases in PI SCT.

> v2 changes:
> a. Use each AP's ApTopOfStack to get the stack base address instead of
>    cpu0's ApTopOfStack which is actually set incorrectly before.
> b. Fix cpu0's ApTopOfStack initialization.
> c. Fix wrong debug print format.

The reason is that DXE part initialization will reuse the stack allocated
at PEI phase, if MP was initialized before. Some code added to check this
situation and use stack base address saved in HOB passed from PEI.

Jian J Wang (2):
  UefiCpuPkg/MpInitLib: fix incorrect stack base init for cpu0
  UefiCpuPkg/MpInitLib: fix wrong address set as Stack Guard for APs

 UefiCpuPkg/Library/MpInitLib/DxeMpLib.c | 19 ++++++++++++++++++-
 UefiCpuPkg/Library/MpInitLib/MpLib.c    |  2 +-
 2 files changed, 19 insertions(+), 2 deletions(-)

-- 
2.15.1.windows.2

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH v3 0/2] Fix wrong address set as Stack Guard for APs
Posted by Laszlo Ersek 6 years, 11 months ago
On 01/08/18 06:39, Jian J Wang wrote:
>> v3 changes:
>> a. Split the patch into two patch files.
>> b. Pass MpServiceProtocol test cases in PI SCT.
> 
>> v2 changes:
>> a. Use each AP's ApTopOfStack to get the stack base address instead of
>>    cpu0's ApTopOfStack which is actually set incorrectly before.
>> b. Fix cpu0's ApTopOfStack initialization.
>> c. Fix wrong debug print format.
> 
> The reason is that DXE part initialization will reuse the stack allocated
> at PEI phase, if MP was initialized before. Some code added to check this
> situation and use stack base address saved in HOB passed from PEI.
> 
> Jian J Wang (2):
>   UefiCpuPkg/MpInitLib: fix incorrect stack base init for cpu0
>   UefiCpuPkg/MpInitLib: fix wrong address set as Stack Guard for APs
> 
>  UefiCpuPkg/Library/MpInitLib/DxeMpLib.c | 19 ++++++++++++++++++-
>  UefiCpuPkg/Library/MpInitLib/MpLib.c    |  2 +-
>  2 files changed, 19 insertions(+), 2 deletions(-)
> 

series
Reviewed-by: Laszlo Ersek <lersek@redhat.com>

Thanks!
Laszlo
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH v3 0/2] Fix wrong address set as Stack Guard for APs
Posted by Dong, Eric 6 years, 11 months ago
Reviewed-by: Eric Dong <eric.dong@intel.com>

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jian J Wang
Sent: Monday, January 8, 2018 1:40 PM
To: edk2-devel@lists.01.org
Subject: [edk2] [PATCH v3 0/2] Fix wrong address set as Stack Guard for APs

> v3 changes:
> a. Split the patch into two patch files.
> b. Pass MpServiceProtocol test cases in PI SCT.

> v2 changes:
> a. Use each AP's ApTopOfStack to get the stack base address instead of
>    cpu0's ApTopOfStack which is actually set incorrectly before.
> b. Fix cpu0's ApTopOfStack initialization.
> c. Fix wrong debug print format.

The reason is that DXE part initialization will reuse the stack allocated at PEI phase, if MP was initialized before. Some code added to check this situation and use stack base address saved in HOB passed from PEI.

Jian J Wang (2):
  UefiCpuPkg/MpInitLib: fix incorrect stack base init for cpu0
  UefiCpuPkg/MpInitLib: fix wrong address set as Stack Guard for APs

 UefiCpuPkg/Library/MpInitLib/DxeMpLib.c | 19 ++++++++++++++++++-
 UefiCpuPkg/Library/MpInitLib/MpLib.c    |  2 +-
 2 files changed, 19 insertions(+), 2 deletions(-)

--
2.15.1.windows.2

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel