/* The memory initialization has already been done in previous Slim Bootloader stage thru FSP-M. Instead, this sets the ram_size from the memory map info hob.  */
int dram_init(void)
/* The memory initialization has already been done in previous Slim Bootloader stage thru FSP-M. Instead, this sets the ram_size from the memory map info hob.  */
int dram_init(void)
{
	struct sbl_memory_map_info *data;
	int i;
	u64 ram_size;
	data = get_memory_map_info();
	ram_size = 0;
	for_each_memory_map_entry_reversed(i, data) {
		ram_size = data->entry[i].addr + data->entry[i].size;
		break;
	}
	if (!ram_size)
		panic("failed to detect memory size");
	gd->ram_size = ram_size;
	return 0;
}