]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
Add PCD for 1G page table
[mirror_edk2.git] / UefiCpuPkg / Universal / Acpi / S3Resume2Pei / S3Resume.c
index 110b376d4501c60c62f3dee49acfc72089a20bab..3afd0ff0e395859679c22afae22fc51bd9fa368a 100644 (file)
@@ -518,11 +518,13 @@ RestoreS3PageTables (
     S3NvsPageTableAddress += SIZE_4KB;\r
     \r
     Page1GSupport = FALSE;\r
-    AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL);\r
-    if (RegEax >= 0x80000001) {\r
-      AsmCpuid (0x80000001, NULL, NULL, NULL, &RegEdx);\r
-      if ((RegEdx & BIT26) != 0) {\r
-        Page1GSupport = TRUE;\r
+    if (PcdGetBool(PcdUse1GPageTable)) {\r
+      AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL);\r
+      if (RegEax >= 0x80000001) {\r
+        AsmCpuid (0x80000001, NULL, NULL, NULL, &RegEdx);\r
+        if ((RegEdx & BIT26) != 0) {\r
+          Page1GSupport = TRUE;\r
+        }\r
       }\r
     }\r
     \r