blob: 542e08d05e9d225cef7cb3a8393064d15a602f06 [file] [log] [blame]
Kyösti Mälkkia38d1b22014-11-10 15:08:47 +02001/*
2 * This file is part of the coreboot project.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
Kyösti Mälkkia38d1b22014-11-10 15:08:47 +020012 */
13
Kyösti Mälkkia38d1b22014-11-10 15:08:47 +020014#include <cbmem.h>
Julius Wernerec5e5e02014-08-20 15:29:56 -070015#include <symbols.h>
Patrick Rudolphbd4bcab2019-06-30 22:12:15 +020016#include <ramdetect.h>
Kyösti Mälkkia38d1b22014-11-10 15:08:47 +020017
18void *cbmem_top(void)
19{
Patrick Rudolphbd4bcab2019-06-30 22:12:15 +020020 return _dram + (probe_ramsize((uintptr_t)_dram, CONFIG_DRAM_SIZE_MB) * MiB);
Kyösti Mälkkia38d1b22014-11-10 15:08:47 +020021}