4 * Copyright IBM Corp. 2007
7 #ifndef _ASM_S390_IPL_H
8 #define _ASM_S390_IPL_H
10 #include <asm/types.h>
12 #include <asm/setup.h>
14 #define IPL_PARMBLOCK_ORIGIN 0x2000
16 #define IPL_PARM_BLK_FCP_LEN (sizeof(struct ipl_list_hdr) + \
17 sizeof(struct ipl_block_fcp))
19 #define IPL_PARM_BLK0_FCP_LEN (sizeof(struct ipl_block_fcp) + 8)
21 #define IPL_PARM_BLK_CCW_LEN (sizeof(struct ipl_list_hdr) + \
22 sizeof(struct ipl_block_ccw))
24 #define IPL_PARM_BLK0_CCW_LEN (sizeof(struct ipl_block_ccw) + 8)
26 #define IPL_MAX_SUPPORTED_VERSION (0)
28 #define IPL_PARMBLOCK_START ((struct ipl_parameter_block *) \
30 #define IPL_PARMBLOCK_SIZE (IPL_PARMBLOCK_START->hdr.len)
40 } __attribute__((packed
));
42 struct ipl_block_fcp
{
57 } __attribute__((packed
));
59 #define DIAG308_VMPARM_SIZE 64
60 #define DIAG308_SCPDATA_SIZE (PAGE_SIZE - (sizeof(struct ipl_list_hdr) + \
61 offsetof(struct ipl_block_fcp, scp_data)))
63 struct ipl_block_ccw
{
72 u8 vm_parm
[DIAG308_VMPARM_SIZE
];
74 } __attribute__((packed
));
76 struct ipl_parameter_block
{
77 struct ipl_list_hdr hdr
;
79 struct ipl_block_fcp fcp
;
80 struct ipl_block_ccw ccw
;
82 } __attribute__((packed
,aligned(4096)));
88 extern u32 dump_prefix_page
;
89 extern unsigned int zfcpdump_prefix_array
[];
91 extern void do_reipl(void);
92 extern void do_halt(void);
93 extern void do_poff(void);
94 extern void ipl_save_parameters(void);
95 extern void ipl_update_parameters(void);
96 extern size_t append_ipl_vmparm(char *, size_t);
97 extern size_t append_ipl_scpdata(char *, size_t);
101 IPL_PARMBLOCK_VALID
= 2,
106 IPL_TYPE_UNKNOWN
= 1,
109 IPL_TYPE_FCP_DUMP
= 8,
118 struct ccw_dev_id dev_id
;
121 struct ccw_dev_id dev_id
;
126 char name
[NSS_NAME_SIZE
+ 1];
131 extern struct ipl_info ipl_info
;
132 extern void setup_ipl(void);
137 enum diag308_subcode
{
145 enum diag308_ipl_type
{
146 DIAG308_IPL_TYPE_FCP
= 0,
147 DIAG308_IPL_TYPE_CCW
= 2,
151 DIAG308_IPL_OPT_IPL
= 0x10,
152 DIAG308_IPL_OPT_DUMP
= 0x20,
156 DIAG308_FLAGS_LP_VALID
= 0x80,
159 enum diag308_vm_flags
{
160 DIAG308_VM_FLAGS_NSS_VALID
= 0x80,
161 DIAG308_VM_FLAGS_VP_VALID
= 0x40,
165 DIAG308_RC_OK
= 0x0001,
166 DIAG308_RC_NOCONFIG
= 0x0102,
169 extern int diag308(unsigned long subcode
, void *addr
);
170 extern void diag308_reset(void);
171 extern void store_status(void);
173 #endif /* _ASM_S390_IPL_H */