提交 c7725687 编写于 作者: R Russell King

ARM: add additional table to compressed kernel

Add an additional extendable table to the compressed kernel so that we
can provide further information to boot loaders regarding the properties
of the image contained within.

This is necessary for correct behaviour of kexec.
Tested-by: NTony Lindgren <tony@atomide.com>
Tested-by: NKeerthy <j-keerthy@ti.com>
Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
上级 429f7a06
...@@ -143,6 +143,8 @@ start: ...@@ -143,6 +143,8 @@ start:
.word _magic_start @ absolute load/run zImage address .word _magic_start @ absolute load/run zImage address
.word _magic_end @ zImage end address .word _magic_end @ zImage end address
.word 0x04030201 @ endianness flag .word 0x04030201 @ endianness flag
.word 0x45454545 @ another magic number to indicate
.word _magic_table @ additional data table
__EFI_HEADER __EFI_HEADER
1: 1:
......
...@@ -44,12 +44,22 @@ SECTIONS ...@@ -44,12 +44,22 @@ SECTIONS
*(.glue_7t) *(.glue_7t)
*(.glue_7) *(.glue_7)
} }
.table : ALIGN(4) {
_table_start = .;
LONG(ZIMAGE_MAGIC(2))
LONG(ZIMAGE_MAGIC(0x5a534c4b))
LONG(ZIMAGE_MAGIC(__piggy_size_addr - _start))
LONG(ZIMAGE_MAGIC(_kernel_bss_size))
LONG(0)
_table_end = .;
}
.rodata : { .rodata : {
*(.rodata) *(.rodata)
*(.rodata.*) *(.rodata.*)
} }
.piggydata : { .piggydata : {
*(.piggydata) *(.piggydata)
__piggy_size_addr = . - 4;
} }
. = ALIGN(4); . = ALIGN(4);
...@@ -88,6 +98,7 @@ SECTIONS ...@@ -88,6 +98,7 @@ SECTIONS
_magic_sig = ZIMAGE_MAGIC(0x016f2818); _magic_sig = ZIMAGE_MAGIC(0x016f2818);
_magic_start = ZIMAGE_MAGIC(_start); _magic_start = ZIMAGE_MAGIC(_start);
_magic_end = ZIMAGE_MAGIC(_edata); _magic_end = ZIMAGE_MAGIC(_edata);
_magic_table = ZIMAGE_MAGIC(_table_start - _start);
. = BSS_START; . = BSS_START;
__bss_start = .; __bss_start = .;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册