Skip to content

Commit

Permalink
s390/boot: convert parmarea to C
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiko Carstens committed May 6, 2022
1 parent 834979c commit f84d88e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 21 deletions.
20 changes: 0 additions & 20 deletions arch/s390/boot/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion arch/s390/boot/ipl_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
7 changes: 7 additions & 0 deletions arch/s390/boot/ipl_parm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 4 additions & 0 deletions arch/s390/boot/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ SECTIONS
HEAD_TEXT
_ehead = . ;
}
. = PARMAREA;
.parmarea : {
*(.parmarea)
}
.text : {
_text = .; /* Text */
*(.text)
Expand Down

0 comments on commit f84d88e

Please sign in to comment.