diff --git a/arch/arm/cpu/cache_64.c b/arch/arm/cpu/cache_64.c index 45f01e8..6e18d98 100644 --- a/arch/arm/cpu/cache_64.c +++ b/arch/arm/cpu/cache_64.c @@ -27,9 +27,11 @@ void arm_early_mmu_cache_flush(void) { v8_flush_dcache_all(); + v8_invalidate_icache_all(); } void arm_early_mmu_cache_invalidate(void) { + v8_invalidate_dcache_all(); v8_invalidate_icache_all(); } diff --git a/arch/arm/cpu/entry_ll_64.S b/arch/arm/cpu/entry_ll_64.S index 37e0cb6..fb8645e 100644 --- a/arch/arm/cpu/entry_ll_64.S +++ b/arch/arm/cpu/entry_ll_64.S @@ -10,14 +10,16 @@ .section .text.__barebox_arm_entry ENTRY(__barebox_arm_entry) mov sp, x3 - /* - * arm_early_mmu_cache_invalidate is jsut a call to - * v8_invalidate_icache_all() which doesn't clobber x0, x1 or x2 - */ + mov x19, x0 + mov x20, x1 + mov x21, x2 bl arm_early_mmu_cache_invalidate + mov x0, x19 + mov x1, x20 + mov x2, x21 #if IS_ENABLED(CONFIG_PBL_IMAGE) b barebox_pbl_start #else b barebox_non_pbl_start #endif -ENDPROC(__barebox_arm_entry) \ No newline at end of file +ENDPROC(__barebox_arm_entry) diff --git a/arch/arm/lib64/armlinux.c b/arch/arm/lib64/armlinux.c index afa5679..31bd987 100644 --- a/arch/arm/lib64/armlinux.c +++ b/arch/arm/lib64/armlinux.c @@ -37,6 +37,7 @@ unsigned long x3); resource_size_t start, end; unsigned long text_offset, image_size, devicetree, kernel; + unsigned long image_end; int ret; void *fdt; @@ -53,7 +54,18 @@ if (ret) goto out; - devicetree = ALIGN(kernel + image_size, PAGE_SIZE); + image_end = PAGE_ALIGN(kernel + image_size); + + if (bootm_has_initrd(data)) { + ret = bootm_load_initrd(data, image_end); + if (ret) + return ret; + + image_end += resource_size(data->initrd_res); + image_end = PAGE_ALIGN(image_end); + } + + devicetree = image_end; fdt = bootm_get_devicetree(data); if (IS_ERR(fdt)) {