4 * Copyright IBM Corp. 2007
7 #ifndef _ASM_S390_IPL_H
8 #define _ASM_S390_IPL_H
10 #include <asm/lowcore.h>
11 #include <asm/types.h>
13 #include <asm/setup.h>
15 #define IPL_PARMBLOCK_ORIGIN 0x2000
17 #define IPL_PARM_BLK_FCP_LEN (sizeof(struct ipl_list_hdr) + \
18 sizeof(struct ipl_block_fcp))
20 #define IPL_PARM_BLK0_FCP_LEN (sizeof(struct ipl_block_fcp) + 16)
22 #define IPL_PARM_BLK_CCW_LEN (sizeof(struct ipl_list_hdr) + \
23 sizeof(struct ipl_block_ccw))
25 #define IPL_PARM_BLK0_CCW_LEN (sizeof(struct ipl_block_ccw) + 16)
27 #define IPL_MAX_SUPPORTED_VERSION (0)
29 #define IPL_PARMBLOCK_START ((struct ipl_parameter_block *) \
31 #define IPL_PARMBLOCK_SIZE (IPL_PARMBLOCK_START->hdr.len)
42 } __attribute__((packed));
44 struct ipl_block_fcp {
59 } __attribute__((packed));
61 #define DIAG308_VMPARM_SIZE 64
62 #define DIAG308_SCPDATA_SIZE (PAGE_SIZE - (sizeof(struct ipl_list_hdr) + \
63 offsetof(struct ipl_block_fcp, scp_data)))
65 struct ipl_block_ccw {
74 u8 vm_parm[DIAG308_VMPARM_SIZE];
76 } __attribute__((packed));
78 struct ipl_parameter_block {
79 struct ipl_list_hdr hdr;
81 struct ipl_block_fcp fcp;
82 struct ipl_block_ccw ccw;
84 } __attribute__((packed,aligned(4096)));
90 extern u32 dump_prefix_page;
92 struct dump_save_areas {
93 struct save_area_ext **areas;
97 extern struct dump_save_areas dump_save_areas;
99 extern void do_reipl(void);
100 extern void do_halt(void);
101 extern void do_poff(void);
102 extern void ipl_save_parameters(void);
103 extern void ipl_update_parameters(void);
104 extern size_t append_ipl_vmparm(char *, size_t);
105 extern size_t append_ipl_scpdata(char *, size_t);
109 IPL_PARMBLOCK_VALID = 2,
114 IPL_TYPE_UNKNOWN = 1,
117 IPL_TYPE_FCP_DUMP = 8,
126 struct ccw_dev_id dev_id;
129 struct ccw_dev_id dev_id;
134 char name[NSS_NAME_SIZE + 1];
139 extern struct ipl_info ipl_info;
140 extern void setup_ipl(void);
145 enum diag308_subcode {
153 enum diag308_ipl_type {
154 DIAG308_IPL_TYPE_FCP = 0,
155 DIAG308_IPL_TYPE_CCW = 2,
159 DIAG308_IPL_OPT_IPL = 0x10,
160 DIAG308_IPL_OPT_DUMP = 0x20,
164 DIAG308_FLAGS_LP_VALID = 0x80,
167 enum diag308_vm_flags {
168 DIAG308_VM_FLAGS_NSS_VALID = 0x80,
169 DIAG308_VM_FLAGS_VP_VALID = 0x40,
173 DIAG308_RC_OK = 0x0001,
174 DIAG308_RC_NOCONFIG = 0x0102,
177 extern int diag308(unsigned long subcode, void *addr);
178 extern void diag308_reset(void);
179 extern void store_status(void);
180 extern void lgr_info_log(void);
182 #endif /* _ASM_S390_IPL_H */