]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c
EDK II Packages: Add Contributions.txt and License.txt files
[mirror_edk2.git] / MdeModulePkg / Core / DxeIplPeim / X64 / DxeLoadFunc.c
index 05c5203d820f5706a2b4ba6c27b577f21e21b3cd..a6e5c28046ef7c05075fdc3b2e473ac167ecab9e 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   x64-specifc functionality for DxeLoad.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
@@ -22,9 +22,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
    This function performs a CPU architecture specific operations to execute\r
    the entry point of DxeCore with the parameters of HobList.\r
-   It also intalls EFI_END_OF_PEI_PPI to signal the end of PEI phase.\r
+   It also installs EFI_END_OF_PEI_PPI to signal the end of PEI phase.\r
 \r
-   @param DxeCoreEntryPoint         The entrypoint of DxeCore.\r
+   @param DxeCoreEntryPoint         The entry point of DxeCore.\r
    @param HobList                   The start of HobList passed to DxeCore.\r
 \r
 **/\r
@@ -52,18 +52,23 @@ HandOffToDxeCore (
   TopOfStack = (VOID *) ((UINTN) BaseOfStack + EFI_SIZE_TO_PAGES (STACK_SIZE) * EFI_PAGE_SIZE - CPU_STACK_ALIGNMENT);\r
   TopOfStack = ALIGN_POINTER (TopOfStack, CPU_STACK_ALIGNMENT);\r
 \r
+  PageTables = 0;\r
+  if (FeaturePcdGet (PcdDxeIplBuildPageTables)) {\r
+    //\r
+    // Create page table and save PageMapLevel4 to CR3\r
+    //\r
+    PageTables = CreateIdentityMappingPageTables ();\r
+  }\r
+  \r
   //\r
-  // Create page table and save PageMapLevel4 to CR3\r
-  //\r
-  PageTables = CreateIdentityMappingPageTables ();\r
-\r
-  //\r
-  // End of PEI phase singal\r
+  // End of PEI phase signal\r
   //\r
   Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);\r
   ASSERT_EFI_ERROR (Status);\r
 \r
-  AsmWriteCr3 (PageTables);\r
+  if (FeaturePcdGet (PcdDxeIplBuildPageTables)) {\r
+    AsmWriteCr3 (PageTables);\r
+  }\r
 \r
   //\r
   // Update the contents of BSP stack HOB to reflect the real stack info passed to DxeCore.\r