diff options
author | Patrick Rudolph <patrick.rudolph@9elements.com> | 2018-08-08 12:46:18 +0200 |
---|---|---|
committer | Philipp Deppenwiese <zaolin.daisuki@gmail.com> | 2018-08-10 23:24:56 +0000 |
commit | 52acef175e42374d463214427678e3e7828960c3 (patch) | |
tree | cb844d51ba05d534bffd3c7b54bcd911c774e963 /src/soc/cavium/cn81xx/soc.c | |
parent | eead87961f909a012a74cbd47effe83c76eaf5e7 (diff) | |
download | coreboot-52acef175e42374d463214427678e3e7828960c3.tar.xz |
soc/cavium/cn81xx: Fix minor things
* Move cbmem.c to cn81xx folder
* Store CBMEM below 4 GiB
* Make sure CBMEM doesn't overlap with ATF scratchpad
* Fix ATF scratchpad not marked as reserved due to wrong calculation
* The scratchpad is the last 1 MiB at the end of DRAM.
Tested on Cavium CN81xx EVB:
The ATF scratchpad is now marked reserved and the configuration tables
are located below 4 GiB. Linux still boots.
Change-Id: Ibbc8b586f04bd6867c045f5546b32a77c057ac74
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/27955
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/cavium/cn81xx/soc.c')
-rw-r--r-- | src/soc/cavium/cn81xx/soc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/soc/cavium/cn81xx/soc.c b/src/soc/cavium/cn81xx/soc.c index b575ca4391..8efcb1374c 100644 --- a/src/soc/cavium/cn81xx/soc.c +++ b/src/soc/cavium/cn81xx/soc.c @@ -309,7 +309,8 @@ void bootmem_platform_add_ranges(void) BM_MEM_RESERVED); /* Scratchpad for ATF SATA quirks */ - bootmem_add_range(sdram_size_mb() * KiB, 1 * MiB, BM_MEM_RESERVED); + bootmem_add_range((sdram_size_mb() - 1) * MiB, 1 * MiB, + BM_MEM_RESERVED); } static void soc_read_resources(device_t dev) |