/* Return the MC address of private DRAM block. As per MC design document, MC initial base address should be least significant 512MB address of MC private memory, i.e. address should point to end address masked with 512MB offset in private DRAM block.  */
u64 mc_get_dram_addr(void)
/* Return the MC address of private DRAM block. As per MC design document, MC initial base address should be least significant 512MB address of MC private memory, i.e. address should point to end address masked with 512MB offset in private DRAM block.  */
u64 mc_get_dram_addr(void)
{
	size_t mc_ram_size = mc_get_dram_block_size();
	if (!mc_memset_resv_ram || (get_mc_boot_status() < 0)) {
		mc_memset_resv_ram = 1;
		memset((void *)gd->arch.resv_ram, 0, mc_ram_size);
	}
	return (gd->arch.resv_ram + mc_ram_size - 1) &
		MC_RAM_BASE_ADDR_ALIGNMENT_MASK;
}