ipl.h 3.7 KB

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