aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2022-04-25 21:24:56 +0200
committerHeiko Carstens <hca@linux.ibm.com>2022-05-06 20:45:15 +0200
commitf84d88ed3beb7fc2b4549e4c213ad428c0be9029 (patch)
tree2a54b7a71af0d0c572c97b688d733a71b5302e85 /arch
parents390/boot: convert initial lowcore to C (diff)
downloadlinux-dev-f84d88ed3beb7fc2b4549e4c213ad428c0be9029.tar.xz
linux-dev-f84d88ed3beb7fc2b4549e4c213ad428c0be9029.zip
s390/boot: convert parmarea to C
Convert parmarea to C, which makes it much easier to initialize it. No need to keep offsets in assembler code in sync with struct parmarea anymore. Reviewed-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/boot/head.S20
-rw-r--r--arch/s390/boot/ipl_data.c2
-rw-r--r--arch/s390/boot/ipl_parm.c7
-rw-r--r--arch/s390/boot/vmlinux.lds.S4
4 files changed, 12 insertions, 21 deletions
diff --git a/arch/s390/boot/head.S b/arch/s390/boot/head.S
index ceb118621eaa..2ced90172680 100644
--- a/arch/s390/boot/head.S
+++ b/arch/s390/boot/head.S
@@ -333,23 +333,3 @@ SYM_CODE_START_LOCAL(startup_pgm_check_handler)
lmg %r0,%r15,__LC_GPREGS_SAVE_AREA-4095(%r8)
lpswe __LC_RETURN_PSW # disabled wait
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 - IPL_START
-SYM_DATA_START(parmarea)
- .quad 0 # IPL_DEVICE
- .quad 0 # INITRD_START
- .quad 0 # INITRD_SIZE
- .quad 0 # OLDMEM_BASE
- .quad 0 # OLDMEM_SIZE
- .quad kernel_version # points to kernel version string
- .quad COMMAND_LINE_SIZE
-
- .org COMMAND_LINE - IPL_START
- .byte "root=/dev/ram0 ro"
- .byte 0
- .org PARMAREA+__PARMAREA_SIZE - IPL_START
-SYM_DATA_END(parmarea)
diff --git a/arch/s390/boot/ipl_data.c b/arch/s390/boot/ipl_data.c
index 90749e3b2fa6..0846e2b249c6 100644
--- a/arch/s390/boot/ipl_data.c
+++ b/arch/s390/boot/ipl_data.c
@@ -44,7 +44,7 @@ struct ipl_lowcore {
* that to succeed the two initial CCWs, and the 0x40 fill bytes must
* be present.
*/
-struct ipl_lowcore ipl_lowcore __section(".ipldata") = {
+static struct ipl_lowcore ipl_lowcore __used __section(".ipldata") = {
.ipl_psw = { .mask = PSW32_MASK_BASE, .addr = PSW32_ADDR_AMODE | IPL_START },
.ccwpgm = {
[ 0] = CCW0(CCW_CMD_READ_IPL, 0x018, 0x50, CCW_FLAG_SLI | CCW_FLAG_CC),
diff --git a/arch/s390/boot/ipl_parm.c b/arch/s390/boot/ipl_parm.c
index 9ed7e29c81d9..ca78d6162245 100644
--- a/arch/s390/boot/ipl_parm.c
+++ b/arch/s390/boot/ipl_parm.c
@@ -8,9 +8,16 @@
#include <asm/sections.h>
#include <asm/boot_data.h>
#include <asm/facility.h>
+#include <asm/setup.h>
#include <asm/uv.h>
#include "boot.h"
+struct parmarea parmarea __section(".parmarea") = {
+ .kernel_version = (unsigned long)kernel_version,
+ .max_command_line_size = COMMAND_LINE_SIZE,
+ .command_line = "root=/dev/ram0 ro",
+};
+
char __bootdata(early_command_line)[COMMAND_LINE_SIZE];
int __bootdata(noexec_disabled);
diff --git a/arch/s390/boot/vmlinux.lds.S b/arch/s390/boot/vmlinux.lds.S
index 983f02dc985a..af5c6860e0a1 100644
--- a/arch/s390/boot/vmlinux.lds.S
+++ b/arch/s390/boot/vmlinux.lds.S
@@ -23,6 +23,10 @@ SECTIONS
HEAD_TEXT
_ehead = . ;
}
+ . = PARMAREA;
+ .parmarea : {
+ *(.parmarea)
+ }
.text : {
_text = .; /* Text */
*(.text)