]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/PeiHobLib/HobLib.c
Update HobLib and PeCoffLib according to MDE Lib Spec 0.61c
[mirror_edk2.git] / MdePkg / Library / PeiHobLib / HobLib.c
index d18d355a1f0451798defce5b0b0d080551439e07..c92c6c805fc5542afcb5afe8e78fbaf48b5a630d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  HOB Library.\r
+  Provide Hob Library functions for Pei phase.\r
 \r
-  Copyright (c) 2006 - 2007, Intel Corporation<BR>\r
+  Copyright (c) 2007 - 2008, Intel Corporation<BR>\r
   All rights reserved. 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
@@ -24,6 +24,7 @@
 \r
 /**\r
   Returns the pointer to the HOB list.\r
+  ASSERT() if the HOB list returned by GetHobList() is NULL.\r
 \r
   This function returns the pointer to first HOB in the list.\r
 \r
@@ -176,8 +177,8 @@ GetFirstGuidHob (
 /**\r
   Get the Boot Mode from the HOB list.\r
 \r
-  This function returns the system boot mode information from the \r
-  PHIT HOB in HOB list.\r
+  This function returns the system boot mode information \r
+  by PeiCore GetBootMode Service.\r
 \r
   @param  VOID\r
 \r
@@ -210,8 +211,8 @@ GetBootModeHob (
   @return The address of new HOB.\r
 \r
 **/\r
-STATIC\r
 VOID *\r
+EFIAPI\r
 InternalPeiCreateHob (\r
   IN UINT16                      Type,\r
   IN UINT16                      Length\r
@@ -443,13 +444,8 @@ BuildFv2Hob (
 /**\r
   Builds a Capsule Volume HOB.\r
 \r
-  This function builds a Capsule Volume HOB.\r
-  It can only be invoked during PEI phase;\r
-  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.\r
-  If there is no additional space for HOB creation, then ASSERT().\r
-\r
-  @param  BaseAddress   The base address of the Capsule Volume.\r
-  @param  Length        The size of the Capsule Volume in bytes.\r
+  This function is not supported, because Capsule Volume Hob is the platform\r
+  specific. It is not the common defintion in PI and UEFI spec.\r
 \r
 **/\r
 VOID\r
@@ -523,7 +519,7 @@ BuildStackHob (
   CopyGuid (&(Hob->AllocDescriptor.Name), &gEfiHobMemoryAllocStackGuid);\r
   Hob->AllocDescriptor.MemoryBaseAddress = BaseAddress;\r
   Hob->AllocDescriptor.MemoryLength      = Length;\r
-  Hob->AllocDescriptor.MemoryType        = EfiConventionalMemory;\r
+  Hob->AllocDescriptor.MemoryType        = EfiBootServicesData;\r
 \r
   //\r
   // Zero the reserved space to match HOB spec\r