allows the PEI phase to pass information to the DXE phase. HOBs are position \r
independent and can be relocated easily to different memory memory locations.\r
\r
-Copyright (c) 2006 - 2008, Intel Corporation\r
+Copyright (c) 2006 - 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
@return HobType\r
\r
**/\r
-#define GET_HOB_TYPE(Hob) ((Hob).Header->HobType)\r
+#define GET_HOB_TYPE(HobStart) \\r
+ ((*(EFI_HOB_GENERIC_HEADER **)&(HobStart))->HobType)\r
\r
/**\r
Returns the length, in bytes, of a HOB.\r
@return HobLength\r
\r
**/\r
-#define GET_HOB_LENGTH(Hob) ((Hob).Header->HobLength)\r
+#define GET_HOB_LENGTH(HobStart) \\r
+ ((*(EFI_HOB_GENERIC_HEADER **)&(HobStart))->HobLength)\r
\r
/**\r
Returns a pointer to the next HOB in the HOB list.\r
@return A pointer to the next HOB in the HOB list.\r
\r
**/\r
-#define GET_NEXT_HOB(Hob) ((Hob).Raw + GET_HOB_LENGTH (Hob))\r
+#define GET_NEXT_HOB(HobStart) \\r
+ (VOID *)(*(UINT8 **)&(HobStart) + GET_HOB_LENGTH (HobStart))\r
\r
/**\r
Determines if a HOB is the last HOB in the HOB list.\r
This macro returns a pointer to the data buffer in a HOB specified by Hob.\r
Hob is assumed to be a HOB of type EFI_HOB_TYPE_GUID_EXTENSION. \r
\r
- @param Hob A pointer to a HOB.\r
+ @param GuidHob A pointer to a HOB.\r
\r
@return A pointer to the data buffer in a HOB\r
\r
**/\r
-#define GET_GUID_HOB_DATA(GuidHob) ((VOID *) (((UINT8 *) &((GuidHob)->Name)) + sizeof (EFI_GUID)))\r
+#define GET_GUID_HOB_DATA(HobStart) \\r
+ (VOID *)(*(UINT8 **)&(HobStart) + sizeof (EFI_HOB_GUID_TYPE))\r
\r
/**\r
Returns the size of the data buffer from a HOB of type EFI_HOB_TYPE_GUID_EXTENSION.\r
This macro returns the size, in bytes, of the data buffer in a HOB specified by Hob.\r
Hob is assumed to be a HOB of type EFI_HOB_TYPE_GUID_EXTENSION.\r
\r
- @param Hob A pointer to a HOB.\r
+ @param GuidHob A pointer to a HOB.\r
\r
@return The size of the data buffer\r
**/\r
-#define GET_GUID_HOB_DATA_SIZE(GuidHob) (((GuidHob)->Header).HobLength - sizeof (EFI_HOB_GUID_TYPE))\r
+#define GET_GUID_HOB_DATA_SIZE(HobStart) \\r
+ (UINT16)(GET_HOB_LENGTH (HobStart) - sizeof (EFI_HOB_GUID_TYPE))\r
\r
#endif\r