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

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

#define MAX_DRAM_ADDRESS ((uintptr_t)4 * GiB)

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