diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2018-04-03 12:02:28 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2020-09-15 14:36:25 +0100 |
commit | 83dfeedb6663ea8cdf93f41191ef313de5b7a2ba (patch) | |
tree | 52f2b04528168a95d55f2712bfa6a82f3bd552a5 /arch/arm | |
parent | 8e007b367a59bcdf484c81f6df9bd5a4cc179ca6 (diff) | |
download | linux-rpi-83dfeedb6663ea8cdf93f41191ef313de5b7a2ba.tar.gz linux-rpi-83dfeedb6663ea8cdf93f41191ef313de5b7a2ba.tar.bz2 linux-rpi-83dfeedb6663ea8cdf93f41191ef313de5b7a2ba.zip |
ARM: add TEXT_OFFSET to decompressor kexec image structure
Add the TEXT_OFFSET to the decompressor's kexec image structure to
kexec knows what offset to use.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/Makefile | 3 | ||||
-rw-r--r-- | arch/arm/boot/compressed/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/boot/compressed/vmlinux.lds.S | 3 |
3 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 4e877354515f..9ddaa7f1ab4a 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -139,6 +139,9 @@ head-y := arch/arm/kernel/head$(MMUEXT).o # Text offset. This list is sorted numerically by address in order to # provide a means to avoid/resolve conflicts in multi-arch kernels. +# Note: the 32kB below this value is reserved for use by the kernel +# during boot, and this offset is critical to the functioning of +# kexec-tools. textofs-y := 0x00008000 # We don't want the htc bootloader to corrupt kernel during resume textofs-$(CONFIG_PM_H1940) := 0x00108000 diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 77799e5780c2..dacadab2ff17 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile @@ -70,6 +70,7 @@ ZBSSADDR := ALIGN(8) endif CPPFLAGS_vmlinux.lds := -DTEXT_START="$(ZTEXTADDR)" -DBSS_START="$(ZBSSADDR)" +CPPFLAGS_vmlinux.lds += -DTEXT_OFFSET="$(TEXT_OFFSET)" compress-$(CONFIG_KERNEL_GZIP) = gzip compress-$(CONFIG_KERNEL_LZO) = lzo diff --git a/arch/arm/boot/compressed/vmlinux.lds.S b/arch/arm/boot/compressed/vmlinux.lds.S index 09ac33f52814..da1f6fa5345b 100644 --- a/arch/arm/boot/compressed/vmlinux.lds.S +++ b/arch/arm/boot/compressed/vmlinux.lds.S @@ -42,10 +42,11 @@ SECTIONS } .table : ALIGN(4) { _table_start = .; - LONG(ZIMAGE_MAGIC(4)) + LONG(ZIMAGE_MAGIC(5)) LONG(ZIMAGE_MAGIC(0x5a534c4b)) LONG(ZIMAGE_MAGIC(__piggy_size_addr - _start)) LONG(ZIMAGE_MAGIC(_kernel_bss_size)) + LONG(ZIMAGE_MAGIC(TEXT_OFFSET)) LONG(0) _table_end = .; } |