+ );\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