diff options
author | Stephen Warren <swarren@nvidia.com> | 2016-01-14 14:03:11 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-01-14 16:27:13 -0500 |
commit | a737028e80603f49a4757adec10b5842d0689dbb (patch) | |
tree | e5b25ac2f0e6db0032eb67e2f1c351a7778faee8 | |
parent | f46c25583a73042edf432b209ee4b93bc3f7e762 (diff) | |
download | u-boot-a737028e80603f49a4757adec10b5842d0689dbb.zip u-boot-a737028e80603f49a4757adec10b5842d0689dbb.tar.gz u-boot-a737028e80603f49a4757adec10b5842d0689dbb.tar.bz2 |
arm: initialize gd for AArch64
Commit adc421e4cee8 "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: adc421e4cee8 ("arm: move gd handling outside of C code")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
-rw-r--r-- | arch/arm/lib/crt0_64.S | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/lib/crt0_64.S b/arch/arm/lib/crt0_64.S index b4fc760..cad22c7 100644 --- a/arch/arm/lib/crt0_64.S +++ b/arch/arm/lib/crt0_64.S @@ -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 |