[S390] hypfs compiler warnings.
[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
1e8e3383
HC
71struct ipl_list_header {
72 u32 length;
73 u8 reserved[3];
74 u8 version;
75} __attribute__((packed));
76
77struct ipl_block_fcp {
78 u32 length;
79 u8 pbt;
80 u8 reserved1[322-1];
81 u16 devno;
82 u8 reserved2[4];
83 u64 wwpn;
84 u64 lun;
85 u32 bootprog;
86 u8 reserved3[12];
87 u64 br_lba;
88 u32 scp_data_len;
89 u8 reserved4[260];
90 u8 scp_data[];
91} __attribute__((packed));
92
93struct ipl_parameter_block {
94 union {
95 u32 length;
96 struct ipl_list_header header;
97 } hdr;
98 struct ipl_block_fcp fcp;
99} __attribute__((packed));
100
101#define IPL_MAX_SUPPORTED_VERSION (0)
102
103#define IPL_TYPE_FCP (0)
104
105/*
106 * IPL validity flags and parameters as detected in head.S
107 */
108extern u32 ipl_parameter_flags;
109extern u16 ipl_devno;
110
111#define IPL_DEVNO_VALID (ipl_parameter_flags & 1)
112#define IPL_PARMBLOCK_VALID (ipl_parameter_flags & 2)
113
114#define IPL_PARMBLOCK_START ((struct ipl_parameter_block *) \
115 IPL_PARMBLOCK_ORIGIN)
116#define IPL_PARMBLOCK_SIZE (IPL_PARMBLOCK_START->hdr.length)
117
0defa3c1 118#else /* __ASSEMBLY__ */
1da177e4
LT
119
120#ifndef __s390x__
121#define IPL_DEVICE 0x10404
122#define INITRD_START 0x1040C
123#define INITRD_SIZE 0x10414
124#else /* __s390x__ */
125#define IPL_DEVICE 0x10400
126#define INITRD_START 0x10408
127#define INITRD_SIZE 0x10410
128#endif /* __s390x__ */
129#define COMMAND_LINE 0x10480
130
0defa3c1
HC
131#endif /* __ASSEMBLY__ */
132#endif /* __KERNEL__ */
133#endif /* _ASM_S390_SETUP_H */
This page took 0.193815 seconds and 5 git commands to generate.