zipl/boot: add secure boot trailer

This patch enhances the zipl stage3 loader image adding a trailer as
required for secure boot by future firmware versions.

Note: with the change in this patch the padding via objcopy command line
options is replaced by padding via linker script directives with the
same effect.

Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Peter Oberparleiter
2022-09-16 15:13:01 +02:00
committed by Jan Höppner
parent 538264a8cd
commit 5768d55a08
2 changed files with 11 additions and 1 deletions

View File

@@ -106,7 +106,7 @@ stage3.bin: stage3.exec
--only-section=.stage2dump.tail \
--only-section=.eckd2dump_mv.tail \
--only-section=.fixup \
--pad-to=0xe000 \
--only-section=.sb.trailer \
$< $@
data.o: $(FILES)

View File

@@ -14,6 +14,7 @@
*/
#include "boot/loaders_layout.h"
#include "boot/s390.h"
SECTIONS
{
@@ -46,6 +47,15 @@ SECTIONS
.rodata : {*(.rodata) }
.data : { *(.data) }
/* Trailer needed for Secure Boot */
. = COMMAND_LINE_EXTRA - 32;
.sb.trailer : {
QUAD(0x0000c00000000000)
QUAD(STAGE3_ENTRY + PSW_LOAD)
QUAD(STAGE3_ENTRY)
QUAD(0x000000207a49504c)
}
. = COMMAND_LINE_EXTRA;
.cmdline_extra : {
. += COMMAND_LINE_EXTRA_SIZE;