Skip to content

Commit f84d88e

Browse files
committed
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 <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
1 parent 834979c commit f84d88e

File tree

4 files changed

+12
-21
lines changed

4 files changed

+12
-21
lines changed

arch/s390/boot/head.S

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -333,23 +333,3 @@ SYM_CODE_START_LOCAL(startup_pgm_check_handler)
333333
lmg %r0,%r15,__LC_GPREGS_SAVE_AREA-4095(%r8)
334334
lpswe __LC_RETURN_PSW # disabled wait
335335
SYM_CODE_END(startup_pgm_check_handler)
336-
337-
#
338-
# params at 10400 (setup.h)
339-
# Must be keept in sync with struct parmarea in setup.h
340-
#
341-
.org PARMAREA - IPL_START
342-
SYM_DATA_START(parmarea)
343-
.quad 0 # IPL_DEVICE
344-
.quad 0 # INITRD_START
345-
.quad 0 # INITRD_SIZE
346-
.quad 0 # OLDMEM_BASE
347-
.quad 0 # OLDMEM_SIZE
348-
.quad kernel_version # points to kernel version string
349-
.quad COMMAND_LINE_SIZE
350-
351-
.org COMMAND_LINE - IPL_START
352-
.byte "root=/dev/ram0 ro"
353-
.byte 0
354-
.org PARMAREA+__PARMAREA_SIZE - IPL_START
355-
SYM_DATA_END(parmarea)

arch/s390/boot/ipl_data.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ struct ipl_lowcore {
4444
* that to succeed the two initial CCWs, and the 0x40 fill bytes must
4545
* be present.
4646
*/
47-
struct ipl_lowcore ipl_lowcore __section(".ipldata") = {
47+
static struct ipl_lowcore ipl_lowcore __used __section(".ipldata") = {
4848
.ipl_psw = { .mask = PSW32_MASK_BASE, .addr = PSW32_ADDR_AMODE | IPL_START },
4949
.ccwpgm = {
5050
[ 0] = CCW0(CCW_CMD_READ_IPL, 0x018, 0x50, CCW_FLAG_SLI | CCW_FLAG_CC),

arch/s390/boot/ipl_parm.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,16 @@
88
#include <asm/sections.h>
99
#include <asm/boot_data.h>
1010
#include <asm/facility.h>
11+
#include <asm/setup.h>
1112
#include <asm/uv.h>
1213
#include "boot.h"
1314

15+
struct parmarea parmarea __section(".parmarea") = {
16+
.kernel_version = (unsigned long)kernel_version,
17+
.max_command_line_size = COMMAND_LINE_SIZE,
18+
.command_line = "root=/dev/ram0 ro",
19+
};
20+
1421
char __bootdata(early_command_line)[COMMAND_LINE_SIZE];
1522
int __bootdata(noexec_disabled);
1623

arch/s390/boot/vmlinux.lds.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ SECTIONS
2323
HEAD_TEXT
2424
_ehead = . ;
2525
}
26+
. = PARMAREA;
27+
.parmarea : {
28+
*(.parmarea)
29+
}
2630
.text : {
2731
_text = .; /* Text */
2832
*(.text)

0 commit comments

Comments
 (0)