summaryrefslogtreecommitdiff
path: root/src/soc/sifive/fu540/cbmem.c
blob: 4ade9ad780b5d4348dcdb08e1e11b43e64b828c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* SPDX-License-Identifier: GPL-2.0-only */
/* This file is part of the coreboot project. */

#include <cbmem.h>
#include <commonlib/helpers.h>
#include <soc/addressmap.h>
#include <soc/sdram.h>
#include <symbols.h>

void *cbmem_top_chipset(void)
{
	return (void *)MIN((uintptr_t)_dram + sdram_size_mb() * MiB,
			   FU540_MAXDRAM);
}