File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -168,20 +168,27 @@ struct arm_vector_table {
168168static void do_boot (struct boot_rsp * rsp )
169169{
170170 struct arm_vector_table * vt ;
171- uintptr_t flash_base ;
172- int rc ;
173171
174172 /* The beginning of the image is the ARM vector table, containing
175173 * the initial stack pointer address and the reset vector
176174 * consecutively. Manually set the stack pointer and jump into the
177175 * reset vector
178176 */
177+ #ifdef CONFIG_BOOT_RAM_LOAD
178+ /* Get ram address for image */
179+ vt = (struct arm_vector_table * )(rsp -> br_hdr -> ih_load_addr + rsp -> br_hdr -> ih_hdr_size );
180+ #else
181+ uintptr_t flash_base ;
182+ int rc ;
183+
184+ /* Jump to flash image */
179185 rc = flash_device_base (rsp -> br_flash_dev_id , & flash_base );
180186 assert (rc == 0 );
181187
182188 vt = (struct arm_vector_table * )(flash_base +
183189 rsp -> br_image_off +
184190 rsp -> br_hdr -> ih_hdr_size );
191+ #endif
185192
186193 sys_clock_disable ();
187194
You can’t perform that action at this time.
0 commit comments