ipl.h 3.2 KB

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