Skip to content

Commit 83dfeed

Browse files
author
Russell King
committed
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>
1 parent 8e007b3 commit 83dfeed

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎arch/arm/Makefile‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ head-y := arch/arm/kernel/head$(MMUEXT).o
139139

140140
# Text offset. This list is sorted numerically by address in order to
141141
# provide a means to avoid/resolve conflicts in multi-arch kernels.
142+
# Note: the 32kB below this value is reserved for use by the kernel
143+
# during boot, and this offset is critical to the functioning of
144+
# kexec-tools.
142145
textofs-y := 0x00008000
143146
# We don't want the htc bootloader to corrupt kernel during resume
144147
textofs-$(CONFIG_PM_H1940) := 0x00108000

‎arch/arm/boot/compressed/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ ZBSSADDR := ALIGN(8)
7070
endif
7171

7272
CPPFLAGS_vmlinux.lds := -DTEXT_START="$(ZTEXTADDR)" -DBSS_START="$(ZBSSADDR)"
73+
CPPFLAGS_vmlinux.lds += -DTEXT_OFFSET="$(TEXT_OFFSET)"
7374

7475
compress-$(CONFIG_KERNEL_GZIP) = gzip
7576
compress-$(CONFIG_KERNEL_LZO) = lzo

‎arch/arm/boot/compressed/vmlinux.lds.S‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ SECTIONS
4242
}
4343
.table : ALIGN(4) {
4444
_table_start = .;
45-
LONG(ZIMAGE_MAGIC(4))
45+
LONG(ZIMAGE_MAGIC(5))
4646
LONG(ZIMAGE_MAGIC(0x5a534c4b))
4747
LONG(ZIMAGE_MAGIC(__piggy_size_addr - _start))
4848
LONG(ZIMAGE_MAGIC(_kernel_bss_size))
49+
LONG(ZIMAGE_MAGIC(TEXT_OFFSET))
4950
LONG(0)
5051
_table_end = .;
5152
}

0 commit comments

Comments
 (0)