Angel Pons | 5f249e6 | 2020-04-04 18:51:01 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
David Hendricks | 8cbd569 | 2017-12-01 20:49:48 -0800 | [diff] [blame] | 2 | |
| 3 | #include <cbmem.h> |
| 4 | #include <soc/addressmap.h> |
| 5 | #include <soc/sdram.h> |
David Hendricks | 8cbd569 | 2017-12-01 20:49:48 -0800 | [diff] [blame] | 6 | #include <symbols.h> |
| 7 | |
Elyes Haouas | 799c321 | 2022-11-09 14:00:44 +0100 | [diff] [blame] | 8 | uintptr_t cbmem_top_chipset(void) |
David Hendricks | 8cbd569 | 2017-12-01 20:49:48 -0800 | [diff] [blame] | 9 | { |
Patrick Rudolph | 52acef1 | 2018-08-08 12:46:18 +0200 | [diff] [blame] | 10 | /* Make sure not to overlap with reserved ATF scratchpad */ |
Elyes Haouas | 799c321 | 2022-11-09 14:00:44 +0100 | [diff] [blame] | 11 | return (uintptr_t)_dram + (sdram_size_mb() - 1) * MiB; |
David Hendricks | 8cbd569 | 2017-12-01 20:49:48 -0800 | [diff] [blame] | 12 | } |