s390x: Make tests bootable from disk
A message that is not in the archive (sent off-list or not yet received): [email protected]
David Hildenbrand
Reviewed-byQuoted 56 lines · Janosch Frank
Currently tests are run with the --kernel option of Qemu, which will load the ELF file and jump to the start address. When booting from disk, we need to specify a start address. This is done by setting the initial short PSW at
0x0..text was moved to
0x11000because the bootloader can write from0x10480until0x11000if it has a lot to write.0x10480to0x10600was not enough safe space.Signed-off-by Janosch Frank <[email protected]>Reviewed-by Thomas Huth <[email protected]>--- s390x/cstart64.S | 9 ++++++++- s390x/flat.lds | 13 ++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-)s390x/cstart64.S +8
-1@@ -14,9 +14,16 @@ .section .init -/* entry point - for KVM + TCG we directly start in 64 bit mode */ +/* + * Short init between 0x10000 and 0x10480 and then jump to 0x11000. + * 0x10480 - 0x11000 are written to by bootloader. + * + * For KVM and TCG kernel boot we are in 64 bit z/Arch mode. + * When booting from disk the initial short psw is in 31 bit mode. + */ .globl start start: + sam64 # Set addressing mode to 64 bit /* setup stack */ larl %r15, stackptr /* setup initial PSW mask + control registers*/s390x/flat.lds +10
-0@@ -1,10 +1,21 @@ SECTIONS { + /* + * Initial short psw for disk boot, with 31 bit addressing for + * non z/Arch environment compatibility and the instruction + * address 0x10000 (cstart64.S .init). + */ + .lowcore : { + . = 0; + LONG(0x00080000) + LONG(0x80010000) + }
s390x/flat.lds line 21
Quoted 10 lines
s390x/flat.lds +2
-1+ . = 0x10000; .text : { *(.init) . = 0x480; ipl_args = .; - . = 0x600; + . = 0x1000; *(.text) *(.text.*) }
Reviewed-by David Hildenbrand <[email protected]>
Signature · 3 lines
Thanks, David / dhildenb