From 5b66288d51412d48df24e72e9d53b8e90cf4b562 Mon Sep 17 00:00:00 2001 From: T Michael Turney Date: Tue, 24 Apr 2018 10:36:12 -0700 Subject: sdm845: Add DRAM resources TEST=build Change-Id: Icf934caf8b4584ef2633054a5cc7f5be7cc734ee Signed-off-by: T Michael Turney Reviewed-on: https://review.coreboot.org/25212 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner --- src/soc/qualcomm/sdm845/include/soc/memlayout.ld | 8 +++++--- src/soc/qualcomm/sdm845/include/soc/mmu.h | 2 ++ src/soc/qualcomm/sdm845/include/soc/symbols.h | 4 ++++ src/soc/qualcomm/sdm845/soc.c | 7 ++++++- 4 files changed, 17 insertions(+), 4 deletions(-) (limited to 'src/soc/qualcomm/sdm845') diff --git a/src/soc/qualcomm/sdm845/include/soc/memlayout.ld b/src/soc/qualcomm/sdm845/include/soc/memlayout.ld index 58a3032e39..9e5b35928e 100644 --- a/src/soc/qualcomm/sdm845/include/soc/memlayout.ld +++ b/src/soc/qualcomm/sdm845/include/soc/memlayout.ld @@ -46,7 +46,9 @@ SECTIONS REGION(pmic, 0x14976000, 0xA000, 4096) BSRAM_END(0x14980000) - DRAM_START(0x90000000) - POSTRAM_CBFS_CACHE(0x90000000, 384K) - RAMSTAGE(0x90800000, 128K) + DRAM_START(0x80000000) + /* Various hardware/software subsystems make use of this area */ + REGION(dram_reserved, 0x85000000, 0x1A800000, 4096) + POSTRAM_CBFS_CACHE(0x9F800000, 384K) + RAMSTAGE(0x9F860000, 128K) } diff --git a/src/soc/qualcomm/sdm845/include/soc/mmu.h b/src/soc/qualcomm/sdm845/include/soc/mmu.h index c9883bc0bf..299700a63f 100644 --- a/src/soc/qualcomm/sdm845/include/soc/mmu.h +++ b/src/soc/qualcomm/sdm845/include/soc/mmu.h @@ -16,6 +16,8 @@ #ifndef _SOC_QUALCOMM_SDM845_MMU_H__ #define _SOC_QUALCOMM_SDM845_MMU_H__ +#define DRAMSIZE4GB 0x100000000 + void sdm845_mmu_init(void); #endif // _SOC_QUALCOMM_SDM845_MMU_H_ diff --git a/src/soc/qualcomm/sdm845/include/soc/symbols.h b/src/soc/qualcomm/sdm845/include/soc/symbols.h index 6642eab194..163b54dc51 100644 --- a/src/soc/qualcomm/sdm845/include/soc/symbols.h +++ b/src/soc/qualcomm/sdm845/include/soc/symbols.h @@ -26,4 +26,8 @@ extern u8 _bsram[]; extern u8 _ebsram[]; #define _bsram_size (_ebsram - _bsram) +extern u8 _dram_reserved[]; +extern u8 _edram_reserved[]; +#define _dram_reserved_size (_edram_reserved - _dram_reserved) + #endif // _SOC_QUALCOMM_SDM845_SYMBOLS_H_ diff --git a/src/soc/qualcomm/sdm845/soc.c b/src/soc/qualcomm/sdm845/soc.c index b4ed121fd8..16f3655e6b 100644 --- a/src/soc/qualcomm/sdm845/soc.c +++ b/src/soc/qualcomm/sdm845/soc.c @@ -13,12 +13,17 @@ * GNU General Public License for more details. */ +#include #include #include +#include +#include static void soc_read_resources(device_t dev) { - + ram_resource(dev, 0, (uintptr_t)_dram / KiB, DRAMSIZE4GB / KiB); + reserved_ram_resource(dev, 1, (uintptr_t)_dram_reserved / KiB, + _dram_reserved_size / KiB); } static void soc_init(device_t dev) -- cgit v1.2.3