]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Pi/PiPeiCis.h
MdePkg PiPeiCis.h: Add FreePages definition
[mirror_edk2.git] / MdePkg / Include / Pi / PiPeiCis.h
index f57f3331b14ac91d9672c2dc3c36843ca2890530..aebe3eacf442e84eaff7774b531aa6420eaba9d4 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   PI PEI master include file. This file should match the PI spec.\r
 \r
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available under \r
 the terms and conditions of the BSD License that accompanies this distribution.  \r
 The full text of the license may be found at\r
@@ -12,7 +12,7 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
   @par Revision Reference:\r
-  PI Version 1.4.\r
+  PI Version 1.4a.\r
 \r
 **/\r
 \r
@@ -73,6 +73,7 @@ EFI_STATUS
   @param  Ppi              Address of the PPI that was installed.\r
 \r
   @return Status of the notification.\r
+          The status code returned from this function is ignored.\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -229,7 +230,7 @@ EFI_STATUS
 \r
   @retval EFI_SUCCESS           The interface was successfully installed.\r
   @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL, or any of the PEI PPI descriptors in the \r
-                                list do not have the EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.\r
+                                list do not have the EFI_PEI_PPI_DESCRIPTOR_NOTIFY_TYPES bit set in the Flags field.\r
   @retval EFI_OUT_OF_RESOURCES  There is no additional space in the PPI database.\r
 \r
 **/\r
@@ -451,6 +452,11 @@ EFI_STATUS
   The purpose of the service is to publish an interface that allows \r
   PEIMs to allocate memory ranges that are managed by the PEI Foundation.\r
 \r
+  Prior to InstallPeiMemory() being called, PEI will allocate pages from the heap.\r
+  After InstallPeiMemory() is called, PEI will allocate pages within the region\r
+  of memory provided by InstallPeiMemory() service in a best-effort fashion.\r
+  Location-specific allocations are not managed by the PEI foundation code.\r
+\r
   @param  PeiServices      An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
   @param  MemoryType       The type of memory to allocate.\r
   @param  Pages            The number of contiguous 4 KB pages to allocate.\r
@@ -473,6 +479,27 @@ EFI_STATUS
   OUT EFI_PHYSICAL_ADDRESS      *Memory\r
   );\r
 \r
+/**\r
+  Frees memory pages.\r
+\r
+  @param[in] PeiServices        An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
+  @param[in] Memory             The base physical address of the pages to be freed.\r
+  @param[in] Pages              The number of contiguous 4 KB pages to free.\r
+\r
+  @retval EFI_SUCCESS           The requested pages were freed.\r
+  @retval EFI_INVALID_PARAMETER Memory is not a page-aligned address or Pages is invalid.\r
+  @retval EFI_NOT_FOUND         The requested memory pages were not allocated with\r
+                                AllocatePages().\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_PEI_FREE_PAGES) (\r
+  IN CONST EFI_PEI_SERVICES     **PeiServices,\r
+  IN EFI_PHYSICAL_ADDRESS       Memory,\r
+  IN UINTN                      Pages\r
+  );\r
+\r
 /**\r
   The purpose of this service is to publish an interface that \r
   allows PEIMs to allocate memory ranges that are managed by the PEI Foundation.\r
@@ -589,7 +616,7 @@ EFI_STATUS
 \r
   @param[in] ResetType      The type of reset to perform.\r
   @param[in] ResetStatus    The status code for the reset.\r
-  @param[in] DataSize       The size, in bytes, of WatchdogData.\r
+  @param[in] DataSize       The size, in bytes, of ResetData.\r
   @param[in] ResetData      For a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown\r
                             the data buffer starts with a Null-terminated string, optionally\r
                             followed by additional binary data. The string is a description\r
@@ -928,6 +955,7 @@ struct _EFI_PEI_SERVICES {
   EFI_PEI_FFS_FIND_SECTION_DATA3  FindSectionData3;\r
   EFI_PEI_FFS_GET_FILE_INFO2      FfsGetFileInfo2;\r
   EFI_PEI_RESET2_SYSTEM           ResetSystem2;\r
+  EFI_PEI_FREE_PAGES              FreePages;\r
 };\r
 \r
 \r
@@ -1003,13 +1031,14 @@ typedef struct _EFI_SEC_PEI_HAND_OFF {
   allows the SEC phase to pass information about the stack,\r
   temporary RAM and the Boot Firmware Volume. In addition, it also\r
   allows the SEC phase to pass services and data forward for use\r
-  during the PEI phase in the form of one or more PPIs. There is\r
-  no limit to the number of additional PPIs that can be passed\r
-  from SEC into the PEI Foundation. As part of its initialization\r
-  phase, the PEI Foundation will add these SEC-hosted PPIs to its\r
-  PPI database such that both the PEI Foundation and any modules\r
-  can leverage the associated service calls and/or code in these\r
-  early PPIs.\r
+  during the PEI phase in the form of one or more PPIs. These PPI's\r
+  will be installed and/or immediately signaled if they are\r
+  notification type. There is no limit to the number of additional\r
+  PPIs that can be passed from SEC into the PEI Foundation. As part\r
+  of its initialization phase, the PEI Foundation will add these\r
+  SEC-hosted PPIs to its PPI database such that both the PEI\r
+  Foundation and any modules can leverage the associated service\r
+  calls and/or code in these early PPIs.\r
 \r
   @param SecCoreData    Points to a data structure containing\r
                         information about the PEI core's\r