/* This returns a data pointer of memory map info from the guid hob. */
static struct sbl_memory_map_info* get_memory_map_info(void)
/* This returns a data pointer of memory map info from the guid hob. */
static struct sbl_memory_map_info* get_memory_map_info(void)
{
	struct sbl_memory_map_info *data;
	const efi_guid_t guid = SBL_MEMORY_MAP_INFO_GUID;
	if (!gd->arch.hob_list)
		return NULL;
	data = hob_get_guid_hob_data(gd->arch.hob_list, NULL, &guid);
	if (!data)
		panic("memory map info hob not found\n");
	if (!data->count)
		panic("invalid number of memory map entries\n");
	return data;
}