- IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
- IN UINT64 Length,\r
- IN EFI_MEMORY_TYPE MemoryType\r
- )\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
+ IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
+ IN UINT64 Length,\r
+ IN EFI_MEMORY_TYPE MemoryType\r
+ );\r
+\r
+/**\r
+ Returns the type of a HOB.\r
+\r
+ This macro returns the HobType field from the HOB header for the\r
+ HOB specified by HobStart.\r
+\r
+ @param HobStart A pointer to a HOB.\r
+\r
+ @return HobType.\r
+\r
+**/\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
+\r
+ This macro returns the HobLength field from the HOB header for the\r
+ HOB specified by HobStart.\r
+\r
+ @param HobStart A pointer to a HOB.\r
+\r
+ @return HobLength.\r
+\r
+**/\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
+\r
+ This macro returns a pointer to HOB that follows the\r
+ HOB specified by HobStart in the HOB List.\r
+\r
+ @param HobStart A pointer to a HOB.\r
+\r
+ @return A pointer to the next HOB in the HOB list.\r
+\r
+**/\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
+\r
+ This macro determine if the HOB specified by HobStart is the\r
+ last HOB in the HOB list. If HobStart is last HOB in the HOB list,\r
+ then TRUE is returned. Otherwise, FALSE is returned.\r
+\r
+ @param HobStart A pointer to a HOB.\r
+\r
+ @retval TRUE The HOB specified by HobStart is the last HOB in the HOB list.\r
+ @retval FALSE The HOB specified by HobStart is not the last HOB in the HOB list.\r
+\r
+**/\r
+#define END_OF_HOB_LIST(HobStart) (GET_HOB_TYPE (HobStart) == (UINT16)EFI_HOB_TYPE_END_OF_HOB_LIST)\r
+\r
+/**\r
+ Returns a pointer to data buffer from a HOB of type EFI_HOB_TYPE_GUID_EXTENSION.\r
+\r
+ This macro returns a pointer to the data buffer in a HOB specified by HobStart.\r
+ HobStart is assumed to be a HOB of type EFI_HOB_TYPE_GUID_EXTENSION.\r
+\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(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
+\r
+ This macro returns the size, in bytes, of the data buffer in a HOB specified by HobStart.\r
+ HobStart is assumed to be a HOB of type EFI_HOB_TYPE_GUID_EXTENSION.\r
+\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(HobStart) \\r
+ (UINT16)(GET_HOB_LENGTH (HobStart) - sizeof (EFI_HOB_GUID_TYPE))\r