]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/PeiHobLib/HobLib.c
remove some comments introduced by tools.
[mirror_edk2.git] / MdePkg / Library / PeiHobLib / HobLib.c
index 3765d47cdb3d7b4cfe59c516e7c69282934a9c13..710e112deebd7fcfc505133311a25438f190e305 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   HOB Library.\r
 \r
-  Copyright (c) 2006, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2007, 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
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-  Module Name:  HobLib.c\r
-\r
 **/\r
 \r
 \r
+#include <PiPei.h>\r
+\r
+#include <Guid/MemoryAllocationHob.h>\r
+\r
+#include <Library/HobLib.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/PeiServicesLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
 \r
 /**\r
   Returns the pointer to the HOB list.\r
@@ -167,6 +173,32 @@ GetFirstGuidHob (
   return GetNextGuidHob (Guid, HobList);\r
 }\r
 \r
+/**\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
+\r
+  @param  VOID\r
+\r
+  @return The Boot Mode.\r
+\r
+**/\r
+EFI_BOOT_MODE\r
+EFIAPI\r
+GetBootModeHob (\r
+  VOID\r
+  )\r
+{\r
+  EFI_STATUS             Status;\r
+  EFI_BOOT_MODE          BootMode;\r
+\r
+  Status = PeiServicesGetBootMode (&BootMode);\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  return BootMode;\r
+}\r
+\r
 /**\r
   Adds a new HOB to the HOB List.\r
 \r
@@ -178,6 +210,7 @@ GetFirstGuidHob (
   @return The address of new HOB.\r
 \r
 **/\r
+STATIC\r
 VOID *\r
 InternalPeiCreateHob (\r
   IN UINT16                      Type,\r
@@ -390,12 +423,7 @@ BuildCvHob (
   IN UINT64                      Length\r
   )\r
 {\r
-  EFI_HOB_CAPSULE_VOLUME  *Hob;\r
-\r
-  Hob = InternalPeiCreateHob (EFI_HOB_TYPE_CV, sizeof (EFI_HOB_CAPSULE_VOLUME));\r
-\r
-  Hob->BaseAddress  = BaseAddress;\r
-  Hob->Length       = Length;\r
+  ASSERT (FALSE);\r
 }\r
 \r
 /**\r