]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
MdeModulePkg/DxeIpl: Implement NULL pointer detection
[mirror_edk2.git] / MdeModulePkg / Core / DxeIplPeim / DxeIpl.h
index d25f0d5a6f7aa722eabdda335efd082555e56314..ecf186667a1c03375ab40a1f9a89f704377ef937 100644 (file)
@@ -2,7 +2,7 @@
   Master header file for DxeIpl PEIM. All source files in this module should\r
   include this file for common definitions.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2016, 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
@@ -27,6 +27,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Ppi/LoadFile.h>\r
 #include <Ppi/S3Resume2.h>\r
 #include <Ppi/RecoveryModule.h>\r
+#include <Ppi/VectorHandoffInfo.h>\r
 \r
 #include <Guid/MemoryTypeInformation.h>\r
 #include <Guid/MemoryAllocationHob.h>\r
@@ -46,6 +47,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/S3Lib.h>\r
 #include <Library/RecoveryLib.h>\r
 #include <Library/DebugAgentLib.h>\r
+#include <Library/PeiServicesTablePointerLib.h>\r
 \r
 #define STACK_SIZE      0x20000\r
 #define BSP_STORE_SIZE  0x4000\r
@@ -56,6 +58,24 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 //\r
 extern CONST EFI_PEI_PPI_DESCRIPTOR gEndOfPeiSignalPpi;\r
 \r
+/**\r
+   This function installs the PPIs that require permanent memory.\r
+\r
+   @param  PeiServices      Indirect reference to the PEI Services Table.\r
+   @param  NotifyDescriptor Address of the notification descriptor data structure.\r
+   @param  Ppi              Address of the PPI that was installed.\r
+\r
+   @return EFI_SUCCESS      The PPIs were installed successfully.\r
+   @return Others           Some error occurs during the execution of this function.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+InstallIplPermanentMemoryPpis (\r
+  IN EFI_PEI_SERVICES           **PeiServices,\r
+  IN EFI_PEI_NOTIFY_DESCRIPTOR  *NotifyDescriptor,\r
+  IN VOID                       *Ppi\r
+  );\r
 \r
 /**\r
    Searches DxeCore in all firmware Volumes and loads the first\r
@@ -220,4 +240,29 @@ Decompress (
   OUT       UINTN                   *OutputSize\r
   );\r
 \r
+/**\r
+   Clear legacy memory located at the first 4K-page.\r
+\r
+   This function traverses the whole HOB list to check if memory from 0 to 4095\r
+   exists and has not been allocated, and then clear it if so.\r
+\r
+   @param HoStart         The start of HobList passed to DxeCore.\r
+\r
+**/\r
+VOID\r
+ClearFirst4KPage (\r
+  IN  VOID *HobStart\r
+  );\r
+\r
+/**\r
+   Return configure status of NULL pointer detection feature\r
+\r
+   @return TRUE   NULL pointer detection feature is enabled\r
+   @return FALSE  NULL pointer detection feature is disabled\r
+**/\r
+BOOLEAN\r
+IsNullDetectionEnabled (\r
+  VOID\r
+  );\r
+\r
 #endif\r