Skip to content

Commit

Permalink
core: arm32: replace _start with reset() function
Browse files Browse the repository at this point in the history
Renames _start to reset_vect_table and renames reset() to _start() in
order to avoid pulling in too much unpaged code via
reset_secondary()/cpu_on_handler().

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
  • Loading branch information
jenswi-linaro committed Nov 2, 2017
1 parent d28db6c commit 93594c6
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions core/arch/arm/kernel/generic_entry_a32.S
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,18 @@ UNWIND( .fnend)
END_FUNC plat_cpu_reset_early
KEEP_PAGER plat_cpu_reset_early

FUNC _start , :
b reset
.section .text.reset_vect_table
.align 5
LOCAL_FUNC reset_vect_table , :
b .
b . /* Undef */
b . /* Syscall */
b . /* Prefetch abort */
b . /* Data abort */
b . /* Reserved */
b . /* IRQ */
b . /* FIQ */
END_FUNC _start
KEEP_INIT _start
END_FUNC reset_vect_table

.macro cpu_is_ready
#ifdef CFG_BOOT_SYNC_CPU
Expand Down Expand Up @@ -229,7 +230,7 @@ KEEP_INIT _start
mov r7, r1
.endm

LOCAL_FUNC reset , :
FUNC _start , :
UNWIND( .fnstart)
UNWIND( .cantunwind)

Expand All @@ -241,7 +242,7 @@ UNWIND( .cantunwind)
set_sctlr
isb

ldr r0, =_start
ldr r0, =reset_vect_table
write_vbar r0

#if defined(CFG_WITH_ARM_TRUSTED_FW)
Expand All @@ -253,7 +254,8 @@ UNWIND( .cantunwind)
b reset_secondary
#endif
UNWIND( .fnend)
END_FUNC reset
END_FUNC _start
KEEP_INIT _start

/*
* Setup sp to point to the top of the tmp stack for the current CPU:
Expand Down Expand Up @@ -506,7 +508,7 @@ UNWIND( .cantunwind)
set_sctlr
isb

ldr r0, =_start
ldr r0, =reset_vect_table
write_vbar r0

mov r4, lr
Expand All @@ -533,6 +535,8 @@ KEEP_PAGER cpu_on_handler
LOCAL_FUNC reset_secondary , :
UNWIND( .fnstart)
UNWIND( .cantunwind)
ldr r0, =reset_vect_table
write_vbar r0

wait_primary

Expand Down

0 comments on commit 93594c6

Please sign in to comment.