1 __STACK_SIZE = 0x20000;
2 __TI_STACK_SIZE = __STACK_SIZE;
4 MEMORY
5 {
6 OCMCRAM : ORIGIN = 0x000041C00000, LENGTH = 0x00080000 /* MCUSS-OCMC RAM - 512KB */
9 DDR_MPU1 (RWX) : ORIGIN = 0x80000000, LENGTH = 0x08000000
10 DDR_IPC (RWX) : ORIGIN = 0x90000000, LENGTH = 0x02000000
12 /* j721e MCMS3 locations */
13 /* j721e Reserved Memory for ARM Trusted Firmware */
14 MSMC3_ARM_FW (RWIX) : ORIGIN = 0x000070000000, LENGTH = 0x40000 /* 256KB */
15 BOOTVECTOR : ORIGIN = 0x000070040000, LENGTH = 0x1000 /* 4KB */
16 BOOTVECTOR_EL3 : ORIGIN = 0x000070041000, LENGTH = 0x1000 /* 4KB */
17 MSMC_MPU1 (RWX) : ORIGIN = 0x000070042000, LENGTH = 0x7AE000 /* 7864KB */
18 /* j721e Reserved Memory for DMSC Firmware */
19 MSMC3_DMSC_FW (RWIX) : ORIGIN = 0x0000707F0000, LENGTH = 0x10000 /* 64KB */
20 }
21 REGION_ALIAS("REGION_TEXT_EL3", DDR_MPU1);
22 REGION_ALIAS("REGION_TEXT", DDR_MPU1);
23 REGION_ALIAS("REGION_BSS", DDR_MPU1);
24 REGION_ALIAS("REGION_DATA", DDR_MPU1);
25 REGION_ALIAS("REGION_STACK", DDR_MPU1);
26 REGION_ALIAS("REGION_HEAP", DDR_MPU1);
27 REGION_ALIAS("REGION_ARM_EXIDX", DDR_MPU1);
28 REGION_ALIAS("REGION_ARM_EXTAB", DDR_MPU1);
29 REGION_ALIAS("REGION_TEXT_STARTUP", DDR_MPU1);
30 REGION_ALIAS("REGION_DATA_BUFFER", DDR_MPU1);
31 REGION_ALIAS("IPC_DATA_BUFFER_1", DDR_MPU1);
33 SECTIONS {
35 .vecs : {
36 *(.vecs)
37 } > BOOTVECTOR AT> BOOTVECTOR
39 .vectors : {
40 *(.vectors)
41 } > BOOTVECTOR_EL3 AT> BOOTVECTOR_EL3
42 .text.el3 : {
43 *(.text.el3)
44 /* Ensure 8-byte alignment for descriptors and ensure inclusion */
45 . = ALIGN(8);
46 __RT_SVC_DESCS_START__ = .;
47 KEEP(*(rt_svc_descs))
48 __RT_SVC_DESCS_END__ = .;
49 } > REGION_TEXT_EL3 AT> REGION_TEXT_EL3
51 .text.csl_a72_startup : {
52 *(.text.csl_a72_startup)
53 *(.Entry)
54 } > REGION_TEXT_STARTUP AT> REGION_TEXT_STARTUP
56 .text : {
57 CREATE_OBJECT_SYMBOLS
58 *(.text)
59 *(.text.*)
60 . = ALIGN(0x8);
61 KEEP (*(.ctors))
62 . = ALIGN(0x4);
63 KEEP (*(.dtors))
64 . = ALIGN(0x8);
65 __init_array_start = .;
66 KEEP (*(.init_array*))
67 __init_array_end = .;
68 *(.init)
69 *(.fini*)
70 } > REGION_TEXT AT> REGION_TEXT
72 PROVIDE (__etext = .);
73 PROVIDE (_etext = .);
74 PROVIDE (etext = .);
76 .rodata : {
77 *(.rodata)
78 *(.rodata*)
79 } > REGION_TEXT AT> REGION_TEXT
81 .data_buffer : ALIGN (8) {
82 __data_buffer_load__ = LOADADDR (.data_buffer);
83 __data_buffer_start__ = .;
84 *(.data_buffer)
85 *(.data_buffer*)
86 . = ALIGN (8);
87 __data_buffer_end__ = .;
88 } > REGION_DATA_BUFFER AT> REGION_DATA_BUFFER
90 .data : ALIGN (8) {
91 __data_load__ = LOADADDR (.data);
92 __data_start__ = .;
93 *(.data)
94 *(.data*)
95 . = ALIGN (8);
96 __data_end__ = .;
97 } > REGION_DATA AT> REGION_TEXT
99 .ARM.exidx : {
100 __exidx_start = .;
101 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
102 __exidx_end = .;
103 } > REGION_ARM_EXIDX AT> REGION_ARM_EXIDX
105 .ARM.extab : {
106 *(.ARM.extab* .gnu.linkonce.armextab.*)
107 } > REGION_ARM_EXTAB AT> REGION_ARM_EXTAB
109 .bss:extMemCache:ramdisk : {
110 } > DDR_MPU1 /* MSMC_MPU1 */
112 /* USB or any other LLD buffer for benchmarking */
113 .benchmark_buffer (NOLOAD) : ALIGN (32) {
114 } > DDR_MPU1
116 .bss:frameBuffer (NOLOAD) : ALIGN (32) {
117 } > DDR_MPU1
119 ipc_data_buffer (NOLOAD) : ALIGN (32) {
120 } > IPC_DATA_BUFFER_1
122 /* For NDK packet memory, we need to map this sections before .bss*/
123 .bss:NDK_PACKETMEM (NOLOAD) : ALIGN (128) {} > DDR_MPU1
124 .bss:NDK_MMBUFFER (NOLOAD) : ALIGN (128) {} > DDR_MPU1
126 .bss : {
127 __bss_start__ = .;
128 *(.shbss)
129 *(.bss)
130 *(.bss.*)
131 . = ALIGN (8);
132 __bss_end__ = .;
133 . = ALIGN (8);
134 *(COMMON)
135 } > REGION_BSS AT> REGION_BSS
137 .heap : {
138 __heap_start__ = .;
139 end = __heap_start__;
140 _end = end;
141 __end = end;
142 KEEP(*(.heap))
143 __heap_end__ = .;
144 __HeapLimit = __heap_end__;
145 } > REGION_HEAP AT> REGION_HEAP
147 .stack (NOLOAD) : ALIGN(16) {
148 _stack = .;
149 __stack = .;
150 KEEP(*(.stack))
151 } > REGION_STACK AT> REGION_STACK
153 __TI_STACK_BASE = __stack;
155 /* Stabs debugging sections. */
156 .stab 0 : { *(.stab) }
157 .stabstr 0 : { *(.stabstr) }
158 .stab.excl 0 : { *(.stab.excl) }
159 .stab.exclstr 0 : { *(.stab.exclstr) }
160 .stab.index 0 : { *(.stab.index) }
161 .stab.indexstr 0 : { *(.stab.indexstr) }
162 .comment 0 : { *(.comment) }
163 /*
164 * DWARF debug sections.
165 * Symbols in the DWARF debugging sections are relative to the beginning
166 * of the section so we begin them at 0.
167 */
168 /* DWARF 1 */
169 .debug 0 : { *(.debug) }
170 .line 0 : { *(.line) }
171 /* GNU DWARF 1 extensions */
172 .debug_srcinfo 0 : { *(.debug_srcinfo) }
173 .debug_sfnames 0 : { *(.debug_sfnames) }
174 /* DWARF 1.1 and DWARF 2 */
175 .debug_aranges 0 : { *(.debug_aranges) }
176 .debug_pubnames 0 : { *(.debug_pubnames) }
177 /* DWARF 2 */
178 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
179 .debug_abbrev 0 : { *(.debug_abbrev) }
180 .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end ) }
181 .debug_frame 0 : { *(.debug_frame) }
182 .debug_str 0 : { *(.debug_str) }
183 .debug_loc 0 : { *(.debug_loc) }
184 .debug_macinfo 0 : { *(.debug_macinfo) }
185 /* SGI/MIPS DWARF 2 extensions */
186 .debug_weaknames 0 : { *(.debug_weaknames) }
187 .debug_funcnames 0 : { *(.debug_funcnames) }
188 .debug_typenames 0 : { *(.debug_typenames) }
189 .debug_varnames 0 : { *(.debug_varnames) }
190 /* DWARF 3 */
191 .debug_pubtypes 0 : { *(.debug_pubtypes) }
192 .debug_ranges 0 : { *(.debug_ranges) }
193 /* DWARF Extension. */
194 .debug_macro 0 : { *(.debug_macro) }
195 .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
196 /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }
197 }