diff options
Diffstat (limited to 'arch/riscv/lib')
-rw-r--r-- | arch/riscv/lib/crt0_riscv_efi.S | 1 | ||||
-rw-r--r-- | arch/riscv/lib/image.c | 9 |
2 files changed, 2 insertions, 8 deletions
diff --git a/arch/riscv/lib/crt0_riscv_efi.S b/arch/riscv/lib/crt0_riscv_efi.S index 9eacbe4a859..f170e4b26d6 100644 --- a/arch/riscv/lib/crt0_riscv_efi.S +++ b/arch/riscv/lib/crt0_riscv_efi.S @@ -179,6 +179,7 @@ section_table: IMAGE_SCN_CNT_INITIALIZED_DATA) .align 12 + .globl _start _start: addi sp, sp, -(SIZE_LONG * 3) SAVE_LONG(a0, 0) diff --git a/arch/riscv/lib/image.c b/arch/riscv/lib/image.c index 859326cbac8..a82f48e9a50 100644 --- a/arch/riscv/lib/image.c +++ b/arch/riscv/lib/image.c @@ -32,13 +32,6 @@ struct linux_image_h { uint32_t res4; /* reserved */ }; -bool booti_is_valid(const void *img) -{ - const struct linux_image_h *lhdr = img; - - return lhdr->magic == LINUX_RISCV_IMAGE_MAGIC; -} - int booti_setup(ulong image, ulong *relocated_addr, ulong *size, bool force_reloc) { @@ -46,7 +39,7 @@ int booti_setup(ulong image, ulong *relocated_addr, ulong *size, lhdr = (struct linux_image_h *)map_sysmem(image, 0); - if (!booti_is_valid(lhdr)) { + if (lhdr->magic != LINUX_RISCV_IMAGE_MAGIC) { puts("Bad Linux RISCV Image magic!\n"); return -EINVAL; } |