mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
stage3 still contains a legacy fallback path that transfers control to the new kernel via LPSW 0 when diag 0x308 is not available. The current start_kernel() inline asm issues "diag %[code],%[code],0x308" without enforcing the required even/odd register pairing for the first operand. With recent distro toolchains (e.g. GCC 15.x as shipped by Fedora 43 and Ubuntu 25.10), register allocation picks an odd register for the first diag operand in start_kernel(), which triggers a specification exception. That exception is then caught by the program-check handler and stage3 silently takes the fallback, booting the kernel via LPSW 0 instead of performing diag308 LOAD_NORMAL_RESET. All supported environments are expected to provide diag308, and the rest of the code already relies on it. Drop start_kernel() and the obsolete LPSW fallback and always reset into the new kernel via the properly coded diag308() helper. Mark start() as __noreturn. Reviewed-by: Eduard Shishkin <edward6@linux.ibm.com> Tested-by: Eduard Shishkin <edward6@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>