[S390] dasd: Add ipldev parameter.
[deliverable/linux.git] / include / asm-s390 / ipl.h
CommitLineData
46b05d26
MH
1/*
2 * s390 (re)ipl support
3 *
4 * Copyright IBM Corp. 2007
5 */
6
7#ifndef _ASM_S390_IPL_H
8#define _ASM_S390_IPL_H
9
10#include <asm/types.h>
11
12#define IPL_PARMBLOCK_ORIGIN 0x2000
13
14#define IPL_PARM_BLK_FCP_LEN (sizeof(struct ipl_list_hdr) + \
15 sizeof(struct ipl_block_fcp))
16
fbb04f38
MH
17#define IPL_PARM_BLK0_FCP_LEN (sizeof(struct ipl_block_fcp) + 8)
18
46b05d26
MH
19#define IPL_PARM_BLK_CCW_LEN (sizeof(struct ipl_list_hdr) + \
20 sizeof(struct ipl_block_ccw))
21
fbb04f38
MH
22#define IPL_PARM_BLK0_CCW_LEN (sizeof(struct ipl_block_ccw) + 8)
23
46b05d26
MH
24#define IPL_MAX_SUPPORTED_VERSION (0)
25
26#define IPL_PARMBLOCK_START ((struct ipl_parameter_block *) \
27 IPL_PARMBLOCK_ORIGIN)
28#define IPL_PARMBLOCK_SIZE (IPL_PARMBLOCK_START->hdr.len)
29
30struct ipl_list_hdr {
31 u32 len;
32 u8 reserved1[3];
33 u8 version;
34 u32 blk0_len;
35 u8 pbt;
36 u8 flags;
37 u16 reserved2;
38} __attribute__((packed));
39
40struct ipl_block_fcp {
41 u8 reserved1[313-1];
42 u8 opt;
43 u8 reserved2[3];
44 u16 reserved3;
45 u16 devno;
46 u8 reserved4[4];
47 u64 wwpn;
48 u64 lun;
49 u32 bootprog;
50 u8 reserved5[12];
51 u64 br_lba;
52 u32 scp_data_len;
53 u8 reserved6[260];
54 u8 scp_data[];
55} __attribute__((packed));
56
57struct ipl_block_ccw {
58 u8 load_param[8];
59 u8 reserved1[84];
60 u8 reserved2[2];
61 u16 devno;
62 u8 vm_flags;
63 u8 reserved3[3];
64 u32 vm_parm_len;
fbb04f38 65 u8 reserved4[80];
46b05d26
MH
66} __attribute__((packed));
67
68struct ipl_parameter_block {
69 struct ipl_list_hdr hdr;
70 union {
71 struct ipl_block_fcp fcp;
72 struct ipl_block_ccw ccw;
73 } ipl_info;
74} __attribute__((packed));
75
76/*
6fc321fd 77 * IPL validity flags
46b05d26
MH
78 */
79extern u32 ipl_flags;
46b05d26 80
c5dd8586 81extern u32 dump_prefix_page;
46b05d26
MH
82extern void do_reipl(void);
83extern void ipl_save_parameters(void);
84
85enum {
86 IPL_DEVNO_VALID = 1,
87 IPL_PARMBLOCK_VALID = 2,
88 IPL_NSS_VALID = 4,
89};
90
91/*
92 * DIAG 308 support
93 */
94enum diag308_subcode {
95 DIAG308_REL_HSA = 2,
96 DIAG308_IPL = 3,
97 DIAG308_DUMP = 4,
98 DIAG308_SET = 5,
99 DIAG308_STORE = 6,
100};
101
102enum diag308_ipl_type {
103 DIAG308_IPL_TYPE_FCP = 0,
104 DIAG308_IPL_TYPE_CCW = 2,
105};
106
107enum diag308_opt {
108 DIAG308_IPL_OPT_IPL = 0x10,
109 DIAG308_IPL_OPT_DUMP = 0x20,
110};
111
112enum diag308_rc {
113 DIAG308_RC_OK = 1,
114};
115
116extern int diag308(unsigned long subcode, void *addr);
117
118#endif /* _ASM_S390_IPL_H */
This page took 0.04235 seconds and 5 git commands to generate.