blob: 172491eb57abb2db6535ec3454db25bc62c6701b [file] [log] [blame]
Angel Ponsbbc99cf2020-04-04 18:51:23 +02001/* SPDX-License-Identifier: GPL-2.0-only */
jinkun.hongac490b82014-06-22 20:40:39 -07002
jinkun.hongac490b82014-06-22 20:40:39 -07003#include <cbmem.h>
Elyes HAOUASba9b5042019-12-19 07:47:52 +01004#include <commonlib/helpers.h>
Lin Huang19eb7502016-03-26 11:50:05 +08005#include <soc/addressmap.h>
huang linee28c862015-01-26 21:04:55 +08006#include <soc/sdram.h>
Lin Huang19eb7502016-03-26 11:50:05 +08007#include <symbols.h>
Julius Werner7a453eb2014-10-20 13:14:55 -07008
Elyes Haouas799c3212022-11-09 14:00:44 +01009uintptr_t cbmem_top_chipset(void)
jinkun.hongac490b82014-06-22 20:40:39 -070010{
Elyes Haouas799c3212022-11-09 14:00:44 +010011 return MIN((uintptr_t)_dram + sdram_size_mb() * MiB, MAX_DRAM_ADDRESS);
jinkun.hongac490b82014-06-22 20:40:39 -070012}