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_NVME = 4, 31 }; 32 33 /* IPL Parameter Block 0 with common fields */ 34 struct ipl_pb0_common { 35 __u32 len; 36 __u8 pbt; 37 __u8 flags; 38 __u8 reserved1[2]; 39 __u8 loadparm[8]; 40 __u8 reserved2[84]; 41 } __packed; 42 43 #define IPL_PB0_FLAG_LOADPARM 0x80 44 45 /* IPL Parameter Block 0 for FCP */ 46 struct ipl_pb0_fcp { 47 __u32 len; 48 __u8 pbt; 49 __u8 reserved1[3]; 50 __u8 loadparm[8]; 51 __u8 reserved2[304]; 52 __u8 opt; 53 __u8 reserved3[3]; 54 __u8 cssid; 55 __u8 reserved4[1]; 56 __u16 devno; 57 __u8 reserved5[4]; 58 __u64 wwpn; 59 __u64 lun; 60 __u32 bootprog; 61 __u8 reserved6[12]; 62 __u64 br_lba; 63 __u32 scp_data_len; 64 __u8 reserved7[260]; 65 __u8 scp_data[]; 66 } __packed; 67 68 #define IPL_PB0_FCP_OPT_IPL 0x10 69 #define IPL_PB0_FCP_OPT_DUMP 0x20 70 71 /* IPL Parameter Block 0 for NVMe */ 72 struct ipl_pb0_nvme { 73 __u32 len; 74 __u8 pbt; 75 __u8 reserved1[3]; 76 __u8 loadparm[8]; 77 __u8 reserved2[304]; 78 __u8 opt; 79 __u8 reserved3[3]; 80 __u32 fid; 81 __u8 reserved4[12]; 82 __u32 nsid; 83 __u8 reserved5[4]; 84 __u32 bootprog; 85 __u8 reserved6[12]; 86 __u64 br_lba; 87 __u32 scp_data_len; 88 __u8 reserved7[260]; 89 __u8 scp_data[]; 90 } __packed; 91 92 #define IPL_PB0_NVME_OPT_IPL 0x10 93 #define IPL_PB0_NVME_OPT_DUMP 0x20 94 95 /* IPL Parameter Block 0 for CCW */ 96 struct ipl_pb0_ccw { 97 __u32 len; 98 __u8 pbt; 99 __u8 flags; 100 __u8 reserved1[2]; 101 __u8 loadparm[8]; 102 __u8 reserved2[84]; 103 __u16 reserved3 : 13; 104 __u8 ssid : 3; 105 __u16 devno; 106 __u8 vm_flags; 107 __u8 reserved4[3]; 108 __u32 vm_parm_len; 109 __u8 nss_name[8]; 110 __u8 vm_parm[64]; 111 __u8 reserved5[8]; 112 } __packed; 113 114 #define IPL_PB0_CCW_VM_FLAG_NSS 0x80 115 #define IPL_PB0_CCW_VM_FLAG_VP 0x40 116 117 /* IPL Parameter Block 1 for additional SCP data */ 118 struct ipl_pb1_scp_data { 119 __u32 len; 120 __u8 pbt; 121 __u8 scp_data[]; 122 } __packed; 123 124 /* IPL Report List header */ 125 struct ipl_rl_hdr { 126 __u32 len; 127 __u8 flags; 128 __u8 reserved1[2]; 129 __u8 version; 130 __u8 reserved2[8]; 131 } __packed; 132 133 /* IPL Report Block header */ 134 struct ipl_rb_hdr { 135 __u32 len; 136 __u8 rbt; 137 __u8 reserved1[11]; 138 } __packed; 139 140 /* IPL Report Block types */ 141 enum ipl_rbt { 142 IPL_RBT_CERTIFICATES = 1, 143 IPL_RBT_COMPONENTS = 2, 144 }; 145 146 /* IPL Report Block for the certificate list */ 147 struct ipl_rb_certificate_entry { 148 __u64 addr; 149 __u64 len; 150 } __packed; 151 152 struct ipl_rb_certificates { 153 __u32 len; 154 __u8 rbt; 155 __u8 reserved1[11]; 156 struct ipl_rb_certificate_entry entries[]; 157 } __packed; 158 159 /* IPL Report Block for the component list */ 160 struct ipl_rb_component_entry { 161 __u64 addr; 162 __u64 len; 163 __u8 flags; 164 __u8 reserved1[5]; 165 __u16 certificate_index; 166 __u8 reserved2[8]; 167 }; 168 169 #define IPL_RB_COMPONENT_FLAG_SIGNED 0x80 170 #define IPL_RB_COMPONENT_FLAG_VERIFIED 0x40 171 172 struct ipl_rb_components { 173 __u32 len; 174 __u8 rbt; 175 __u8 reserved1[11]; 176 struct ipl_rb_component_entry entries[]; 177 } __packed; 178 179 #endif 180