Skip to content

Commit

Permalink
arm: initialize gd for AArch64
Browse files Browse the repository at this point in the history
Commit adc421e "arm: move gd handling outside of C code" removed
the call to arch_setup_gd() on ARM and replaced it with assembly code
in crt0.S. However, AArch64 uses a different startup file, and the same
change was not made to it. This leaves gd uninitialized on AArch64, which
typically leads to hangs or crashes. This change fixes that.

Fixes: adc421e ("arm: move gd handling outside of C code")
Signed-off-by: Stephen Warren <[email protected]>
  • Loading branch information
nvswarren authored and trini committed Jan 14, 2016
1 parent f46c255 commit a737028
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/arm/lib/crt0_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ ENTRY(_main)
mov x0, sp
bl board_init_f_alloc_reserve
mov sp, x0
/* set up gd here, outside any C code */
mov x18, x0
bl board_init_f_init_reserve

mov x0, #0
Expand Down

0 comments on commit a737028

Please sign in to comment.