summaryrefslogtreecommitdiff
path: root/src/soc/mediatek/common/cbmem.c
blob: 0ca9e6b8022d3d20ebf6fb426343650a3a964ada (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* SPDX-License-Identifier: GPL-2.0-only */

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

#define MAX_DRAM_ADDRESS ((uintptr_t)4 * GiB)

uintptr_t cbmem_top_chipset(void)
{
	return MIN((uintptr_t)_dram + sdram_size(), MAX_DRAM_ADDRESS);
}