summaryrefslogtreecommitdiffstats
path: root/arch/s390/include/uapi/asm/ipl.h
blob: fd32b1cd80d2944b5376574f85f10db855cacab1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_S390_UAPI_IPL_H
#define _ASM_S390_UAPI_IPL_H

#include <linux/types.h>

/* IPL Parameter List header */
struct ipl_pl_hdr {
	__u32 len;
	__u8  flags;
	__u8  reserved1[2];
	__u8  version;
} __packed;

#define IPL_PL_FLAG_IPLPS	0x80
#define IPL_PL_FLAG_SIPL	0x40
#define IPL_PL_FLAG_IPLSR	0x20

/* IPL Parameter Block header */
struct ipl_pb_hdr {
	__u32 len;
	__u8  pbt;
} __packed;

/* IPL Parameter Block types */
enum ipl_pbt {
	IPL_PBT_FCP = 0,
	IPL_PBT_SCP_DATA = 1,
	IPL_PBT_CCW = 2,
};

/* IPL Parameter Block 0 with common fields */
struct ipl_pb0_common {
	__u32 len;
	__u8  pbt;
	__u8  flags;
	__u8  reserved1[2];
	__u8  loadparm[8];
	__u8  reserved2[84];
} __packed;

#define IPL_PB0_FLAG_LOADPARM	0x80

/* IPL Parameter Block 0 for FCP */
struct ipl_pb0_fcp {
	__u32 len;
	__u8  pbt;
	__u8  reserved1[3];
	__u8  loadparm[8];
	__u8  reserved2[304];
	__u8  opt;
	__u8  reserved3[3];
	__u8  cssid;
	__u8  reserved4[1];
	__u16 devno;
	__u8  reserved5[4];
	__u64 wwpn;
	__u64 lun;
	__u32 bootprog;
	__u8  reserved6[12];
	__u64 br_lba;
	__u32 scp_data_len;
	__u8  reserved7[260];
	__u8  scp_data[];
} __packed;

#define IPL_PB0_FCP_OPT_IPL	0x10
#define IPL_PB0_FCP_OPT_DUMP	0x20

/* IPL Parameter Block 0 for CCW */
struct ipl_pb0_ccw {
	__u32 len;
	__u8  pbt;
	__u8  flags;
	__u8  reserved1[2];
	__u8  loadparm[8];
	__u8  reserved2[84];
	__u16 reserved3 : 13;
	__u8  ssid : 3;
	__u16 devno;
	__u8  vm_flags;
	__u8  reserved4[3];
	__u32 vm_parm_len;
	__u8  nss_name[8];
	__u8  vm_parm[64];
	__u8  reserved5[8];
} __packed;

#define IPL_PB0_CCW_VM_FLAG_NSS		0x80
#define IPL_PB0_CCW_VM_FLAG_VP		0x40

/* IPL Parameter Block 1 for additional SCP data */
struct ipl_pb1_scp_data {
	__u32 len;
	__u8  pbt;
	__u8  scp_data[];
} __packed;

/* IPL Report List header */
struct ipl_rl_hdr {
	__u32 len;
	__u8  flags;
	__u8  reserved1[2];
	__u8  version;
	__u8  reserved2[8];
} __packed;

/* IPL Report Block header */
struct ipl_rb_hdr {
	__u32 len;
	__u8  rbt;
	__u8  reserved1[11];
} __packed;

/* IPL Report Block types */
enum ipl_rbt {
	IPL_RBT_CERTIFICATES = 1,
	IPL_RBT_COMPONENTS = 2,
};

/* IPL Report Block for the certificate list */
struct ipl_rb_certificate_entry {
	__u64 addr;
	__u64 len;
} __packed;

struct ipl_rb_certificates {
	__u32 len;
	__u8  rbt;
	__u8  reserved1[11];
	struct ipl_rb_certificate_entry entries[];
} __packed;

/* IPL Report Block for the component list */
struct ipl_rb_component_entry {
	__u64 addr;
	__u64 len;
	__u8  flags;
	__u8  reserved1[5];
	__u16 certificate_index;
	__u8  reserved2[8];
};

#define IPL_RB_COMPONENT_FLAG_SIGNED	0x80
#define IPL_RB_COMPONENT_FLAG_VERIFIED	0x40

struct ipl_rb_components {
	__u32 len;
	__u8  rbt;
	__u8  reserved1[11];
	struct ipl_rb_component_entry entries[];
} __packed;

#endif