summaryrefslogtreecommitdiff
path: root/arch/mips/boot
diff options
context:
space:
mode:
authorThomas Bogendoerfer <tsbogend@alpha.franken.de>2021-03-10 15:15:47 +0100
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2021-03-10 15:15:47 +0100
commit87aaf2523cad65faeabd8564b6b39f9431f32879 (patch)
tree7cf283b1480799e9032048834bda7ca2624f046a /arch/mips/boot
parent04100459caa98450cc0f4375f73d9643a31f454f (diff)
parentbd67b711bfaa02cf19e88aa2d9edae5c1c1d2739 (diff)
Merge tag 'mips-fixes_5.12_1' into mips-next
- fixes for boot breakage because of misaligned FDTs - fix for overwritten exception handlers - enable MIPS optimized crypto for all MIPS CPUs to improve wireguard performance
Diffstat (limited to 'arch/mips/boot')
-rw-r--r--arch/mips/boot/compressed/decompress.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/mips/boot/compressed/decompress.c b/arch/mips/boot/compressed/decompress.c
index e3946b06e840..3d70d15ada28 100644
--- a/arch/mips/boot/compressed/decompress.c
+++ b/arch/mips/boot/compressed/decompress.c
@@ -14,6 +14,7 @@
#include <asm/addrspace.h>
#include <asm/unaligned.h>
+#include <asm-generic/vmlinux.lds.h>
/*
* These two variables specify the free mem region
@@ -120,6 +121,13 @@ void decompress_kernel(unsigned long boot_heap_start)
/* last four bytes is always image size in little endian */
image_size = get_unaligned_le32((void *)&__image_end - 4);
+ /* The device tree's address must be properly aligned */
+ image_size = ALIGN(image_size, STRUCT_ALIGNMENT);
+
+ puts("Copy device tree to address ");
+ puthex(VMLINUX_LOAD_ADDRESS_ULL + image_size);
+ puts("\n");
+
/* copy dtb to where the booted kernel will expect it */
memcpy((void *)VMLINUX_LOAD_ADDRESS_ULL + image_size,
__appended_dtb, dtb_size);