]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Library/HobLib.h
Updated headers to follow coding standard
[mirror_edk2.git] / MdePkg / Include / Library / HobLib.h
index b367b02cd450ebe9918798b66699da00fa625e4e..0e1555de1043299c923d4ce4b8b96fa6245c0a41 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Public include file for the HOB Library\r
 \r
-  Copyright (c) 2006, Intel Corporation                                                         \r
+  Copyright (c) 2006 - 2007, Intel Corporation                                                         \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
@@ -10,8 +10,6 @@
   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.h\r
-\r
 **/\r
 \r
 #ifndef __HOB_LIB_H__\r
@@ -122,6 +120,24 @@ GetFirstGuidHob (
   )\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
+\r
 /**\r
   Builds a HOB for a loaded PE32 module.\r
 \r
@@ -350,4 +366,15 @@ BuildMemoryAllocationHob (
   )\r
 ;\r
 \r
+#define GET_HOB_TYPE(Hob)     ((Hob).Header->HobType)\r
+#define GET_HOB_LENGTH(Hob)   ((Hob).Header->HobLength)\r
+#define GET_NEXT_HOB(Hob)     ((Hob).Raw + GET_HOB_LENGTH (Hob))\r
+#define END_OF_HOB_LIST(Hob)  (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_END_OF_HOB_LIST)\r
+\r
+//\r
+// Get the data and data size field of GUID \r
+//\r
+#define GET_GUID_HOB_DATA(GuidHob)      ((VOID *) (((UINT8 *) &((GuidHob)->Name)) + sizeof (EFI_GUID)))\r
+#define GET_GUID_HOB_DATA_SIZE(GuidHob) (((GuidHob)->Header).HobLength - sizeof (EFI_HOB_GUID_TYPE))\r
+\r
 #endif\r