Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 #ifndef _ASM_S390_UAPI_IPL_H
0003 #define _ASM_S390_UAPI_IPL_H
0004 
0005 #include <linux/types.h>
0006 
0007 /* IPL Parameter List header */
0008 struct ipl_pl_hdr {
0009     __u32 len;
0010     __u8  flags;
0011     __u8  reserved1[2];
0012     __u8  version;
0013 } __packed;
0014 
0015 #define IPL_PL_FLAG_IPLPS   0x80
0016 #define IPL_PL_FLAG_SIPL    0x40
0017 #define IPL_PL_FLAG_IPLSR   0x20
0018 
0019 /* IPL Parameter Block header */
0020 struct ipl_pb_hdr {
0021     __u32 len;
0022     __u8  pbt;
0023 } __packed;
0024 
0025 /* IPL Parameter Block types */
0026 enum ipl_pbt {
0027     IPL_PBT_FCP = 0,
0028     IPL_PBT_SCP_DATA = 1,
0029     IPL_PBT_CCW = 2,
0030     IPL_PBT_NVME = 4,
0031 };
0032 
0033 /* IPL Parameter Block 0 with common fields */
0034 struct ipl_pb0_common {
0035     __u32 len;
0036     __u8  pbt;
0037     __u8  flags;
0038     __u8  reserved1[2];
0039     __u8  loadparm[8];
0040     __u8  reserved2[84];
0041 } __packed;
0042 
0043 #define IPL_PB0_FLAG_LOADPARM   0x80
0044 
0045 /* IPL Parameter Block 0 for FCP */
0046 struct ipl_pb0_fcp {
0047     __u32 len;
0048     __u8  pbt;
0049     __u8  reserved1[3];
0050     __u8  loadparm[8];
0051     __u8  reserved2[304];
0052     __u8  opt;
0053     __u8  reserved3[3];
0054     __u8  cssid;
0055     __u8  reserved4[1];
0056     __u16 devno;
0057     __u8  reserved5[4];
0058     __u64 wwpn;
0059     __u64 lun;
0060     __u32 bootprog;
0061     __u8  reserved6[12];
0062     __u64 br_lba;
0063     __u32 scp_data_len;
0064     __u8  reserved7[260];
0065     __u8  scp_data[];
0066 } __packed;
0067 
0068 #define IPL_PB0_FCP_OPT_IPL 0x10
0069 #define IPL_PB0_FCP_OPT_DUMP    0x20
0070 
0071 /* IPL Parameter Block 0 for NVMe */
0072 struct ipl_pb0_nvme {
0073     __u32 len;
0074     __u8  pbt;
0075     __u8  reserved1[3];
0076     __u8  loadparm[8];
0077     __u8  reserved2[304];
0078     __u8  opt;
0079     __u8  reserved3[3];
0080     __u32 fid;
0081     __u8 reserved4[12];
0082     __u32 nsid;
0083     __u8 reserved5[4];
0084     __u32 bootprog;
0085     __u8 reserved6[12];
0086     __u64 br_lba;
0087     __u32 scp_data_len;
0088     __u8  reserved7[260];
0089     __u8  scp_data[];
0090 } __packed;
0091 
0092 #define IPL_PB0_NVME_OPT_IPL    0x10
0093 #define IPL_PB0_NVME_OPT_DUMP   0x20
0094 
0095 /* IPL Parameter Block 0 for CCW */
0096 struct ipl_pb0_ccw {
0097     __u32 len;
0098     __u8  pbt;
0099     __u8  flags;
0100     __u8  reserved1[2];
0101     __u8  loadparm[8];
0102     __u8  reserved2[84];
0103     __u16 reserved3 : 13;
0104     __u8  ssid : 3;
0105     __u16 devno;
0106     __u8  vm_flags;
0107     __u8  reserved4[3];
0108     __u32 vm_parm_len;
0109     __u8  nss_name[8];
0110     __u8  vm_parm[64];
0111     __u8  reserved5[8];
0112 } __packed;
0113 
0114 #define IPL_PB0_CCW_VM_FLAG_NSS     0x80
0115 #define IPL_PB0_CCW_VM_FLAG_VP      0x40
0116 
0117 /* IPL Parameter Block 1 for additional SCP data */
0118 struct ipl_pb1_scp_data {
0119     __u32 len;
0120     __u8  pbt;
0121     __u8  scp_data[];
0122 } __packed;
0123 
0124 /* IPL Report List header */
0125 struct ipl_rl_hdr {
0126     __u32 len;
0127     __u8  flags;
0128     __u8  reserved1[2];
0129     __u8  version;
0130     __u8  reserved2[8];
0131 } __packed;
0132 
0133 /* IPL Report Block header */
0134 struct ipl_rb_hdr {
0135     __u32 len;
0136     __u8  rbt;
0137     __u8  reserved1[11];
0138 } __packed;
0139 
0140 /* IPL Report Block types */
0141 enum ipl_rbt {
0142     IPL_RBT_CERTIFICATES = 1,
0143     IPL_RBT_COMPONENTS = 2,
0144 };
0145 
0146 /* IPL Report Block for the certificate list */
0147 struct ipl_rb_certificate_entry {
0148     __u64 addr;
0149     __u64 len;
0150 } __packed;
0151 
0152 struct ipl_rb_certificates {
0153     __u32 len;
0154     __u8  rbt;
0155     __u8  reserved1[11];
0156     struct ipl_rb_certificate_entry entries[];
0157 } __packed;
0158 
0159 /* IPL Report Block for the component list */
0160 struct ipl_rb_component_entry {
0161     __u64 addr;
0162     __u64 len;
0163     __u8  flags;
0164     __u8  reserved1[5];
0165     __u16 certificate_index;
0166     __u8  reserved2[8];
0167 };
0168 
0169 #define IPL_RB_COMPONENT_FLAG_SIGNED    0x80
0170 #define IPL_RB_COMPONENT_FLAG_VERIFIED  0x40
0171 
0172 struct ipl_rb_components {
0173     __u32 len;
0174     __u8  rbt;
0175     __u8  reserved1[11];
0176     struct ipl_rb_component_entry entries[];
0177 } __packed;
0178 
0179 #endif