2020-04-04 18:51:11 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2015-07-31 11:10:40 +02:00
|
|
|
|
|
|
|
#include <cbmem.h>
|
2019-12-19 07:47:52 +01:00
|
|
|
#include <commonlib/helpers.h>
|
2015-07-31 11:10:40 +02:00
|
|
|
#include <symbols.h>
|
2016-02-04 10:26:48 +01:00
|
|
|
#include <soc/emi.h>
|
2015-07-31 11:10:40 +02:00
|
|
|
|
2018-06-06 07:35:12 +02:00
|
|
|
#define MAX_DRAM_ADDRESS ((uintptr_t)4 * GiB)
|
|
|
|
|
2019-10-23 17:25:58 +02:00
|
|
|
void *cbmem_top_chipset(void)
|
2015-07-31 11:10:40 +02:00
|
|
|
{
|
2019-12-19 07:47:52 +01:00
|
|
|
return (void *)MIN((uintptr_t)_dram + sdram_size(), MAX_DRAM_ADDRESS);
|
2015-07-31 11:10:40 +02:00
|
|
|
}
|