2 * include/asm-s390/setup.h
5 * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
8 #ifndef _ASM_S390_SETUP_H
9 #define _ASM_S390_SETUP_H
13 #include <asm/types.h>
15 #define PARMAREA 0x10400
16 #define COMMAND_LINE_SIZE 896
17 #define MEMORY_CHUNKS 16 /* max 0x7fff */
18 #define IPL_PARMBLOCK_ORIGIN 0x2000
23 #define IPL_DEVICE (*(unsigned long *) (0x10404))
24 #define INITRD_START (*(unsigned long *) (0x1040C))
25 #define INITRD_SIZE (*(unsigned long *) (0x10414))
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))
34 * Machine features detected in head.S
36 extern unsigned long machine_flags
;
38 #define MACHINE_IS_VM (machine_flags & 1)
39 #define MACHINE_IS_P390 (machine_flags & 4)
40 #define MACHINE_HAS_MVPG (machine_flags & 16)
41 #define MACHINE_HAS_IDTE (machine_flags & 128)
42 #define MACHINE_HAS_DIAG9C (machine_flags & 256)
45 #define MACHINE_HAS_IEEE (machine_flags & 2)
46 #define MACHINE_HAS_CSP (machine_flags & 8)
47 #define MACHINE_HAS_DIAG44 (1)
48 #define MACHINE_HAS_MVCOS (0)
50 #define MACHINE_HAS_IEEE (1)
51 #define MACHINE_HAS_CSP (1)
52 #define MACHINE_HAS_DIAG44 (machine_flags & 32)
53 #define MACHINE_HAS_MVCOS (machine_flags & 512)
54 #endif /* __s390x__ */
57 #define MACHINE_HAS_SCLP (!MACHINE_IS_P390)
60 * Console mode. Override with conmode=
62 extern unsigned int console_mode
;
63 extern unsigned int console_devno
;
64 extern unsigned int console_irq
;
66 #define CONSOLE_IS_UNDEFINED (console_mode == 0)
67 #define CONSOLE_IS_SCLP (console_mode == 1)
68 #define CONSOLE_IS_3215 (console_mode == 2)
69 #define CONSOLE_IS_3270 (console_mode == 3)
70 #define SET_CONSOLE_SCLP do { console_mode = 1; } while (0)
71 #define SET_CONSOLE_3215 do { console_mode = 2; } while (0)
72 #define SET_CONSOLE_3270 do { console_mode = 3; } while (0)
83 } __attribute__((packed
));
85 struct ipl_block_fcp
{
100 } __attribute__((packed
));
102 struct ipl_block_ccw
{
110 } __attribute__((packed
));
112 struct ipl_parameter_block
{
113 struct ipl_list_hdr hdr
;
115 struct ipl_block_fcp fcp
;
116 struct ipl_block_ccw ccw
;
118 } __attribute__((packed
));
120 #define IPL_PARM_BLK_FCP_LEN (sizeof(struct ipl_list_hdr) + \
121 sizeof(struct ipl_block_fcp))
123 #define IPL_PARM_BLK_CCW_LEN (sizeof(struct ipl_list_hdr) + \
124 sizeof(struct ipl_block_ccw))
126 #define IPL_MAX_SUPPORTED_VERSION (0)
129 * IPL validity flags and parameters as detected in head.S
131 extern u32 ipl_flags
;
132 extern u16 ipl_devno
;
138 IPL_PARMBLOCK_VALID
= 2,
141 #define IPL_PARMBLOCK_START ((struct ipl_parameter_block *) \
142 IPL_PARMBLOCK_ORIGIN)
143 #define IPL_PARMBLOCK_SIZE (IPL_PARMBLOCK_START->hdr.len)
145 #else /* __ASSEMBLY__ */
148 #define IPL_DEVICE 0x10404
149 #define INITRD_START 0x1040C
150 #define INITRD_SIZE 0x10414
151 #else /* __s390x__ */
152 #define IPL_DEVICE 0x10400
153 #define INITRD_START 0x10408
154 #define INITRD_SIZE 0x10410
155 #endif /* __s390x__ */
156 #define COMMAND_LINE 0x10480
158 #endif /* __ASSEMBLY__ */
159 #endif /* __KERNEL__ */
160 #endif /* _ASM_S390_SETUP_H */