summaryrefslogtreecommitdiff
path: root/arch/s390/boot/head.S
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2022-04-27 05:14:34 +0300
committerHeiko Carstens <hca@linux.ibm.com>2022-05-06 21:45:15 +0300
commit834979c27f5281f37ae9ce5191134f26ae7b9fd0 (patch)
tree44deaa217d131bfd74ec89378793fda7a474916d /arch/s390/boot/head.S
parent67a9c428ef35780d09e5a3c1247919789a8212b4 (diff)
downloadlinux-834979c27f5281f37ae9ce5191134f26ae7b9fd0.tar.xz
s390/boot: convert initial lowcore to C
Convert initial lowcore to C and use proper defines and structures to initialize it. This should make the z/VM ipl procedure a bit less magic. Acked-by: Peter Oberparleiter <oberpar@linux.ibm.com> Reviewed-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/boot/head.S')
-rw-r--r--arch/s390/boot/head.S62
1 files changed, 8 insertions, 54 deletions
diff --git a/arch/s390/boot/head.S b/arch/s390/boot/head.S
index a63f7de76462..ceb118621eaa 100644
--- a/arch/s390/boot/head.S
+++ b/arch/s390/boot/head.S
@@ -27,61 +27,15 @@
#include <asm/page.h>
#include <asm/ptrace.h>
#include <asm/sclp.h>
+#include "boot.h"
#define ARCH_OFFSET 4
#define EP_OFFSET 0x10008
#define EP_STRING "S390EP"
-
-#define IPL_START 0x200
+#define IPL_BS 0x730
__HEAD
-
-#define IPL_BS 0x730
- .org 0
- .long 0x00080000,0x80000000+IPL_START # The first 24 bytes are loaded
- .long 0x02000018,0x60000050 # by ipl to addresses 0-23.
- .long 0x02000068,0x60000050 # (a PSW and two CCWs).
- .fill 80-24,1,0x40 # bytes 24-79 are discarded !!
- .long 0x020000f0,0x60000050 # The next 160 byte are loaded
- .long 0x02000140,0x60000050 # to addresses 0x18-0xb7
- .long 0x02000190,0x60000050 # They form the continuation
- .long 0x020001e0,0x60000050 # of the CCW program started
- .long 0x02000230,0x60000050 # by ipl and load the range
- .long 0x02000280,0x60000050 # 0x0f0-0x730 from the image
- .long 0x020002d0,0x60000050 # to the range 0x0f0-0x730
- .long 0x02000320,0x60000050 # in memory. At the end of
- .long 0x02000370,0x60000050 # the channel program the PSW
- .long 0x020003c0,0x60000050 # at location 0 is loaded.
- .long 0x02000410,0x60000050 # Initial processing starts
- .long 0x02000460,0x60000050 # at 0x200 = iplstart.
- .long 0x020004b0,0x60000050
- .long 0x02000500,0x60000050
- .long 0x02000550,0x60000050
- .long 0x020005a0,0x60000050
- .long 0x020005f0,0x60000050
- .long 0x02000640,0x60000050
- .long 0x02000690,0x60000050
- .long 0x020006e0,0x20000050
-
-# The restart psw points to ipl_entry, which allows to load a kernel image
-# into memory and starting it by a psw restart on any cpu.
-# All other default psw new locations contain a disabled wait psw where the
-# address indicates which psw was loaded.
- .org __LC_RST_NEW_PSW
- .quad 0,IPL_START
- .org __LC_EXT_NEW_PSW
- .quad 0x0002000180000000,__LC_EXT_NEW_PSW
- .org __LC_SVC_NEW_PSW
- .quad 0x0002000180000000,__LC_SVC_NEW_PSW
- .org __LC_PGM_NEW_PSW
- .quad 0x0002000180000000,__LC_PGM_NEW_PSW
- .org __LC_MCK_NEW_PSW
- .quad 0x0002000180000000,__LC_MCK_NEW_PSW
- .org __LC_IO_NEW_PSW
- .quad 0x0002000180000000,__LC_IO_NEW_PSW
-
- .org IPL_START
ipl_start:
j .Liplcont
#
@@ -279,10 +233,10 @@ ipl_start:
# this is called either by the ipl loader or directly by PSW restart
# or linload or SALIPL
#
- .org STARTUP_NORMAL_OFFSET
+ .org STARTUP_NORMAL_OFFSET - IPL_START
SYM_CODE_START(startup)
j startup_normal
- .org EP_OFFSET
+ .org EP_OFFSET - IPL_START
#
# This is a list of s390 kernel entry points. At address 0x1000f the number of
# valid entry points is stored.
@@ -294,7 +248,7 @@ SYM_CODE_START(startup)
#
# kdump startup-code, running in 64 bit absolute addressing mode
#
- .org STARTUP_KDUMP_OFFSET
+ .org STARTUP_KDUMP_OFFSET - IPL_START
j startup_kdump
SYM_CODE_END(startup)
SYM_CODE_START_LOCAL(startup_normal)
@@ -384,7 +338,7 @@ SYM_CODE_END(startup_pgm_check_handler)
# params at 10400 (setup.h)
# Must be keept in sync with struct parmarea in setup.h
#
- .org PARMAREA
+ .org PARMAREA - IPL_START
SYM_DATA_START(parmarea)
.quad 0 # IPL_DEVICE
.quad 0 # INITRD_START
@@ -394,8 +348,8 @@ SYM_DATA_START(parmarea)
.quad kernel_version # points to kernel version string
.quad COMMAND_LINE_SIZE
- .org COMMAND_LINE
+ .org COMMAND_LINE - IPL_START
.byte "root=/dev/ram0 ro"
.byte 0
- .org PARMAREA+__PARMAREA_SIZE
+ .org PARMAREA+__PARMAREA_SIZE - IPL_START
SYM_DATA_END(parmarea)