1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 #ifndef _ASM_S390_UAPI_IPL_H 3 #define _ASM_S390_UAPI_IPL_H 4 5 #include <linux/types.h> 6 7 /* IPL Parameter List header */ 8 struct ipl_pl_hdr { 9 __u32 len; 10 __u8 flags; 11 __u8 reserved1[2]; 12 __u8 version; 13 } __packed; 14 15 #define IPL_PL_FLAG_IPLPS 0x80 16 #define IPL_PL_FLAG_SIPL 0x40 17 #define IPL_PL_FLAG_IPLSR 0x20 18 #define IPL_PL_FLAG_SBP 0x10 19 20 /* IPL Parameter Block header */ 21 struct ipl_pb_hdr { 22 __u32 len; 23 __u8 pbt; 24 } __packed; 25 26 /* IPL Parameter Block types */ 27 enum ipl_pbt { 28 IPL_PBT_FCP = 0, 29 IPL_PBT_SCP_DATA = 1, 30 IPL_PBT_CCW = 2, 31 IPL_PBT_ECKD = 3, 32 IPL_PBT_NVME = 4, 33 }; 34 35 /* IPL Parameter Block 0 with common fields */ 36 struct ipl_pb0_common { 37 __u32 len; 38 __u8 pbt; 39 __u8 flags; 40 __u8 reserved1[2]; 41 __u8 loadparm[8]; 42 __u8 reserved2[84]; 43 } __packed; 44 45 #define IPL_PB0_FLAG_LOADPARM 0x80 46 47 /* IPL Parameter Block 0 for FCP */ 48 struct ipl_pb0_fcp { 49 __u32 len; 50 __u8 pbt; 51 __u8 reserved1[3]; 52 __u8 loadparm[8]; 53 __u8 reserved2[304]; 54 __u8 opt; 55 __u8 reserved3[3]; 56 __u8 cssid; 57 __u8 reserved4[1]; 58 __u16 devno; 59 __u8 reserved5[4]; 60 __u64 wwpn; 61 __u64 lun; 62 __u32 bootprog; 63 __u8 reserved6[12]; 64 __u64 br_lba; 65 __u32 scp_data_len; 66 __u8 reserved7[260]; 67 __u8 scp_data[]; 68 } __packed; 69 70 #define IPL_PB0_FCP_OPT_IPL 0x10 71 #define IPL_PB0_FCP_OPT_DUMP 0x20 72 73 /* IPL Parameter Block 0 for NVMe */ 74 struct ipl_pb0_nvme { 75 __u32 len; 76 __u8 pbt; 77 __u8 reserved1[3]; 78 __u8 loadparm[8]; 79 __u8 reserved2[304]; 80 __u8 opt; 81 __u8 reserved3[3]; 82 __u32 fid; 83 __u8 reserved4[12]; 84 __u32 nsid; 85 __u8 reserved5[4]; 86 __u32 bootprog; 87 __u8 reserved6[12]; 88 __u64 br_lba; 89 __u32 scp_data_len; 90 __u8 reserved7[260]; 91 __u8 scp_data[]; 92 } __packed; 93 94 #define IPL_PB0_NVME_OPT_IPL 0x10 95 #define IPL_PB0_NVME_OPT_DUMP 0x20 96 97 /* IPL Parameter Block 0 for CCW */ 98 struct ipl_pb0_ccw { 99 __u32 len; 100 __u8 pbt; 101 __u8 flags; 102 __u8 reserved1[2]; 103 __u8 loadparm[8]; 104 __u8 reserved2[84]; 105 __u16 reserved3 : 13; 106 __u8 ssid : 3; 107 __u16 devno; 108 __u8 vm_flags; 109 __u8 reserved4[3]; 110 __u32 vm_parm_len; 111 __u8 nss_name[8]; 112 __u8 vm_parm[64]; 113 __u8 reserved5[8]; 114 } __packed; 115 116 /* IPL Parameter Block 0 for ECKD */ 117 struct ipl_pb0_eckd { 118 __u32 len; 119 __u8 pbt; 120 __u8 reserved1[3]; 121 __u32 reserved2[78]; 122 __u8 opt; 123 __u8 reserved4[4]; 124 __u8 reserved5:5; 125 __u8 ssid:3; 126 __u16 devno; 127 __u32 reserved6[5]; 128 __u32 bootprog; 129 __u8 reserved7[12]; 130 struct { 131 __u16 cyl; 132 __u8 head; 133 __u8 record; 134 __u32 reserved; 135 } br_chr __packed; 136 __u32 scp_data_len; 137 __u8 reserved8[260]; 138 __u8 scp_data[]; 139 } __packed; 140 141 #define IPL_PB0_ECKD_OPT_IPL 0x10 142 #define IPL_PB0_ECKD_OPT_DUMP 0x20 143 144 #define IPL_PB0_CCW_VM_FLAG_NSS 0x80 145 #define IPL_PB0_CCW_VM_FLAG_VP 0x40 146 147 /* IPL Parameter Block 1 for additional SCP data */ 148 struct ipl_pb1_scp_data { 149 __u32 len; 150 __u8 pbt; 151 __u8 scp_data[]; 152 } __packed; 153 154 /* IPL Report List header */ 155 struct ipl_rl_hdr { 156 __u32 len; 157 __u8 flags; 158 __u8 reserved1[2]; 159 __u8 version; 160 __u8 reserved2[8]; 161 } __packed; 162 163 /* IPL Report Block header */ 164 struct ipl_rb_hdr { 165 __u32 len; 166 __u8 rbt; 167 __u8 reserved1[11]; 168 } __packed; 169 170 /* IPL Report Block types */ 171 enum ipl_rbt { 172 IPL_RBT_CERTIFICATES = 1, 173 IPL_RBT_COMPONENTS = 2, 174 }; 175 176 /* IPL Report Block for the certificate list */ 177 struct ipl_rb_certificate_entry { 178 __u64 addr; 179 __u64 len; 180 } __packed; 181 182 struct ipl_rb_certificates { 183 __u32 len; 184 __u8 rbt; 185 __u8 reserved1[11]; 186 struct ipl_rb_certificate_entry entries[]; 187 } __packed; 188 189 /* IPL Report Block for the component list */ 190 struct ipl_rb_component_entry { 191 __u64 addr; 192 __u64 len; 193 __u8 flags; 194 __u8 reserved1[5]; 195 __u16 certificate_index; 196 __u8 reserved2[8]; 197 }; 198 199 #define IPL_RB_COMPONENT_FLAG_SIGNED 0x80 200 #define IPL_RB_COMPONENT_FLAG_VERIFIED 0x40 201 202 struct ipl_rb_components { 203 __u32 len; 204 __u8 rbt; 205 __u8 reserved1[11]; 206 struct ipl_rb_component_entry entries[]; 207 } __packed; 208 209 #endif 210