diff options
Diffstat (limited to 'arch/arm/lib64')
-rw-r--r-- | arch/arm/lib64/armlinux.c | 13 | ||||
-rw-r--r-- | arch/arm/lib64/barebox.lds.S | 14 | ||||
-rw-r--r-- | arch/arm/lib64/runtime-offset.S | 5 | ||||
-rw-r--r-- | arch/arm/lib64/stacktrace.c | 6 | ||||
-rw-r--r-- | arch/arm/lib64/string.c | 2 |
5 files changed, 23 insertions, 17 deletions
diff --git a/arch/arm/lib64/armlinux.c b/arch/arm/lib64/armlinux.c index 8382ffdf1b..3b108b21cb 100644 --- a/arch/arm/lib64/armlinux.c +++ b/arch/arm/lib64/armlinux.c @@ -5,6 +5,7 @@ #include <memory.h> #include <init.h> #include <bootm.h> +#include <efi/efi-mode.h> static int do_bootm_linux(struct image_data *data) { @@ -37,6 +38,12 @@ static struct image_handler aarch64_linux_handler = { .filetype = filetype_arm64_linux_image, }; +static struct image_handler aarch64_linux_efi_handler = { + .name = "ARM aarch64 Linux/EFI image", + .bootm = do_bootm_linux, + .filetype = filetype_arm64_efi_linux_image, +}; + static struct image_handler aarch64_fit_handler = { .name = "FIT image", .bootm = do_bootm_linux, @@ -55,7 +62,7 @@ static int do_bootm_barebox(struct image_data *data) if (ret) goto out; - barebox = start; + barebox = PAGE_ALIGN(start); ret = bootm_load_os(data, barebox); if (ret) @@ -83,6 +90,10 @@ static struct image_handler aarch64_barebox_handler = { static int aarch64_register_image_handler(void) { + if (efi_is_payload()) + return 0; + + register_image_handler(&aarch64_linux_efi_handler); register_image_handler(&aarch64_linux_handler); register_image_handler(&aarch64_barebox_handler); diff --git a/arch/arm/lib64/barebox.lds.S b/arch/arm/lib64/barebox.lds.S index 2ebaabef0f..de777ddb54 100644 --- a/arch/arm/lib64/barebox.lds.S +++ b/arch/arm/lib64/barebox.lds.S @@ -1,10 +1,10 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ /* SPDX-FileCopyrightText: 2000-2004 Wolfgang Denk <wd@denx.de>, DENX Software Engineering */ -#include <asm-generic/barebox.lds.h> +#include <asm/barebox.lds.h> -OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64") -OUTPUT_ARCH(aarch64) +OUTPUT_FORMAT(BAREBOX_OUTPUT_FORMAT) +OUTPUT_ARCH(BAREBOX_OUTPUT_ARCH) ENTRY(start) SECTIONS { @@ -49,13 +49,7 @@ SECTIONS .barebox_imd : { BAREBOX_IMD } - .rel_dyn_start : { *(.__rel_dyn_start) } - .rela.dyn : { *(.rela*) } - .rel_dyn_end : { *(.__rel_dyn_end) } - - .__dynsym_start : { *(.__dynsym_start) } - .dynsym : { *(.dynsym) } - .__dynsym_end : { *(.__dynsym_end) } + BAREBOX_RELOCATION_TABLE _edata = .; diff --git a/arch/arm/lib64/runtime-offset.S b/arch/arm/lib64/runtime-offset.S index 822e323c14..b10c104b4d 100644 --- a/arch/arm/lib64/runtime-offset.S +++ b/arch/arm/lib64/runtime-offset.S @@ -11,10 +11,12 @@ */ ENTRY(get_runtime_offset) adr x0, _text - ldr x1, linkadr + ldr_l x1, linkadr subs x0, x0, x1 ret +ENDPROC(get_runtime_offset) +.section ".data.runtime_offset","a" .align 3 linkadr: /* @@ -24,4 +26,3 @@ linkadr: * use _text here since that is 0x0 and is correct without relocation. */ .quad _text -ENDPROC(get_runtime_offset) diff --git a/arch/arm/lib64/stacktrace.c b/arch/arm/lib64/stacktrace.c index db5691a609..76aec734e1 100644 --- a/arch/arm/lib64/stacktrace.c +++ b/arch/arm/lib64/stacktrace.c @@ -40,9 +40,9 @@ int unwind_frame(struct stackframe *frame) static void dump_backtrace_entry(unsigned long where, unsigned long from) { #ifdef CONFIG_KALLSYMS - printf("[<%08lx>] (%pS) from [<%08lx>] (%pS)\n", where, (void *)where, from, (void *)from); + eprintf("[<%08lx>] (%pS) from [<%08lx>] (%pS)\n", where, (void *)where, from, (void *)from); #else - printf("Function entered at [<%08lx>] from [<%08lx>]\n", where, from); + eprintf("Function entered at [<%08lx>] from [<%08lx>]\n", where, from); #endif } @@ -60,7 +60,7 @@ void unwind_backtrace(struct pt_regs *regs) frame.pc = (unsigned long)unwind_backtrace; } - printf("Call trace:\n"); + eprintf("Call trace:\n"); while (1) { unsigned long where = frame.pc; int ret; diff --git a/arch/arm/lib64/string.c b/arch/arm/lib64/string.c index 26a284be5a..938790e1a9 100644 --- a/arch/arm/lib64/string.c +++ b/arch/arm/lib64/string.c @@ -7,7 +7,7 @@ void *__arch_memset(void *dst, int c, __kernel_size_t size); void *__arch_memcpy(void * dest, const void *src, size_t count); -static void *_memset(void *dst, int c, __kernel_size_t size) +static __prereloc void *_memset(void *dst, int c, __kernel_size_t size) { if (likely(get_cr() & CR_M)) return __arch_memset(dst, c, size); |