summaryrefslogtreecommitdiff
path: root/src/soc/qualcomm
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/qualcomm')
-rw-r--r--src/soc/qualcomm/sdm845/include/soc/memlayout.ld8
-rw-r--r--src/soc/qualcomm/sdm845/include/soc/mmu.h2
-rw-r--r--src/soc/qualcomm/sdm845/include/soc/symbols.h4
-rw-r--r--src/soc/qualcomm/sdm845/soc.c7
4 files changed, 17 insertions, 4 deletions
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 <symbols.h>
#include <device/device.h>
#include <timestamp.h>
+#include <soc/mmu.h>
+#include <soc/symbols.h>
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)