diff options
author | Michael Holzheu <holzheu@de.ibm.com> | 2006-09-20 09:58:49 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-09-20 09:58:49 -0400 |
commit | ff6b8ea68f4b7353f88b97024f28127e2148aa00 (patch) | |
tree | 67ebb74cbbc042d99325ff33c3f80e4b3e0a1c42 /include | |
parent | 331c982d4a6b43cdc0d056956a1cae8a7d6237bf (diff) |
[S390] ipl/dump on panic.
It is now possible to specify a ccw/fcp dump device which is used to
automatically create a system dump in case of a kernel panic. The dump
device can be configured under /sys/firmware/dump.
In addition it is now possible to specify a ccw/fcp device which is used
for the next reboot of Linux. The reipl device can be configured under
/sys/firmware/reipl.
Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-s390/cio.h | 7 | ||||
-rw-r--r-- | include/asm-s390/lowcore.h | 13 | ||||
-rw-r--r-- | include/asm-s390/setup.h | 54 |
3 files changed, 57 insertions, 17 deletions
diff --git a/include/asm-s390/cio.h b/include/asm-s390/cio.h index 28fdd6e2b8ba..da063cd5f0a0 100644 --- a/include/asm-s390/cio.h +++ b/include/asm-s390/cio.h | |||
@@ -270,6 +270,11 @@ struct diag210 { | |||
270 | __u32 vrdccrft : 8; /* real device feature (output) */ | 270 | __u32 vrdccrft : 8; /* real device feature (output) */ |
271 | } __attribute__ ((packed,aligned(4))); | 271 | } __attribute__ ((packed,aligned(4))); |
272 | 272 | ||
273 | struct ccw_dev_id { | ||
274 | u8 ssid; | ||
275 | u16 devno; | ||
276 | }; | ||
277 | |||
273 | extern int diag210(struct diag210 *addr); | 278 | extern int diag210(struct diag210 *addr); |
274 | 279 | ||
275 | extern void wait_cons_dev(void); | 280 | extern void wait_cons_dev(void); |
@@ -280,6 +285,8 @@ extern void cio_reset_channel_paths(void); | |||
280 | 285 | ||
281 | extern void css_schedule_reprobe(void); | 286 | extern void css_schedule_reprobe(void); |
282 | 287 | ||
288 | extern void reipl_ccw_dev(struct ccw_dev_id *id); | ||
289 | |||
283 | #endif | 290 | #endif |
284 | 291 | ||
285 | #endif | 292 | #endif |
diff --git a/include/asm-s390/lowcore.h b/include/asm-s390/lowcore.h index 596c8b172104..2e3d4cca5e21 100644 --- a/include/asm-s390/lowcore.h +++ b/include/asm-s390/lowcore.h | |||
@@ -47,6 +47,7 @@ | |||
47 | #define __LC_PER_ATMID 0x096 | 47 | #define __LC_PER_ATMID 0x096 |
48 | #define __LC_PER_ADDRESS 0x098 | 48 | #define __LC_PER_ADDRESS 0x098 |
49 | #define __LC_PER_ACCESS_ID 0x0A1 | 49 | #define __LC_PER_ACCESS_ID 0x0A1 |
50 | #define __LC_AR_MODE_ID 0x0A3 | ||
50 | 51 | ||
51 | #define __LC_SUBCHANNEL_ID 0x0B8 | 52 | #define __LC_SUBCHANNEL_ID 0x0B8 |
52 | #define __LC_SUBCHANNEL_NR 0x0BA | 53 | #define __LC_SUBCHANNEL_NR 0x0BA |
@@ -106,18 +107,28 @@ | |||
106 | #define __LC_INT_CLOCK 0xDE8 | 107 | #define __LC_INT_CLOCK 0xDE8 |
107 | #endif /* __s390x__ */ | 108 | #endif /* __s390x__ */ |
108 | 109 | ||
109 | #define __LC_PANIC_MAGIC 0xE00 | ||
110 | 110 | ||
111 | #define __LC_PANIC_MAGIC 0xE00 | ||
111 | #ifndef __s390x__ | 112 | #ifndef __s390x__ |
112 | #define __LC_PFAULT_INTPARM 0x080 | 113 | #define __LC_PFAULT_INTPARM 0x080 |
113 | #define __LC_CPU_TIMER_SAVE_AREA 0x0D8 | 114 | #define __LC_CPU_TIMER_SAVE_AREA 0x0D8 |
115 | #define __LC_CLOCK_COMP_SAVE_AREA 0x0E0 | ||
116 | #define __LC_PSW_SAVE_AREA 0x100 | ||
117 | #define __LC_PREFIX_SAVE_AREA 0x108 | ||
114 | #define __LC_AREGS_SAVE_AREA 0x120 | 118 | #define __LC_AREGS_SAVE_AREA 0x120 |
119 | #define __LC_FPREGS_SAVE_AREA 0x160 | ||
115 | #define __LC_GPREGS_SAVE_AREA 0x180 | 120 | #define __LC_GPREGS_SAVE_AREA 0x180 |
116 | #define __LC_CREGS_SAVE_AREA 0x1C0 | 121 | #define __LC_CREGS_SAVE_AREA 0x1C0 |
117 | #else /* __s390x__ */ | 122 | #else /* __s390x__ */ |
118 | #define __LC_PFAULT_INTPARM 0x11B8 | 123 | #define __LC_PFAULT_INTPARM 0x11B8 |
124 | #define __LC_FPREGS_SAVE_AREA 0x1200 | ||
119 | #define __LC_GPREGS_SAVE_AREA 0x1280 | 125 | #define __LC_GPREGS_SAVE_AREA 0x1280 |
126 | #define __LC_PSW_SAVE_AREA 0x1300 | ||
127 | #define __LC_PREFIX_SAVE_AREA 0x1318 | ||
128 | #define __LC_FP_CREG_SAVE_AREA 0x131C | ||
129 | #define __LC_TODREG_SAVE_AREA 0x1324 | ||
120 | #define __LC_CPU_TIMER_SAVE_AREA 0x1328 | 130 | #define __LC_CPU_TIMER_SAVE_AREA 0x1328 |
131 | #define __LC_CLOCK_COMP_SAVE_AREA 0x1331 | ||
121 | #define __LC_AREGS_SAVE_AREA 0x1340 | 132 | #define __LC_AREGS_SAVE_AREA 0x1340 |
122 | #define __LC_CREGS_SAVE_AREA 0x1380 | 133 | #define __LC_CREGS_SAVE_AREA 0x1380 |
123 | #endif /* __s390x__ */ | 134 | #endif /* __s390x__ */ |
diff --git a/include/asm-s390/setup.h b/include/asm-s390/setup.h index 02c96d57f0cf..4a1126d8439a 100644 --- a/include/asm-s390/setup.h +++ b/include/asm-s390/setup.h | |||
@@ -68,39 +68,59 @@ extern unsigned int console_irq; | |||
68 | #define SET_CONSOLE_3215 do { console_mode = 2; } while (0) | 68 | #define SET_CONSOLE_3215 do { console_mode = 2; } while (0) |
69 | #define SET_CONSOLE_3270 do { console_mode = 3; } while (0) | 69 | #define SET_CONSOLE_3270 do { console_mode = 3; } while (0) |
70 | 70 | ||
71 | struct ipl_list_header { | 71 | |
72 | u32 length; | 72 | struct ipl_list_hdr { |
73 | u8 reserved[3]; | 73 | u32 len; |
74 | u8 reserved1[3]; | ||
74 | u8 version; | 75 | u8 version; |
76 | u32 blk0_len; | ||
77 | u8 pbt; | ||
78 | u8 flags; | ||
79 | u16 reserved2; | ||
75 | } __attribute__((packed)); | 80 | } __attribute__((packed)); |
76 | 81 | ||
77 | struct ipl_block_fcp { | 82 | struct ipl_block_fcp { |
78 | u32 length; | 83 | u8 reserved1[313-1]; |
79 | u8 pbt; | 84 | u8 opt; |
80 | u8 reserved1[322-1]; | 85 | u8 reserved2[3]; |
86 | u16 reserved3; | ||
81 | u16 devno; | 87 | u16 devno; |
82 | u8 reserved2[4]; | 88 | u8 reserved4[4]; |
83 | u64 wwpn; | 89 | u64 wwpn; |
84 | u64 lun; | 90 | u64 lun; |
85 | u32 bootprog; | 91 | u32 bootprog; |
86 | u8 reserved3[12]; | 92 | u8 reserved5[12]; |
87 | u64 br_lba; | 93 | u64 br_lba; |
88 | u32 scp_data_len; | 94 | u32 scp_data_len; |
89 | u8 reserved4[260]; | 95 | u8 reserved6[260]; |
90 | u8 scp_data[]; | 96 | u8 scp_data[]; |
91 | } __attribute__((packed)); | 97 | } __attribute__((packed)); |
92 | 98 | ||
99 | struct ipl_block_ccw { | ||
100 | u8 load_param[8]; | ||
101 | u8 reserved1[84]; | ||
102 | u8 reserved2[2]; | ||
103 | u16 devno; | ||
104 | u8 vm_flags; | ||
105 | u8 reserved3[3]; | ||
106 | u32 vm_parm_len; | ||
107 | } __attribute__((packed)); | ||
108 | |||
93 | struct ipl_parameter_block { | 109 | struct ipl_parameter_block { |
110 | struct ipl_list_hdr hdr; | ||
94 | union { | 111 | union { |
95 | u32 length; | 112 | struct ipl_block_fcp fcp; |
96 | struct ipl_list_header header; | 113 | struct ipl_block_ccw ccw; |
97 | } hdr; | 114 | } ipl_info; |
98 | struct ipl_block_fcp fcp; | ||
99 | } __attribute__((packed)); | 115 | } __attribute__((packed)); |
100 | 116 | ||
101 | #define IPL_MAX_SUPPORTED_VERSION (0) | 117 | #define IPL_PARM_BLK_FCP_LEN (sizeof(struct ipl_list_hdr) + \ |
118 | sizeof(struct ipl_block_fcp)) | ||
102 | 119 | ||
103 | #define IPL_TYPE_FCP (0) | 120 | #define IPL_PARM_BLK_CCW_LEN (sizeof(struct ipl_list_hdr) + \ |
121 | sizeof(struct ipl_block_ccw)) | ||
122 | |||
123 | #define IPL_MAX_SUPPORTED_VERSION (0) | ||
104 | 124 | ||
105 | /* | 125 | /* |
106 | * IPL validity flags and parameters as detected in head.S | 126 | * IPL validity flags and parameters as detected in head.S |
@@ -108,12 +128,14 @@ struct ipl_parameter_block { | |||
108 | extern u32 ipl_parameter_flags; | 128 | extern u32 ipl_parameter_flags; |
109 | extern u16 ipl_devno; | 129 | extern u16 ipl_devno; |
110 | 130 | ||
131 | void do_reipl(void); | ||
132 | |||
111 | #define IPL_DEVNO_VALID (ipl_parameter_flags & 1) | 133 | #define IPL_DEVNO_VALID (ipl_parameter_flags & 1) |
112 | #define IPL_PARMBLOCK_VALID (ipl_parameter_flags & 2) | 134 | #define IPL_PARMBLOCK_VALID (ipl_parameter_flags & 2) |
113 | 135 | ||
114 | #define IPL_PARMBLOCK_START ((struct ipl_parameter_block *) \ | 136 | #define IPL_PARMBLOCK_START ((struct ipl_parameter_block *) \ |
115 | IPL_PARMBLOCK_ORIGIN) | 137 | IPL_PARMBLOCK_ORIGIN) |
116 | #define IPL_PARMBLOCK_SIZE (IPL_PARMBLOCK_START->hdr.length) | 138 | #define IPL_PARMBLOCK_SIZE (IPL_PARMBLOCK_START->hdr.len) |
117 | 139 | ||
118 | #else /* __ASSEMBLY__ */ | 140 | #else /* __ASSEMBLY__ */ |
119 | 141 | ||