lowlevel_init.S 513 B

1234567891011121314151617181920
  1. #include <config.h>
  2. #ifndef CONFIG_SPL_BUILD
  3. .globl lowlevel_init
  4. lowlevel_init:
  5. /*
  6. * Copy exception table to relocated address in internal SRAM
  7. */
  8. ldr r0, src /* Address of exception table in flash */
  9. ldr r1, dest /* Relocated address of exception table */
  10. ldmia r0!, {r3-r10} /* Copy exception table and jump values from */
  11. stmia r1!, {r3-r10} /* FLASH to relocated address */
  12. ldmia r0!, {r3-r10}
  13. stmia r1!, {r3-r10}
  14. mov pc, lr
  15. src: .word CONFIG_SYS_TEXT_BASE
  16. dest: .word CONFIG_SRAM_BASE
  17. #endif