]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
Add PCD for 1G page table
[mirror_edk2.git] / MdeModulePkg / Core / DxeIplPeim / X64 / VirtualMemory.c
index e3ed4b676229c4681f1c6b1c6c69ddd2c5e2744b..795ae7034c10fdcb18fe2fb859ee07ef28a9b45c 100644 (file)
@@ -66,11 +66,13 @@ CreateIdentityMappingPageTables (
   PAGE_TABLE_1G_ENTRY                           *PageDirectory1GEntry;\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