Kyösti Mälkki | a38d1b2 | 2014-11-10 15:08:47 +0200 | [diff] [blame] | 1 | /* |
| 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älkki | a38d1b2 | 2014-11-10 15:08:47 +0200 | [diff] [blame] | 12 | */ |
| 13 | |
Kyösti Mälkki | a38d1b2 | 2014-11-10 15:08:47 +0200 | [diff] [blame] | 14 | #include <cbmem.h> |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 15 | #include <symbols.h> |
Patrick Rudolph | bd4bcab | 2019-06-30 22:12:15 +0200 | [diff] [blame] | 16 | #include <ramdetect.h> |
Kyösti Mälkki | a38d1b2 | 2014-11-10 15:08:47 +0200 | [diff] [blame] | 17 | |
Arthur Heymans | 340e4b8 | 2019-10-23 17:25:58 +0200 | [diff] [blame] | 18 | void *cbmem_top_chipset(void) |
Kyösti Mälkki | a38d1b2 | 2014-11-10 15:08:47 +0200 | [diff] [blame] | 19 | { |
Patrick Rudolph | bd4bcab | 2019-06-30 22:12:15 +0200 | [diff] [blame] | 20 | return _dram + (probe_ramsize((uintptr_t)_dram, CONFIG_DRAM_SIZE_MB) * MiB); |
Kyösti Mälkki | a38d1b2 | 2014-11-10 15:08:47 +0200 | [diff] [blame] | 21 | } |