Skip to content

Commit c03b37b

Browse files
committed
Merge: [s390]: [IBM 9.3 FEAT] Support for List-Directed IPL and re-IPL from ECKD DASD - kernel part
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/2491 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2160041 Tested: by IBM Build-Info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=52482443 Commits: 87fd22e s390/ipl: add eckd support a70f727 s390/ipl: use octal values instead of S_* macros c676aac s390/ipl: add DEFINE_GENERIC_LOADPARM() 6bb361d s390/ipl: add loadparm parameter to eckd ipl/reipl data Signed-off-by: Tobias Huschle <thuschle@redhat.com> Approved-by: Steve Best <sbest@redhat.com> Approved-by: David Arcari <darcari@redhat.com> Signed-off-by: Jan Stancek <jstancek@redhat.com>
2 parents 26edd1d + 456f7ba commit c03b37b

File tree

6 files changed

+365
-89
lines changed

6 files changed

+365
-89
lines changed

arch/s390/boot/ipl_parm.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ static size_t ipl_block_get_ascii_scpdata(char *dest, size_t size,
101101
scp_data_len = ipb->nvme.scp_data_len;
102102
scp_data = ipb->nvme.scp_data;
103103
break;
104+
case IPL_PBT_ECKD:
105+
scp_data_len = ipb->eckd.scp_data_len;
106+
scp_data = ipb->eckd.scp_data;
107+
break;
108+
104109
default:
105110
goto out;
106111
}
@@ -146,6 +151,7 @@ static void append_ipl_block_parm(void)
146151
break;
147152
case IPL_PBT_FCP:
148153
case IPL_PBT_NVME:
154+
case IPL_PBT_ECKD:
149155
rc = ipl_block_get_ascii_scpdata(
150156
parm, COMMAND_LINE_SIZE - len - 1, &ipl_block);
151157
break;

arch/s390/include/asm/ipl.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ struct ipl_parameter_block {
2121
struct ipl_pb0_common common;
2222
struct ipl_pb0_fcp fcp;
2323
struct ipl_pb0_ccw ccw;
24+
struct ipl_pb0_eckd eckd;
2425
struct ipl_pb0_nvme nvme;
2526
char raw[PAGE_SIZE - sizeof(struct ipl_pl_hdr)];
2627
};
@@ -40,6 +41,10 @@ struct ipl_parameter_block {
4041
sizeof(struct ipl_pb0_ccw))
4142
#define IPL_BP0_CCW_LEN (sizeof(struct ipl_pb0_ccw))
4243

44+
#define IPL_BP_ECKD_LEN (sizeof(struct ipl_pl_hdr) + \
45+
sizeof(struct ipl_pb0_eckd))
46+
#define IPL_BP0_ECKD_LEN (sizeof(struct ipl_pb0_eckd))
47+
4348
#define IPL_MAX_SUPPORTED_VERSION (0)
4449

4550
#define IPL_RB_CERT_UNKNOWN ((unsigned short)-1)
@@ -67,6 +72,7 @@ enum ipl_type {
6772
IPL_TYPE_NSS = 16,
6873
IPL_TYPE_NVME = 32,
6974
IPL_TYPE_NVME_DUMP = 64,
75+
IPL_TYPE_ECKD = 128,
7076
};
7177

7278
struct ipl_info
@@ -76,6 +82,9 @@ struct ipl_info
7682
struct {
7783
struct ccw_dev_id dev_id;
7884
} ccw;
85+
struct {
86+
struct ccw_dev_id dev_id;
87+
} eckd;
7988
struct {
8089
struct ccw_dev_id dev_id;
8190
u64 wwpn;

arch/s390/include/asm/sclp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ struct sclp_info {
8787
unsigned char has_gisaf : 1;
8888
unsigned char has_diag318 : 1;
8989
unsigned char has_sipl : 1;
90+
unsigned char has_sipl_eckd : 1;
9091
unsigned char has_dirq : 1;
9192
unsigned char has_iplcc : 1;
9293
unsigned char has_zpci_lsi : 1;

arch/s390/include/uapi/asm/ipl.h

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ enum ipl_pbt {
2727
IPL_PBT_FCP = 0,
2828
IPL_PBT_SCP_DATA = 1,
2929
IPL_PBT_CCW = 2,
30+
IPL_PBT_ECKD = 3,
3031
IPL_PBT_NVME = 4,
3132
};
3233

@@ -111,6 +112,33 @@ struct ipl_pb0_ccw {
111112
__u8 reserved5[8];
112113
} __packed;
113114

115+
/* IPL Parameter Block 0 for ECKD */
116+
struct ipl_pb0_eckd {
117+
__u32 len;
118+
__u8 pbt;
119+
__u8 reserved1[3];
120+
__u32 reserved2[78];
121+
__u8 opt;
122+
__u8 reserved4[4];
123+
__u8 reserved5:5;
124+
__u8 ssid:3;
125+
__u16 devno;
126+
__u32 reserved6[5];
127+
__u32 bootprog;
128+
__u8 reserved7[12];
129+
struct {
130+
__u16 cyl;
131+
__u8 head;
132+
__u8 record;
133+
__u32 reserved;
134+
} br_chr __packed;
135+
__u32 scp_data_len;
136+
__u8 reserved8[260];
137+
__u8 scp_data[];
138+
} __packed;
139+
140+
#define IPL_PB0_ECKD_OPT_IPL 0x10
141+
114142
#define IPL_PB0_CCW_VM_FLAG_NSS 0x80
115143
#define IPL_PB0_CCW_VM_FLAG_VP 0x40
116144

0 commit comments

Comments
 (0)