[S390] Make user-copy operations run-time configurable.
[deliverable/linux.git] / include / asm-s390 / setup.h
CommitLineData
1da177e4
LT
1/*
2 * include/asm-s390/setup.h
3 *
4 * S390 version
5 * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
6 */
7
8#ifndef _ASM_S390_SETUP_H
9#define _ASM_S390_SETUP_H
10
0defa3c1
HC
11#ifdef __KERNEL__
12
1e8e3383
HC
13#include <asm/types.h>
14
1da177e4
LT
15#define PARMAREA 0x10400
16#define COMMAND_LINE_SIZE 896
1da177e4 17#define MEMORY_CHUNKS 16 /* max 0x7fff */
1e8e3383 18#define IPL_PARMBLOCK_ORIGIN 0x2000
1da177e4
LT
19
20#ifndef __ASSEMBLY__
21
22#ifndef __s390x__
23#define IPL_DEVICE (*(unsigned long *) (0x10404))
24#define INITRD_START (*(unsigned long *) (0x1040C))
25#define INITRD_SIZE (*(unsigned long *) (0x10414))
26#else /* __s390x__ */
27#define IPL_DEVICE (*(unsigned long *) (0x10400))
28#define INITRD_START (*(unsigned long *) (0x10408))
29#define INITRD_SIZE (*(unsigned long *) (0x10410))
30#endif /* __s390x__ */
31#define COMMAND_LINE ((char *) (0x10480))
32
33/*
34 * Machine features detected in head.S
35 */
36extern unsigned long machine_flags;
37
38#define MACHINE_IS_VM (machine_flags & 1)
39#define MACHINE_IS_P390 (machine_flags & 4)
40#define MACHINE_HAS_MVPG (machine_flags & 16)
1da177e4
LT
41#define MACHINE_HAS_IDTE (machine_flags & 128)
42
43#ifndef __s390x__
44#define MACHINE_HAS_IEEE (machine_flags & 2)
45#define MACHINE_HAS_CSP (machine_flags & 8)
abdba61a 46#define MACHINE_HAS_DIAG44 (1)
1da177e4
LT
47#else /* __s390x__ */
48#define MACHINE_HAS_IEEE (1)
49#define MACHINE_HAS_CSP (1)
abdba61a 50#define MACHINE_HAS_DIAG44 (machine_flags & 32)
1da177e4
LT
51#endif /* __s390x__ */
52
53
54#define MACHINE_HAS_SCLP (!MACHINE_IS_P390)
55
56/*
57 * Console mode. Override with conmode=
58 */
59extern unsigned int console_mode;
60extern unsigned int console_devno;
61extern unsigned int console_irq;
62
63#define CONSOLE_IS_UNDEFINED (console_mode == 0)
64#define CONSOLE_IS_SCLP (console_mode == 1)
65#define CONSOLE_IS_3215 (console_mode == 2)
66#define CONSOLE_IS_3270 (console_mode == 3)
67#define SET_CONSOLE_SCLP do { console_mode = 1; } while (0)
68#define SET_CONSOLE_3215 do { console_mode = 2; } while (0)
69#define SET_CONSOLE_3270 do { console_mode = 3; } while (0)
70
ff6b8ea6
MH
71
72struct ipl_list_hdr {
73 u32 len;
74 u8 reserved1[3];
1e8e3383 75 u8 version;
ff6b8ea6
MH
76 u32 blk0_len;
77 u8 pbt;
78 u8 flags;
79 u16 reserved2;
1e8e3383
HC
80} __attribute__((packed));
81
82struct ipl_block_fcp {
ff6b8ea6
MH
83 u8 reserved1[313-1];
84 u8 opt;
85 u8 reserved2[3];
86 u16 reserved3;
1e8e3383 87 u16 devno;
ff6b8ea6 88 u8 reserved4[4];
1e8e3383
HC
89 u64 wwpn;
90 u64 lun;
91 u32 bootprog;
ff6b8ea6 92 u8 reserved5[12];
1e8e3383
HC
93 u64 br_lba;
94 u32 scp_data_len;
ff6b8ea6 95 u8 reserved6[260];
1e8e3383
HC
96 u8 scp_data[];
97} __attribute__((packed));
98
ff6b8ea6
MH
99struct 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
1e8e3383 109struct ipl_parameter_block {
ff6b8ea6 110 struct ipl_list_hdr hdr;
1e8e3383 111 union {
ff6b8ea6
MH
112 struct ipl_block_fcp fcp;
113 struct ipl_block_ccw ccw;
114 } ipl_info;
1e8e3383
HC
115} __attribute__((packed));
116
ff6b8ea6
MH
117#define IPL_PARM_BLK_FCP_LEN (sizeof(struct ipl_list_hdr) + \
118 sizeof(struct ipl_block_fcp))
1e8e3383 119
ff6b8ea6
MH
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)
1e8e3383
HC
124
125/*
126 * IPL validity flags and parameters as detected in head.S
127 */
e87bfe51 128extern u32 ipl_flags;
1e8e3383
HC
129extern u16 ipl_devno;
130
ff6b8ea6
MH
131void do_reipl(void);
132
e87bfe51
HC
133enum {
134 IPL_DEVNO_VALID = 1,
135 IPL_PARMBLOCK_VALID = 2,
136};
1e8e3383
HC
137
138#define IPL_PARMBLOCK_START ((struct ipl_parameter_block *) \
139 IPL_PARMBLOCK_ORIGIN)
ff6b8ea6 140#define IPL_PARMBLOCK_SIZE (IPL_PARMBLOCK_START->hdr.len)
1e8e3383 141
0defa3c1 142#else /* __ASSEMBLY__ */
1da177e4
LT
143
144#ifndef __s390x__
145#define IPL_DEVICE 0x10404
146#define INITRD_START 0x1040C
147#define INITRD_SIZE 0x10414
148#else /* __s390x__ */
149#define IPL_DEVICE 0x10400
150#define INITRD_START 0x10408
151#define INITRD_SIZE 0x10410
152#endif /* __s390x__ */
153#define COMMAND_LINE 0x10480
154
0defa3c1
HC
155#endif /* __ASSEMBLY__ */
156#endif /* __KERNEL__ */
157#endif /* _ASM_S390_SETUP_H */
This page took 0.149926 seconds and 5 git commands to generate.