mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
The first component that gets control after IPL is the zIPL-provided stage 3 boot loader. This boot loader is based on a binary image linked into the zIPL executable. When preparing a disk for IPL, zIPL updates runtime parameters in the boot loader image and writes the resulting data to disk. To support the Secure Boot firmware feature, the stage 3 code must be signed, and can therefore no longer contain variable parameter portions. Also the boot loader image should be accessible as a separate file to enable the use of external programs for creating the signature. This patch moves the stage 3 boot loader code to an external file location and splits out the parameter portion into a separate, unsigned on-disk component. The new memory layout of the stage 3 loader during its execution looks as follows: * 0x0000-0x1fff Lowcore * 0x2000-0x5fff Memory allocation (heap) * 0x7000-0x8fff free * 0x9000-0x9fff Stage3 parameter * 0xa000-0xcfff Stage3 code * 0xd000-0xefff Section: bss, rodata, data * 0xf000-0xffff Stack Signed-off-by: Stefan Haberland <sth@linux.ibm.com> Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
58 lines
996 B
Plaintext
58 lines
996 B
Plaintext
/*
|
|
* Memory layout for stage 3
|
|
* =========================
|
|
*
|
|
* General memory layout
|
|
* ---------------------
|
|
*
|
|
* 0x0000-0x1fff Lowcore
|
|
* 0x2000-0x5fff Memory allocation (heap)
|
|
* 0x6000-0x8fff free
|
|
* 0x9000-0x9fff Stage3 parameter
|
|
* 0xa000-0xdfff Stage3 code + data
|
|
* 0xe000-0xffff Stack
|
|
*/
|
|
|
|
SECTIONS
|
|
{
|
|
. = 0x0;
|
|
|
|
. = 0x2000;
|
|
__heap_start = .;
|
|
. = 0x6000;
|
|
__heap_stop = .;
|
|
|
|
|
|
/* stage 3 parameter */
|
|
. = 0x9000;
|
|
_parm_addr = .;
|
|
. = 0x9008;
|
|
_initrd_addr = .;
|
|
. = 0x9010;
|
|
_initrd_len = .;
|
|
. = 0x9018;
|
|
_load_psw = .;
|
|
. = 0x9020;
|
|
_extra_parm = .;
|
|
. = 0x9028;
|
|
stage3_flags =.;
|
|
. = 0x9030;
|
|
_image_len = .;
|
|
. = 0x9038;
|
|
_image_addr = .;
|
|
|
|
. = 0xa000;
|
|
.text.start : { *(.text.start) }
|
|
.text : { *(.text) }
|
|
__ex_table_start = .;
|
|
.ex_table : { *(.ex_table) }
|
|
__ex_table_stop = .;
|
|
.eh_frame : { *(.eh_frame) }
|
|
|
|
__bss_start = .;
|
|
.bss : { *(.bss) }
|
|
__bss_stop = .;
|
|
.rodata : {*(.rodata) }
|
|
.data : { *(.data) }
|
|
}
|