aboutsummaryrefslogtreecommitdiff
path: root/src/soc/mediatek/mt8192/include
diff options
context:
space:
mode:
authorYidi Lin <yidi.lin@mediatek.com>2020-11-06 17:52:56 +0800
committerHung-Te Lin <hungte@chromium.org>2020-11-20 08:40:58 +0000
commit2832d11dd1aa59a195c67296a2a39ae4689b74eb (patch)
tree110d90fb62790cc16f05d26367459490589d9114 /src/soc/mediatek/mt8192/include
parentf06dd678e6bc916d29335b945f54d732b31e1ee2 (diff)
mediatek/mt8192: memlayout: Add DRAM DMA region
SPM DMA hardware requires a non-cacheable buffer to load SPM firmware. TEST=verified with SPM WIP patch. SPM PC stays at 0x3f4 after SPM firmware is loaded. Signed-off-by: Yidi Lin <yidi.lin@mediatek.com> Change-Id: If6e803da23126419a96ffc0337d35edd0e181871 Reviewed-on: https://review.coreboot.org/c/coreboot/+/47293 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'src/soc/mediatek/mt8192/include')
-rw-r--r--src/soc/mediatek/mt8192/include/soc/memlayout.ld10
-rw-r--r--src/soc/mediatek/mt8192/include/soc/symbols.h9
2 files changed, 17 insertions, 2 deletions
diff --git a/src/soc/mediatek/mt8192/include/soc/memlayout.ld b/src/soc/mediatek/mt8192/include/soc/memlayout.ld
index 57b258c32c..c016d5faa7 100644
--- a/src/soc/mediatek/mt8192/include/soc/memlayout.ld
+++ b/src/soc/mediatek/mt8192/include/soc/memlayout.ld
@@ -14,6 +14,11 @@
#define DRAM_INIT_CODE(addr, size) \
REGION(dram_init_code, addr, size, 4)
+#define DRAM_DMA(addr, size) \
+ REGION(dram_dma, addr, size, 4K) \
+ _ = ASSERT(size % 4K == 0, \
+ "DRAM DMA buffer should be multiple of smallest page size (4K)!");
+
SECTIONS
{
SRAM_START(0x00100000)
@@ -41,8 +46,9 @@ SECTIONS
SRAM_L2C_END(0x00280000)
DRAM_START(0x40000000)
- POSTRAM_CBFS_CACHE(0x40000000, 2M)
- RAMSTAGE(0x40200000, 256K)
+ DRAM_DMA(0x40000000, 1M)
+ POSTRAM_CBFS_CACHE(0x40100000, 2M)
+ RAMSTAGE(0x40300000, 256K)
BL31(0x54600000, 0x60000)
}
diff --git a/src/soc/mediatek/mt8192/include/soc/symbols.h b/src/soc/mediatek/mt8192/include/soc/symbols.h
new file mode 100644
index 0000000000..a7feee7ea0
--- /dev/null
+++ b/src/soc/mediatek/mt8192/include/soc/symbols.h
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef _SOC_MEDIATEK_MT8192_SYMBOLS_H_
+#define _SOC_MEDIATEK_MT8192_SYMBOLS_H_
+#include <symbols.h>
+
+DECLARE_REGION(dram_dma)
+
+#endif /* _SOC_MEDIATEK_MT8192_SYMBOLS_H_ */