blob: 4760a1d3b6c08d63a483562ac4a3ebc9903a078b [file] [log] [blame]
Angel Pons5f249e62020-04-04 18:51:01 +02001/* SPDX-License-Identifier: GPL-2.0-only */
2/* This file is part of the coreboot project. */
David Hendricks8cbd5692017-12-01 20:49:48 -08003
4#include <cbmem.h>
5#include <soc/addressmap.h>
6#include <soc/sdram.h>
David Hendricks8cbd5692017-12-01 20:49:48 -08007#include <symbols.h>
8
Arthur Heymans340e4b82019-10-23 17:25:58 +02009void *cbmem_top_chipset(void)
David Hendricks8cbd5692017-12-01 20:49:48 -080010{
Patrick Rudolph52acef12018-08-08 12:46:18 +020011 /* Make sure not to overlap with reserved ATF scratchpad */
Patrick Rudolphab0a7742019-01-02 14:04:02 +010012 return (void *)((uintptr_t)_dram + (sdram_size_mb() - 1) * MiB);
David Hendricks8cbd5692017-12-01 20:49:48 -080013}