Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: 87f22f4b5c7079efb6c38eb1600e54d7180079a6
      
https://github.com/tianocore/edk2/commit/87f22f4b5c7079efb6c38eb1600e54d7180079a6
  Author: Dun Tan <[email protected]>
  Date:   2024-06-04 (Tue, 04 Jun 2024)

  Changed paths:
    M MdeModulePkg/MdeModulePkg.dec

  Log Message:
  -----------
  MdeModulePkg: Add gEdkiiS3MtrrSettingGuid

Add gEdkiiS3MtrrSettingGuid a new GUID for s3
MTRR setting. This GUID will be used to save
MTRR_SETTINGS at EndOfDxe by LockBox and restore
at S3 boot PEI phase for s3 usage.

Signed-off-by: Dun Tan <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
Reviewed-by: Jiaxin Wu <[email protected]>


  Commit: 52a4bc65f64209c53acad03a46de851362eae4ca
      
https://github.com/tianocore/edk2/commit/52a4bc65f64209c53acad03a46de851362eae4ca
  Author: Dun Tan <[email protected]>
  Date:   2024-06-04 (Tue, 04 Jun 2024)

  Changed paths:
    M OvmfPkg/CpuS3DataDxe/CpuS3Data.c
    M OvmfPkg/CpuS3DataDxe/CpuS3DataDxe.inf

  Log Message:
  -----------
  OvmfPkg: Save MTRR by lockbox in CpuS3DataDxe

Save MTRR by lockbox in CpuS3DataDxe. In S3 boot,
The MTRR setting will be restored in S3Resume.c
in following patches. Then S3Resume.c will wakeup
all APs to load the MTRR setting. This can avoid
waking up APs in CpuS3.c.

Signed-off-by: Dun Tan <[email protected]>
Reviewed-by: Ard Biesheuvel <[email protected]>
Cc: Jiewen Yao <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Reviewed-by: Jiaxin Wu <[email protected]>


  Commit: 32a9ee736e8e4f29360fcb6a1b0790c46dcb0979
      
https://github.com/tianocore/edk2/commit/32a9ee736e8e4f29360fcb6a1b0790c46dcb0979
  Author: Dun Tan <[email protected]>
  Date:   2024-06-04 (Tue, 04 Jun 2024)

  Changed paths:
    M UefiCpuPkg/UefiCpuPkg.dsc

  Log Message:
  -----------
  UefiCpuPkg: Add locbox lib instance in DSC

Add locbox lib instance in DSC. The SmmLockBoxDxeLib
will be consumed by CpuS3DataDxe driver

Signed-off-by: Dun Tan <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Reviewed-by: Jiaxin Wu <[email protected]>


  Commit: 3a516aa2400426bd1be45e130e28b8ed2d841b01
      
https://github.com/tianocore/edk2/commit/3a516aa2400426bd1be45e130e28b8ed2d841b01
  Author: Dun Tan <[email protected]>
  Date:   2024-06-04 (Tue, 04 Jun 2024)

  Changed paths:
    M UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c
    M UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf

  Log Message:
  -----------
  UefiCpuPkg: Save MTRR by lockbox in CpuS3DataDxe

Save MTRR by lockbox in CpuS3DataDxe. In S3 boot,
The MTRR setting will be restored in S3Resume.c
in following patches. Then S3Resume.c will wakeup
all APs to load the MTRR setting. This can avoid
waking up APs in CpuS3.c.

Signed-off-by: Dun Tan <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Reviewed-by: Jiaxin Wu <[email protected]>


  Commit: ad245ffeff3221a903d073206b4613f29344aa45
      
https://github.com/tianocore/edk2/commit/ad245ffeff3221a903d073206b4613f29344aa45
  Author: Dun Tan <[email protected]>
  Date:   2024-06-04 (Tue, 04 Jun 2024)

  Changed paths:
    M UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
    M UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf

  Log Message:
  -----------
  UefiCpuPkg: LoadMtrrData for all cpu in S3Resume

In this commit, S3Resume.c wakeup all Aps to run
LoadMtrrData for all cpu before transfer to CpuS3.c
in smm cpu driver. The MtrrSetting table can be restored
by gEdkiiS3MtrrSettingGuid which is saved by lockbox in
PEI phase. This can avoid waking up APs in CpuS3.c.

