On 10/9/2018 4:09 PM, Laszlo Ersek wrote:

Two comments:
1. We'd better not map the PcdCpuStackGuard to paging-enable. Maybe some
other feature also enables the paging in PEI phase but the
PcdCpuStackGuard is FALSE.

I think I agree.

2. When PEI is in 64bit mode, disabling paging may not work because
paging-enable is a must in 64bit mode.

I think this case is academic. S3Resume2Pei does not support 64-bit PEI
with SMM enabled. This is why we have commit 5133d1f1d297 ("OvmfPkg:
replace README fine print about X64 SMM S3 with PlatformPei check",
2015-11-30) in OVMF.

I found that commit. I just checked S3Resume2Pei module. It does assumes it's running in 32bit mode. And CpuS3.c also assumes S3Resume2Pei is running in 32bit mode.


Anyway, I'm making this comment in the general sense only. I'm not
suggesting that we disable paging unconditionally. Actually, I believe,
I will suggest (under the v3 posting) restricting the write to CR0 even
more.
Why?


Thanks!
Laszlo


         AsmWriteCr3 ((UINTN)SmmS3ResumeState->SmmS3Cr3);

         //
diff --git a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf
b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf
index 6ce1bf944c..0f131d19df 100644
--- a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf
+++ b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf
@@ -90,6 +90,7 @@
   [Pcd]
     gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable  ##
SOMETIMES_CONSUMES

gEfiMdeModulePkgTokenSpaceGuid.PcdPteMemoryEncryptionAddressOrM
ask    ## CONSUMES
+
gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard                       ##
CONSUMES

   [Depex]
     TRUE
--
2.15.0.windows.1

_______________________________________________
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



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

Reply via email to