tianocore / edk2

EDK II
https://github.com/tianocore/tianocore.github.io/wiki/EDK-II
Other
4.52k stars 2.44k forks source link

S3 Cleanup in SMM CPU Driver #5921

Closed jiaxinwu closed 1 month ago

jiaxinwu commented 1 month ago

S3 Cleanup in SMM CPU Driver

This PR belongs to the code cleanup & refinement.

There are 3 commits in the PR:

  1. clean unused PCD for S3 This patch is to clean the PcdCpuFeaturesInitOnS3Resume since it's unused after commit 077760fe

  2. Clean redundant SmmS3Cr3 Init The SmmS3Cr3 is only used by S3Resume PEIM to switch CPU from 32bit to 64bit, it should be the CR3 for Non-SMM environment and init by InitSmmS3Cr3 function. No need set to SMM CR3.

  3. Avoid use global variable in InitSmmS3Cr3 This patch is to avoid use global variable in InitSmmS3Cr3. No function impact.

No function impact for all patches in the PR.

How This Was Tested

Pass the build & boot & CI check.

leiflindholm commented 1 month ago

This PR has no description. Please address. And please fix the title.