9
0
Fork 0
Commit Graph

3 Commits

Author SHA1 Message Date
Sascha Hauer a81ec0225f ARM: Add relocatable binary support
For making the same binary executable on different SoCs which have
different DRAM addresses we have to be independent of the compile
time link address.

This patch adds relocatable binary support for the ARM architecture.
With this two new functions are available. relocate_to_current_adr
will fixup the binary to continue executing from the current position.
relocate_to_adr will copy the binary to a given address, fixup the
binary and continue executing from there.

For the PBL and the real image relocatable support can be enabled
independently. This is done to (hopefully) better cope with setups
where the PBL runs from SRAM or ROM and the real binary does not.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-07 12:38:01 +01:00
Sascha Hauer ae59bd9fca ARM: add early mmu cache flush function and use it in setup_c
Since recently with MMU_EARLY support it may happen that setup_c
runs with data caches enabled, so we have to make sure the caches
are flushed before we jump to the new binary.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-04 12:02:10 +01:00
Sascha Hauer 1fcc223e9f ARM: add assembly function for setting up C environment
Sometimes Assembler beats C. In this case a small assembler
function called without parameters can:

- copy a binary to its link address
- clear the bss
- return to the same position in the copied binary

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-05 18:39:19 +02:00