1 /* SPDX-License-Identifier: GPL-2.0 */
5 * Copyright IBM Corp. 2007
8 #ifndef _ASM_S390_IPL_H
9 #define _ASM_S390_IPL_H
11 #include <asm/lowcore.h>
12 #include <asm/types.h>
14 #include <asm/setup.h>
16 #define NSS_NAME_SIZE 8
18 #define IPL_PARM_BLK_FCP_LEN (sizeof(struct ipl_list_hdr) + \
19 sizeof(struct ipl_block_fcp))
21 #define IPL_PARM_BLK0_FCP_LEN (sizeof(struct ipl_block_fcp) + 16)
23 #define IPL_PARM_BLK_CCW_LEN (sizeof(struct ipl_list_hdr) + \
24 sizeof(struct ipl_block_ccw))
26 #define IPL_PARM_BLK0_CCW_LEN (sizeof(struct ipl_block_ccw) + 16)
28 #define IPL_MAX_SUPPORTED_VERSION (0)
39 } __attribute__((packed));
41 struct ipl_block_fcp {
56 } __attribute__((packed));
58 #define DIAG308_VMPARM_SIZE 64
59 #define DIAG308_SCPDATA_SIZE (PAGE_SIZE - (sizeof(struct ipl_list_hdr) + \
60 offsetof(struct ipl_block_fcp, scp_data)))
62 struct ipl_block_ccw {
71 u8 vm_parm[DIAG308_VMPARM_SIZE];
73 } __attribute__((packed));
75 struct ipl_parameter_block {
76 struct ipl_list_hdr hdr;
78 struct ipl_block_fcp fcp;
79 struct ipl_block_ccw ccw;
80 char raw[PAGE_SIZE - sizeof(struct ipl_list_hdr)];
82 } __packed __aligned(PAGE_SIZE);
85 struct save_area * __init save_area_alloc(bool is_boot_cpu);
86 struct save_area * __init save_area_boot_cpu(void);
87 void __init save_area_add_regs(struct save_area *, void *regs);
88 void __init save_area_add_vxrs(struct save_area *, __vector128 *vxrs);
90 extern void s390_reset_system(void);
91 extern void ipl_store_parameters(void);
92 extern size_t append_ipl_vmparm(char *, size_t);
93 extern size_t append_ipl_scpdata(char *, size_t);
99 IPL_TYPE_FCP_DUMP = 8,
108 struct ccw_dev_id dev_id;
111 struct ccw_dev_id dev_id;
116 char name[NSS_NAME_SIZE + 1];
121 extern struct ipl_info ipl_info;
122 extern void setup_ipl(void);
123 extern void set_os_info_reipl_block(void);
128 enum diag308_subcode {
130 DIAG308_LOAD_CLEAR = 3,
131 DIAG308_LOAD_NORMAL_DUMP = 4,
136 enum diag308_ipl_type {
137 DIAG308_IPL_TYPE_FCP = 0,
138 DIAG308_IPL_TYPE_CCW = 2,
142 DIAG308_IPL_OPT_IPL = 0x10,
143 DIAG308_IPL_OPT_DUMP = 0x20,
147 DIAG308_FLAGS_LP_VALID = 0x80,
150 enum diag308_vm_flags {
151 DIAG308_VM_FLAGS_NSS_VALID = 0x80,
152 DIAG308_VM_FLAGS_VP_VALID = 0x40,
156 DIAG308_RC_OK = 0x0001,
157 DIAG308_RC_NOCONFIG = 0x0102,
160 extern int diag308(unsigned long subcode, void *addr);
161 extern void diag308_reset(void);
162 extern void store_status(void (*fn)(void *), void *data);
163 extern void lgr_info_log(void);
165 #endif /* _ASM_S390_IPL_H */