]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Library/DxeServicesLib.h
MdePkg/DxeServicesLib: introduce AllocatePeiAccessiblePages routine
[mirror_edk2.git] / MdePkg / Include / Library / DxeServicesLib.h
index 7c1c62236d96df354b994d7e2c0f20fea49789fd..20aee68af55821507f982de312a99a7d786bb97a 100644 (file)
@@ -305,5 +305,26 @@ GetFileDevicePathFromAnyFv (
   OUT       EFI_DEVICE_PATH_PROTOCOL  **FvFileDevicePath\r
   );\r
 \r
-#endif\r
+/**\r
+  Allocates one or more 4KB pages of a given type from a memory region that is\r
+  accessible to PEI.\r
+\r
+  Allocates the number of 4KB pages of type 'MemoryType' and returns a\r
+  pointer to the allocated buffer.  The buffer returned is aligned on a 4KB\r
+  boundary.  If Pages is 0, then NULL is returned.  If there is not enough\r
+  memory remaining to satisfy the request, then NULL is returned.\r
 \r
+  @param[in]  MemoryType            The memory type to allocate\r
+  @param[in]  Pages                 The number of 4 KB pages to allocate.\r
+\r
+  @return A pointer to the allocated buffer or NULL if allocation fails.\r
+\r
+**/\r
+VOID *\r
+EFIAPI\r
+AllocatePeiAccessiblePages (\r
+  IN EFI_MEMORY_TYPE  MemoryType,\r
+  IN UINTN            Pages\r
+  );\r
+\r
+#endif\r