diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2018-03-13 14:04:21 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-04-04 07:44:21 +0200 |
commit | 8bdd7a116b3dc3b04fa0ebb6799baf455182be8a (patch) | |
tree | a9a5ee177411ec68df7046b4a9192c511156af8d | |
parent | 95c1647246d5123b938cf47f9a9c7de8ac291b3c (diff) | |
download | barebox-8bdd7a116b3dc3b04fa0ebb6799baf455182be8a.tar.gz barebox-8bdd7a116b3dc3b04fa0ebb6799baf455182be8a.tar.xz |
ARM: aarch64: Add barebox head support
Allow aarch64 images to use the same image header as arm32 images.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | arch/arm/configs/qemu_virt64_defconfig | 5 | ||||
-rw-r--r-- | arch/arm/include/asm/barebox-arm-head.h | 13 |
2 files changed, 14 insertions, 4 deletions
diff --git a/arch/arm/configs/qemu_virt64_defconfig b/arch/arm/configs/qemu_virt64_defconfig index f8128aac08..9b7e11ff73 100644 --- a/arch/arm/configs/qemu_virt64_defconfig +++ b/arch/arm/configs/qemu_virt64_defconfig @@ -1,11 +1,8 @@ +CONFIG_TEXT_BASE=0x41000000 CONFIG_ARCH_QEMU=y -CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x05000000 -CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y CONFIG_MMU=y # CONFIG_MMU_EARLY is not set -CONFIG_TEXT_BASE=0x41000000 -CONFIG_BAREBOX_MAX_BARE_INIT_SIZE=0x01000000 CONFIG_PROMPT="qemu-virt64: " CONFIG_GLOB=y CONFIG_HUSH_FANCY_PROMPT=y diff --git a/arch/arm/include/asm/barebox-arm-head.h b/arch/arm/include/asm/barebox-arm-head.h index bd9c9b1c4f..4d0da6c491 100644 --- a/arch/arm/include/asm/barebox-arm-head.h +++ b/arch/arm/include/asm/barebox-arm-head.h @@ -21,6 +21,7 @@ void cortex_a7_lowlevel_init(void); static inline void __barebox_arm_head(void) { __asm__ __volatile__ ( +#ifdef CONFIG_CPU_32 #ifdef CONFIG_THUMB2_BAREBOX ".arm\n" "adr r9, 1f + 1\n" @@ -41,10 +42,22 @@ static inline void __barebox_arm_head(void) "1: b 1b\n" "1: b 1b\n" #endif +#else + "b 2f\n" + "nop\n" + "nop\n" + "nop\n" + "nop\n" + "nop\n" +#endif ".asciz \"barebox\"\n" +#ifdef CONFIG_CPU_32 ".word _text\n" /* text base. If copied there, * barebox can skip relocation */ +#else + ".word 0xffffffff\n" +#endif ".word _barebox_image_size\n" /* image size to copy */ ".rept 8\n" ".word 0x55555555\n" |