rockchip: add pmusram section
the function pmu_cpuon_entrypoint() need to run in the pmusram,
we just copy bin file to pmusram before, now we add pmusram section
and link pmu_cpuon_entrypoint() to pmusram directly
Change-Id: Iae31e4c01c480c8e6f565a8f588332b478efdb16
Signed-off-by: Lin Huang <hl@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
diff --git a/plat/rockchip/rk3328/include/plat.ld.S b/plat/rockchip/rk3328/include/plat.ld.S
index ff17572..b3559b2 100644
--- a/plat/rockchip/rk3328/include/plat.ld.S
+++ b/plat/rockchip/rk3328/include/plat.ld.S
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -7,39 +7,31 @@
#define __ROCKCHIP_PLAT_LD_S__
MEMORY {
- SRAM (rwx): ORIGIN = SRAM_LDS_BASE, LENGTH = SRAM_LDS_SIZE
+ PMUSRAM (rwx): ORIGIN = PMUSRAM_BASE, LENGTH = PMUSRAM_RSIZE
}
SECTIONS
{
- . = SRAM_LDS_BASE;
- ASSERT(. == ALIGN(4096),
- "SRAM_BASE address is not aligned on a page boundary.")
+ . = PMUSRAM_BASE;
/*
- * The SRAM space allocation for RK3328
- * ----------------
- * | sram text
- * ----------------
- * | sram data
- * ----------------
+ * pmu_cpuson_entrypoint request address
+ * align 64K when resume, so put it in the
+ * start of pmusram
*/
- .text_sram : ALIGN(4096) {
- __bl31_sram_text_start = .;
- *(.sram.text)
- *(.sram.rodata)
- . = ALIGN(4096);
- __bl31_sram_text_end = .;
- } >SRAM
+ .text_pmusram : {
+ ASSERT(. == ALIGN(64 * 1024),
+ ".pmusram.entry request 64K aligned.");
+ *(.pmusram.entry)
+ __bl31_pmusram_text_start = .;
+ *(.pmusram.text)
+ *(.pmusram.rodata)
+ __bl31_pmusram_text_end = .;
+ __bl31_pmusram_data_start = .;
+ *(.pmusram.data)
+ __bl31_pmusram_data_end = .;
- .data_sram : ALIGN(4096) {
- __bl31_sram_data_start = .;
- *(.sram.data)
- . = ALIGN(4096);
- __bl31_sram_data_end = .;
- } >SRAM
- __sram_incbin_start = .;
- __sram_incbin_end = .;
+ } >PMUSRAM
}
#endif /* __ROCKCHIP_PLAT_LD_S__ */