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