diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-11-26 10:17:00 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-12-10 14:35:33 +0100 |
commit | 0644d1da7f547ba1b49ca95553ba65695ce9a3c3 (patch) | |
tree | 17088ff15ef3eb381bc989f6e863316699f828d5 /arch/arm/boards/terasic-sockit | |
parent | 509f62209907d6cc4c8d4b4e95aff91c7684f5db (diff) | |
download | barebox-0644d1da7f547ba1b49ca95553ba65695ce9a3c3.tar.gz barebox-0644d1da7f547ba1b49ca95553ba65695ce9a3c3.tar.xz |
ARM: Make ENTRY_FUNCTION more robust
An entry function should begin with a exception header. For this to work
properly the entry function should not contain any code which gcc might
put before the header. To make this sure change the ENTRY_FUNCTION macro
so that it generates one function which only contains the exception header
and a second function which contains the original body of the entry function.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/terasic-sockit')
-rw-r--r-- | arch/arm/boards/terasic-sockit/lowlevel.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/arm/boards/terasic-sockit/lowlevel.c b/arch/arm/boards/terasic-sockit/lowlevel.c index 8a1e0ce430..0a4a923031 100644 --- a/arch/arm/boards/terasic-sockit/lowlevel.c +++ b/arch/arm/boards/terasic-sockit/lowlevel.c @@ -45,12 +45,10 @@ static inline void ledoff(int led) extern char __dtb_socfpga_cyclone5_sockit_start[]; -ENTRY_FUNCTION(start_socfpga_sockit)(void) +ENTRY_FUNCTION(start_socfpga_sockit, r0, r1, r2) { uint32_t fdt; - __barebox_arm_head(); - arm_cpu_lowlevel_init(); fdt = (uint32_t)__dtb_socfpga_cyclone5_sockit_start - get_runtime_offset(); @@ -87,10 +85,8 @@ static noinline void sockit_entry(void) barebox_arm_entry(0x0, SZ_1G, 0); } -ENTRY_FUNCTION(start_socfpga_sockit_xload)(void) +ENTRY_FUNCTION(start_socfpga_sockit_xload, r0, r1, r2) { - __barebox_arm_head(); - arm_cpu_lowlevel_init(); arm_setup_stack(0xffff0000 + SZ_64K - SZ_4K - 16); |