aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/s390/kernel/early.c1
-rw-r--r--arch/s390/kernel/ipl.c24
-rw-r--r--arch/s390/kernel/setup.c1
-rw-r--r--arch/s390/kernel/smp.c1
-rw-r--r--drivers/s390/cio/cio.c1
-rw-r--r--include/asm-s390/ipl.h113
-rw-r--r--include/asm-s390/setup.h74
7 files changed, 119 insertions, 96 deletions
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c
index 011e8c7acc7e..5d02e48c72e0 100644
--- a/arch/s390/kernel/early.c
+++ b/arch/s390/kernel/early.c
@@ -14,6 +14,7 @@
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/pfn.h> 15#include <linux/pfn.h>
16#include <linux/uaccess.h> 16#include <linux/uaccess.h>
17#include <asm/ipl.h>
17#include <asm/lowcore.h> 18#include <asm/lowcore.h>
18#include <asm/processor.h> 19#include <asm/processor.h>
19#include <asm/sections.h> 20#include <asm/sections.h>
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index 052259530651..a2410423c226 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -14,6 +14,7 @@
14#include <linux/delay.h> 14#include <linux/delay.h>
15#include <linux/reboot.h> 15#include <linux/reboot.h>
16#include <linux/ctype.h> 16#include <linux/ctype.h>
17#include <asm/ipl.h>
17#include <asm/smp.h> 18#include <asm/smp.h>
18#include <asm/setup.h> 19#include <asm/setup.h>
19#include <asm/cpcmd.h> 20#include <asm/cpcmd.h>
@@ -94,27 +95,6 @@ static char *shutdown_action_str(enum shutdown_action action)
94 } 95 }
95} 96}
96 97
97enum diag308_subcode {
98 DIAG308_IPL = 3,
99 DIAG308_DUMP = 4,
100 DIAG308_SET = 5,
101 DIAG308_STORE = 6,
102};
103
104enum diag308_ipl_type {
105 DIAG308_IPL_TYPE_FCP = 0,
106 DIAG308_IPL_TYPE_CCW = 2,
107};
108
109enum diag308_opt {
110 DIAG308_IPL_OPT_IPL = 0x10,
111 DIAG308_IPL_OPT_DUMP = 0x20,
112};
113
114enum diag308_rc {
115 DIAG308_RC_OK = 1,
116};
117
118static int diag308_set_works = 0; 98static int diag308_set_works = 0;
119 99
120static int reipl_capabilities = IPL_TYPE_UNKNOWN; 100static int reipl_capabilities = IPL_TYPE_UNKNOWN;
@@ -134,7 +114,7 @@ static struct ipl_parameter_block *dump_block_ccw;
134 114
135static enum shutdown_action on_panic_action = SHUTDOWN_STOP; 115static enum shutdown_action on_panic_action = SHUTDOWN_STOP;
136 116
137static int diag308(unsigned long subcode, void *addr) 117int diag308(unsigned long subcode, void *addr)
138{ 118{
139 register unsigned long _addr asm("0") = (unsigned long) addr; 119 register unsigned long _addr asm("0") = (unsigned long) addr;
140 register unsigned long _rc asm("1") = 0; 120 register unsigned long _rc asm("1") = 0;
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 49567d8cd9a1..fced022dc58d 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -41,6 +41,7 @@
41#include <linux/ctype.h> 41#include <linux/ctype.h>
42#include <linux/reboot.h> 42#include <linux/reboot.h>
43 43
44#include <asm/ipl.h>
44#include <asm/uaccess.h> 45#include <asm/uaccess.h>
45#include <asm/system.h> 46#include <asm/system.h>
46#include <asm/smp.h> 47#include <asm/smp.h>
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 432deb2d9795..ecaa432a99f8 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -31,6 +31,7 @@
31#include <linux/interrupt.h> 31#include <linux/interrupt.h>
32#include <linux/cpu.h> 32#include <linux/cpu.h>
33#include <linux/timex.h> 33#include <linux/timex.h>
34#include <asm/ipl.h>
34#include <asm/setup.h> 35#include <asm/setup.h>
35#include <asm/sigp.h> 36#include <asm/sigp.h>
36#include <asm/pgalloc.h> 37#include <asm/pgalloc.h>
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c
index b3a56dc5f68a..e4471e6ee5d9 100644
--- a/drivers/s390/cio/cio.c
+++ b/drivers/s390/cio/cio.c
@@ -21,6 +21,7 @@
21#include <asm/irq_regs.h> 21#include <asm/irq_regs.h>
22#include <asm/setup.h> 22#include <asm/setup.h>
23#include <asm/reset.h> 23#include <asm/reset.h>
24#include <asm/ipl.h>
24#include "airq.h" 25#include "airq.h"
25#include "cio.h" 26#include "cio.h"
26#include "css.h" 27#include "css.h"
diff --git a/include/asm-s390/ipl.h b/include/asm-s390/ipl.h
new file mode 100644
index 000000000000..5650d3d4ae46
--- /dev/null
+++ b/include/asm-s390/ipl.h
@@ -0,0 +1,113 @@
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
17#define IPL_PARM_BLK_CCW_LEN (sizeof(struct ipl_list_hdr) + \
18 sizeof(struct ipl_block_ccw))
19
20#define IPL_MAX_SUPPORTED_VERSION (0)
21
22#define IPL_PARMBLOCK_START ((struct ipl_parameter_block *) \
23 IPL_PARMBLOCK_ORIGIN)
24#define IPL_PARMBLOCK_SIZE (IPL_PARMBLOCK_START->hdr.len)
25
26struct ipl_list_hdr {
27 u32 len;
28 u8 reserved1[3];
29 u8 version;
30 u32 blk0_len;
31 u8 pbt;
32 u8 flags;
33 u16 reserved2;
34} __attribute__((packed));
35
36struct ipl_block_fcp {
37 u8 reserved1[313-1];
38 u8 opt;
39 u8 reserved2[3];
40 u16 reserved3;
41 u16 devno;
42 u8 reserved4[4];
43 u64 wwpn;
44 u64 lun;
45 u32 bootprog;
46 u8 reserved5[12];
47 u64 br_lba;
48 u32 scp_data_len;
49 u8 reserved6[260];
50 u8 scp_data[];
51} __attribute__((packed));
52
53struct ipl_block_ccw {
54 u8 load_param[8];
55 u8 reserved1[84];
56 u8 reserved2[2];
57 u16 devno;
58 u8 vm_flags;
59 u8 reserved3[3];
60 u32 vm_parm_len;
61} __attribute__((packed));
62
63struct ipl_parameter_block {
64 struct ipl_list_hdr hdr;
65 union {
66 struct ipl_block_fcp fcp;
67 struct ipl_block_ccw ccw;
68 } ipl_info;
69} __attribute__((packed));
70
71/*
72 * IPL validity flags and parameters as detected in head.S
73 */
74extern u32 ipl_flags;
75extern u16 ipl_devno;
76
77extern void do_reipl(void);
78extern void ipl_save_parameters(void);
79
80enum {
81 IPL_DEVNO_VALID = 1,
82 IPL_PARMBLOCK_VALID = 2,
83 IPL_NSS_VALID = 4,
84};
85
86/*
87 * DIAG 308 support
88 */
89enum diag308_subcode {
90 DIAG308_REL_HSA = 2,
91 DIAG308_IPL = 3,
92 DIAG308_DUMP = 4,
93 DIAG308_SET = 5,
94 DIAG308_STORE = 6,
95};
96
97enum diag308_ipl_type {
98 DIAG308_IPL_TYPE_FCP = 0,
99 DIAG308_IPL_TYPE_CCW = 2,
100};
101
102enum diag308_opt {
103 DIAG308_IPL_OPT_IPL = 0x10,
104 DIAG308_IPL_OPT_DUMP = 0x20,
105};
106
107enum diag308_rc {
108 DIAG308_RC_OK = 1,
109};
110
111extern int diag308(unsigned long subcode, void *addr);
112
113#endif /* _ASM_S390_IPL_H */
diff --git a/include/asm-s390/setup.h b/include/asm-s390/setup.h
index 3388bb52597c..44c7aee2bd34 100644
--- a/include/asm-s390/setup.h
+++ b/include/asm-s390/setup.h
@@ -16,7 +16,6 @@
16 16
17#define PARMAREA 0x10400 17#define PARMAREA 0x10400
18#define MEMORY_CHUNKS 16 /* max 0x7fff */ 18#define MEMORY_CHUNKS 16 /* max 0x7fff */
19#define IPL_PARMBLOCK_ORIGIN 0x2000
20 19
21#ifndef __ASSEMBLY__ 20#ifndef __ASSEMBLY__
22 21
@@ -97,82 +96,9 @@ extern char vmpoff_cmd[];
97#define SET_CONSOLE_3215 do { console_mode = 2; } while (0) 96#define SET_CONSOLE_3215 do { console_mode = 2; } while (0)
98#define SET_CONSOLE_3270 do { console_mode = 3; } while (0) 97#define SET_CONSOLE_3270 do { console_mode = 3; } while (0)
99 98
100struct ipl_list_hdr {
101 u32 len;
102 u8 reserved1[3];
103 u8 version;
104 u32 blk0_len;
105 u8 pbt;
106 u8 flags;
107 u16 reserved2;
108} __attribute__((packed));
109
110struct ipl_block_fcp {
111 u8 reserved1[313-1];
112 u8 opt;
113 u8 reserved2[3];
114 u16 reserved3;
115 u16 devno;
116 u8 reserved4[4];
117 u64 wwpn;
118 u64 lun;
119 u32 bootprog;
120 u8 reserved5[12];
121 u64 br_lba;
122 u32 scp_data_len;
123 u8 reserved6[260];
124 u8 scp_data[];
125} __attribute__((packed));
126
127struct ipl_block_ccw {
128 u8 load_param[8];
129 u8 reserved1[84];
130 u8 reserved2[2];
131 u16 devno;
132 u8 vm_flags;
133 u8 reserved3[3];
134 u32 vm_parm_len;
135} __attribute__((packed));
136
137struct ipl_parameter_block {
138 struct ipl_list_hdr hdr;
139 union {
140 struct ipl_block_fcp fcp;
141 struct ipl_block_ccw ccw;
142 } ipl_info;
143} __attribute__((packed));
144
145#define IPL_PARM_BLK_FCP_LEN (sizeof(struct ipl_list_hdr) + \
146 sizeof(struct ipl_block_fcp))
147
148#define IPL_PARM_BLK_CCW_LEN (sizeof(struct ipl_list_hdr) + \
149 sizeof(struct ipl_block_ccw))
150
151#define IPL_MAX_SUPPORTED_VERSION (0)
152
153/*
154 * IPL validity flags and parameters as detected in head.S
155 */
156extern u32 ipl_flags;
157extern u16 ipl_devno;
158
159extern void do_reipl(void);
160extern void ipl_save_parameters(void);
161
162enum {
163 IPL_DEVNO_VALID = 1,
164 IPL_PARMBLOCK_VALID = 2,
165 IPL_NSS_VALID = 4,
166};
167
168#define NSS_NAME_SIZE 8 99#define NSS_NAME_SIZE 8
169
170extern char kernel_nss_name[]; 100extern char kernel_nss_name[];
171 101
172#define IPL_PARMBLOCK_START ((struct ipl_parameter_block *) \
173 IPL_PARMBLOCK_ORIGIN)
174#define IPL_PARMBLOCK_SIZE (IPL_PARMBLOCK_START->hdr.len)
175
176#else /* __ASSEMBLY__ */ 102#else /* __ASSEMBLY__ */
177 103
178#ifndef __s390x__ 104#ifndef __s390x__