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>
63 lines
1.4 KiB
Plaintext
63 lines
1.4 KiB
Plaintext
/*
|
|
* Memory layout for stage 2
|
|
* =========================
|
|
*
|
|
* General memory layout
|
|
* ---------------------
|
|
*
|
|
* 0x0000-0x1fff Lowcore
|
|
* 0x2000-0x4fff Sections (load): head, text, data, rodata, rodata.str
|
|
* 0x5000-0x51ff eckd2dump_mv parameter block (426 bytes)
|
|
* 0x5200-0x5fff Sections: bss
|
|
* 0x6000-0x8fff Memory allocation (heap)
|
|
* 0x9000-0x9fff Memory to load stage3 parameter to
|
|
* 0xa000-0xdfff Memory to load stage3 to
|
|
* 0xe000-0xffff Stack
|
|
*
|
|
* Special memory locations
|
|
* ------------------------
|
|
*
|
|
* 0x78 Stage 2 description parameters
|
|
* 0x2018 Stage 2 entry point
|
|
* 0x3ff7 eckd2dump_mv force parameter
|
|
* 0x3ff8 Max mem dump parameter
|
|
* 0x5000-0x51ff eckd2dump_mv parameter block (426 bytes)
|
|
*/
|
|
|
|
SECTIONS
|
|
{
|
|
. = 0x78;
|
|
__stage2_desc = .;
|
|
|
|
. = 0x2000;
|
|
.stage2.head : { *(.stage2.head) }
|
|
. = 0x2018;
|
|
.text.start : { *(.text.start) }
|
|
.text : { *(.text) }
|
|
__ex_table_start = .;
|
|
.ex_table : { *(.ex_table) }
|
|
__ex_table_stop = .;
|
|
.rodata : {*(.rodata) }
|
|
.data : { *(.data) }
|
|
__stage2_params = .;
|
|
|
|
. = 0x4ff0;
|
|
.stage2dump.tail : { *(.stage2dump.tail) }
|
|
. = 0x5000;
|
|
.eckd2dump_mv.tail : { *(.eckd2dump_mv.tail) }
|
|
|
|
. = 0x5200;
|
|
__bss_start = .;
|
|
.bss : { *(.bss) }
|
|
__bss_stop = .;
|
|
|
|
. = 0x6000;
|
|
__heap_start = .;
|
|
. = 0x9000;
|
|
__heap_stop = .;
|
|
|
|
. = 0xf000;
|
|
.eh_frame : { *(.eh_frame) }
|
|
.note.gnu.build-id : { *(.note.gnu.build-id) }
|
|
}
|