summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/cpu/cache_64.c2
-rw-r--r--arch/arm/cpu/entry_ll_64.S12
-rw-r--r--arch/arm/lib64/armlinux.c14
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)) {