Signed-off-by: Dun Tan <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Reviewed-by: Jiaxin Wu <[email protected]>


  Commit: db4101c308c76423326606652d9d6ef2f0bc96e7
      
https://github.com/tianocore/edk2/commit/db4101c308c76423326606652d9d6ef2f0bc96e7
  Author: Dun Tan <[email protected]>
  Date:   2024-06-04 (Tue, 04 Jun 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c

  Log Message:
  -----------
  UefiCpuPkg: Remove code to load mtrr setting

Remove code to load mtrr setting in CpuS3.c.
In previous commits, before transferring to
CpuS3.c, MTRR setting has been loaded in
S3RestoreConfig2() for all CPU.

Signed-off-by: Dun Tan <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Reviewed-by: Jiaxin Wu <[email protected]>


  Commit: b7db4d895a8c06d124bec185f824fddfaa556450
      
https://github.com/tianocore/edk2/commit/b7db4d895a8c06d124bec185f824fddfaa556450
  Author: Dun Tan <[email protected]>
  Date:   2024-06-04 (Tue, 04 Jun 2024)

  Changed paths:
    M UefiCpuPkg/UefiCpuPkg.dec

  Log Message:
  -----------
  UefiCpuPkg:Set PcdCpuFeaturesInitOnS3Resume to TRUE

Set PcdCpuFeaturesInitOnS3Resume to TRUE. So that
CpuFeaturesPei PEIM will initialize the CPU registers
and perform CPU features initialization.

Signed-off-by: Dun Tan <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Reviewed-by: Jiaxin Wu <[email protected]>


  Commit: 7421ea1f2a642e8176ee0197e001a686bf139cee
      
https://github.com/tianocore/edk2/commit/7421ea1f2a642e8176ee0197e001a686bf139cee
  Author: Dun Tan <[email protected]>
  Date:   2024-06-04 (Tue, 04 Jun 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c

  Log Message:
  -----------
  UefiCpuPkg: Remove code to set register table

Remove code to set register table in CpuS3.c.
In previous commit, PcdCpuFeaturesInitOnS3Resume
has been set to TRUE. So that CpuFeaturesPei PEIM
will initialize the CPU registers and perform CPU
features initialization.

Signed-off-by: Dun Tan <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Reviewed-by: Jiaxin Wu <[email protected]>


  Commit: ffb8481ba81b142f85204725344d9517e53fd978
      
https://github.com/tianocore/edk2/commit/ffb8481ba81b142f85204725344d9517e53fd978
  Author: Dun Tan <[email protected]>
  Date:   2024-06-04 (Tue, 04 Jun 2024)

  Changed paths:
    M UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm

  Log Message:
  -----------
  UefiCpuPkg: Disable PG in IA32 ApLoopCode

Disable paging in IA32 RelocateApLoop assembly
code to fix the issue that the AP page table is
unavailiable after boot OS under IA32 execution mode.

This issue exist in IA32 PEI + IA32 DXE normal boot
(also S3 boot with IA32 PEI after previous three commits
are accepted). In current MpLib code, the IA32 execution
mode code did not create page table in reserved memory
like what X64 code did. If PcdCpuStackGuard is TRUE, the
PG is enabled for AP in current RelocateApLoop assembly
code. And the page table for AP is unavailiable after
boot OS. This might cause potential issue. So disable PG
in IA32 RelocateApLoop.

Signed-off-by: Dun Tan <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Reviewed-by: Jiaxin Wu <[email protected]>


  Commit: 68310cd56a9cf0824cf4c70e84eb9736b925dc64
      
https://github.com/tianocore/edk2/commit/68310cd56a9cf0824cf4c70e84eb9736b925dc64
  Author: Dun Tan <[email protected]>
  Date:   2024-06-04 (Tue, 04 Jun 2024)

  Changed paths:
    M UefiCpuPkg/Library/MpInitLib/DxeMpLib.c

  Log Message:
  -----------
  UefiCpuPkg:Abstract some DxeMpLib code to function

Abstract some DxeMpLib code to function in this commit.
Some of these internal functions will be moved to common
MpLib.c in following commits. Then PeiMpLib can reuse
the code.

Signed-off-by: Dun Tan <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Reviewed-by: Jiaxin Wu <[email protected]>


  Commit: fcd09b1edbd377c174e98bf33ace4fc905d4cf29
      
https://github.com/tianocore/edk2/commit/fcd09b1edbd377c174e98bf33ace4fc905d4cf29
  Author: Dun Tan <[email protected]>
  Date:   2024-06-04 (Tue, 04 Jun 2024)

  Changed paths:
    M UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
    M UefiCpuPkg/Library/MpInitLib/MpLib.c
    M UefiCpuPkg/Library/MpInitLib/MpLib.h

  Log Message:
  -----------
  UefiCpuPkg:Move some code in DxeMpLib to common place

Move some code in DxeMpLib.C to common MpLib.c.
The related code is to relocate Ap to new safe buffer
before booting into OS. In next commits, these code
also will be used by PeiMpLib. This commit doesn't
change any code functionality.

Signed-off-by: Dun Tan <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Reviewed-by: Jiaxin Wu <[email protected]>


  Commit: 669291db5a326928b4ab048524eb0ffa7d9a619f
      
https://github.com/tianocore/edk2/commit/669291db5a326928b4ab048524eb0ffa7d9a619f
  Author: Dun Tan <[email protected]>
  Date:   2024-06-04 (Tue, 04 Jun 2024)

  Changed paths:
    M UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c

  Log Message:
  -----------
  UefiCpuPkg: Install gEdkiiEndOfS3ResumeGuid in S3Resume

Install gEdkiiEndOfS3ResumeGuid in S3Resume to trigger
callback registered by PeiMpLib. The callback is to
relocate Ap to new safe memory before jump to OS waking
vector in S3 boot flow.

Signed-off-by: Dun Tan <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Reviewed-by: Jiaxin Wu <[email protected]>


  Commit: cdc1a88272237149003d1d1ea301d320f7b3bdf6
      
https://github.com/tianocore/edk2/commit/cdc1a88272237149003d1d1ea301d320f7b3bdf6
  Author: Dun Tan <[email protected]>
  Date:   2024-06-04 (Tue, 04 Jun 2024)

  Changed paths:
    M UefiCpuPkg/Library/MpInitLib/MpLib.h
    M UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf
    M UefiCpuPkg/Library/MpInitLib/PeiMpLib.c

  Log Message:
  -----------
  UefiCpuPkg:Relocate AP to new safe buffer in PeiMpLib

In this commit, change PeiMpLib to install callback
of gEdkiiEndOfS3ResumeGuid to relocate AP to new safe
buffer. The gEdkiiEndOfS3ResumeGuid is installed in
S3Resume.c before jmping to OS waking vector.

Previously, code in CpuS3.c of PiSmmCpuDxe driver will
prepare the new safe buffer for AP and place AP in hlt
loop state. With this code change, we can remove the
Machine Instructions of mApHltLoopCode in PiSmmCpuDxe.
Also we can reuse the related code in DxeMpLib for
PeiMpLib.

Signed-off-by: Dun Tan <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Reviewed-by: Jiaxin Wu <[email protected]>


  Commit: 525578bdd5ddbf13346c6e5c3a5d04f2efc5a50e
      
https://github.com/tianocore/edk2/commit/525578bdd5ddbf13346c6e5c3a5d04f2efc5a50e
  Author: Dun Tan <[email protected]>
  Date:   2024-06-04 (Tue, 04 Jun 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c

  Log Message:
  -----------
  UefiCpuPkg:Remove code to handle APIC setting and Interrupt

Remove ProgramVirtualWireMode()/DisableLvtInterrupts()
since APs won't be waken by INIT-SIPI-SIPI in CpuS3.c
any more. The two functions has been executed in
MpInitLibInitialize() in PeiMplib.

Signed-off-by: Dun Tan <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Reviewed-by: Jiaxin Wu <[email protected]>


  Commit: 341ee5c31b724f9c505731ddc3d254d875836d63
      
https://github.com/tianocore/edk2/commit/341ee5c31b724f9c505731ddc3d254d875836d63
  Author: Dun Tan <[email protected]>
  Date:   2024-06-04 (Tue, 04 Jun 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c
    R UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/MpFuncs.nasm
    M UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmFuncsArch.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
    R UefiCpuPkg/PiSmmCpuDxeSmm/X64/MpFuncs.nasm
    M UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmFuncsArch.c

  Log Message:
  -----------
  UefiCpuPkg:Remove code to wakeup AP and relocate ap

After the code to load mtrr setting, set register table,
handle APIC setting and Interrupt after INIT-SIPI-SIPI
is moved, the InitializeCpuProcedure() only contains
following code logic:
1.Bsp runs ExecuteFirstSmiInit().
2.Bsp transfers AP to safe hlt-loop

During S3 boot, since APs will be relocated to new safe
buffer by the callback of gEdkiiEndOfS3ResumeGuid in
PeiMpLib, Bsp doesn't need to transfer AP to safe hlt-loop
any more. SmmRestoreCpu() in CpuS3 only needs to runs the
ExecuteFirstSmiInit() on BSP. So remove code to wakeup
AP by INIT-SIPI-SIPI and remove code to relocate ap to
safe hlt-loop.

Signed-off-by: Dun Tan <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Reviewed-by: Jiaxin Wu <[email protected]>


  Commit: d390b163f806e3c369ce7b51007916252c5fb5de
      
https://github.com/tianocore/edk2/commit/d390b163f806e3c369ce7b51007916252c5fb5de
  Author: Dun Tan <[email protected]>
  Date:   2024-06-04 (Tue, 04 Jun 2024)

  Changed paths:
    M UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c

  Log Message:
  -----------
  UefiCpuPkg: Remove unneeded MpService2Ppi assignment

Remove the unneeded assignment of MpService2Ppi field
in SmmS3ResumeState. Previously, when the execution
combination of PEI and DXE are the same, the pointer
of mpservice ppi will be passed to CpuS3.c in smm cpu
driver to wakeup all APs, instead of init-sipi-sipi.
Currently, CpuS3.c doesn't need to wakeup Aps anymore.
So remove the duplicated mpservice locate and assignment
to MpService2Ppi field in SmmS3ResumeState.

Signed-off-by: Dun Tan <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Reviewed-by: Jiaxin Wu <[email protected]>


  Commit: e3b3e907e178da7ced228d21f99af843d7fb9291
      
https://github.com/tianocore/edk2/commit/e3b3e907e178da7ced228d21f99af843d7fb9291
  Author: Dun Tan <[email protected]>
  Date:   2024-06-04 (Tue, 04 Jun 2024)

  Changed paths:
    M MdeModulePkg/Include/Guid/AcpiS3Context.h

  Log Message:
  -----------
  MdeModulePkg:Remove MpService2Ppi field in SMM_S3_RESUME_STATE

This MpService2Ppi field in SMM_S3_RESUME_STATE is used to
wakeup AP to do the CPU initialization during smm s3 boot when
the execution mode of PEI and DXE are the same.
Currently, in CpuS3.c of smm cpu driver, BSP doesn't need to
wakeup AP anymore. The initialization for AP will be done in
S3Resume.c before transfer to CpuS3.c of smm cpu driver.
So we can remove the MpService2Ppi field in SMM_S3_RESUME_STATE.

Signed-off-by: Dun Tan <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Cc: Jian J Wang <[email protected]>
Reviewed-by: Liming Gao <[email protected]>


  Commit: 077760fec40c2e5fcae274cc609d97aee12e5d56
      
https://github.com/tianocore/edk2/commit/077760fec40c2e5fcae274cc609d97aee12e5d56
  Author: Dun Tan <[email protected]>
  Date:   2024-06-04 (Tue, 04 Jun 2024)

  Changed paths:
    M UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
    M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h

  Log Message:
  -----------
  UefiCpuPkg: Remove GetAcpiCpuData() in CpuS3.c

Remove GetAcpiCpuData() in CpuS3.c. The mAcpiCpuData
is not needed in S3 boot anymore.

Signed-off-by: Dun Tan <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Reviewed-by: Jiaxin Wu <[email protected]>


Compare: https://github.com/tianocore/edk2/compare/27b044605cd5...077760fec40c

To unsubscribe from these emails, change your notification settings at 
https://github.com/tianocore/edk2/settings/notifications


_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to