diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2020-01-15 07:58:29 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-01-15 07:58:29 +0100 |
commit | 86502f1880ee09faae4281865b98fb5b08256b57 (patch) | |
tree | b081d9d4862143e286db370199c7fdf397e20fa4 | |
parent | 4cce60b7fe2798e81b04c5d9ad79dc9b443635a8 (diff) | |
parent | a4c192afe05376a9423608e93fb5c5b56f2c4fd0 (diff) | |
download | barebox-86502f1880ee09faae4281865b98fb5b08256b57.tar.gz |
Merge branch 'for-next/arm'
-rw-r--r-- | arch/arm/cpu/cache_64.c | 2 | ||||
-rw-r--r-- | arch/arm/cpu/entry_ll_64.S | 12 | ||||
-rw-r--r-- | arch/arm/lib64/armlinux.c | 14 |
3 files changed, 22 insertions, 6 deletions
diff --git a/arch/arm/cpu/cache_64.c b/arch/arm/cpu/cache_64.c index 45f01e8dc9..6e18d981a4 100644 --- a/arch/arm/cpu/cache_64.c +++ b/arch/arm/cpu/cache_64.c @@ -27,9 +27,11 @@ int arm_set_cache_functions(void) 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 37e0cb66b5..fb8645e0a0 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 afa56792fb..31bd987f10 100644 --- a/arch/arm/lib64/armlinux.c +++ b/arch/arm/lib64/armlinux.c @@ -37,6 +37,7 @@ static int do_bootm_linux(struct image_data *data) 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 @@ static int do_bootm_linux(struct image_data *data) 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)) { |