1 /* 2 * S390 version 3 * Copyright IBM Corp. 1999, 2010 4 */ 5 #ifndef _ASM_S390_SETUP_H 6 #define _ASM_S390_SETUP_H 7 8 #include <uapi/asm/setup.h> 9 10 11 #define PARMAREA 0x10400 12 13 #ifndef __ASSEMBLY__ 14 15 #include <asm/lowcore.h> 16 #include <asm/types.h> 17 18 #ifndef CONFIG_64BIT 19 #define IPL_DEVICE (*(unsigned long *) (0x10404)) 20 #define INITRD_START (*(unsigned long *) (0x1040C)) 21 #define INITRD_SIZE (*(unsigned long *) (0x10414)) 22 #define OLDMEM_BASE (*(unsigned long *) (0x1041C)) 23 #define OLDMEM_SIZE (*(unsigned long *) (0x10424)) 24 #else /* CONFIG_64BIT */ 25 #define IPL_DEVICE (*(unsigned long *) (0x10400)) 26 #define INITRD_START (*(unsigned long *) (0x10408)) 27 #define INITRD_SIZE (*(unsigned long *) (0x10410)) 28 #define OLDMEM_BASE (*(unsigned long *) (0x10418)) 29 #define OLDMEM_SIZE (*(unsigned long *) (0x10420)) 30 #endif /* CONFIG_64BIT */ 31 #define COMMAND_LINE ((char *) (0x10480)) 32 33 extern int memory_end_set; 34 extern unsigned long memory_end; 35 extern unsigned long max_physmem_end; 36 37 extern void detect_memory_memblock(void); 38 39 /* 40 * Machine features detected in head.S 41 */ 42 43 #define MACHINE_FLAG_VM (1UL << 0) 44 #define MACHINE_FLAG_IEEE (1UL << 1) 45 #define MACHINE_FLAG_CSP (1UL << 2) 46 #define MACHINE_FLAG_MVPG (1UL << 3) 47 #define MACHINE_FLAG_DIAG44 (1UL << 4) 48 #define MACHINE_FLAG_IDTE (1UL << 5) 49 #define MACHINE_FLAG_DIAG9C (1UL << 6) 50 #define MACHINE_FLAG_KVM (1UL << 8) 51 #define MACHINE_FLAG_ESOP (1UL << 9) 52 #define MACHINE_FLAG_EDAT1 (1UL << 10) 53 #define MACHINE_FLAG_EDAT2 (1UL << 11) 54 #define MACHINE_FLAG_LPAR (1UL << 12) 55 #define MACHINE_FLAG_LPP (1UL << 13) 56 #define MACHINE_FLAG_TOPOLOGY (1UL << 14) 57 #define MACHINE_FLAG_TE (1UL << 15) 58 #define MACHINE_FLAG_TLB_LC (1UL << 17) 59 #define MACHINE_FLAG_VX (1UL << 18) 60 #define MACHINE_FLAG_CAD (1UL << 19) 61 62 #define MACHINE_IS_VM (S390_lowcore.machine_flags & MACHINE_FLAG_VM) 63 #define MACHINE_IS_KVM (S390_lowcore.machine_flags & MACHINE_FLAG_KVM) 64 #define MACHINE_IS_LPAR (S390_lowcore.machine_flags & MACHINE_FLAG_LPAR) 65 66 #define MACHINE_HAS_DIAG9C (S390_lowcore.machine_flags & MACHINE_FLAG_DIAG9C) 67 #define MACHINE_HAS_ESOP (S390_lowcore.machine_flags & MACHINE_FLAG_ESOP) 68 #define MACHINE_HAS_PFMF MACHINE_HAS_EDAT1 69 #define MACHINE_HAS_HPAGE MACHINE_HAS_EDAT1 70 71 #ifndef CONFIG_64BIT 72 #define MACHINE_HAS_IEEE (S390_lowcore.machine_flags & MACHINE_FLAG_IEEE) 73 #define MACHINE_HAS_CSP (S390_lowcore.machine_flags & MACHINE_FLAG_CSP) 74 #define MACHINE_HAS_IDTE (0) 75 #define MACHINE_HAS_DIAG44 (1) 76 #define MACHINE_HAS_MVPG (S390_lowcore.machine_flags & MACHINE_FLAG_MVPG) 77 #define MACHINE_HAS_EDAT1 (0) 78 #define MACHINE_HAS_EDAT2 (0) 79 #define MACHINE_HAS_LPP (0) 80 #define MACHINE_HAS_TOPOLOGY (0) 81 #define MACHINE_HAS_TE (0) 82 #define MACHINE_HAS_TLB_LC (0) 83 #define MACHINE_HAS_VX (0) 84 #define MACHINE_HAS_CAD (0) 85 #else /* CONFIG_64BIT */ 86 #define MACHINE_HAS_IEEE (1) 87 #define MACHINE_HAS_CSP (1) 88 #define MACHINE_HAS_IDTE (S390_lowcore.machine_flags & MACHINE_FLAG_IDTE) 89 #define MACHINE_HAS_DIAG44 (S390_lowcore.machine_flags & MACHINE_FLAG_DIAG44) 90 #define MACHINE_HAS_MVPG (1) 91 #define MACHINE_HAS_EDAT1 (S390_lowcore.machine_flags & MACHINE_FLAG_EDAT1) 92 #define MACHINE_HAS_EDAT2 (S390_lowcore.machine_flags & MACHINE_FLAG_EDAT2) 93 #define MACHINE_HAS_LPP (S390_lowcore.machine_flags & MACHINE_FLAG_LPP) 94 #define MACHINE_HAS_TOPOLOGY (S390_lowcore.machine_flags & MACHINE_FLAG_TOPOLOGY) 95 #define MACHINE_HAS_TE (S390_lowcore.machine_flags & MACHINE_FLAG_TE) 96 #define MACHINE_HAS_TLB_LC (S390_lowcore.machine_flags & MACHINE_FLAG_TLB_LC) 97 #define MACHINE_HAS_VX (S390_lowcore.machine_flags & MACHINE_FLAG_VX) 98 #define MACHINE_HAS_CAD (S390_lowcore.machine_flags & MACHINE_FLAG_CAD) 99 #endif /* CONFIG_64BIT */ 100 101 /* 102 * Console mode. Override with conmode= 103 */ 104 extern unsigned int console_mode; 105 extern unsigned int console_devno; 106 extern unsigned int console_irq; 107 108 extern char vmhalt_cmd[]; 109 extern char vmpoff_cmd[]; 110 111 #define CONSOLE_IS_UNDEFINED (console_mode == 0) 112 #define CONSOLE_IS_SCLP (console_mode == 1) 113 #define CONSOLE_IS_3215 (console_mode == 2) 114 #define CONSOLE_IS_3270 (console_mode == 3) 115 #define SET_CONSOLE_SCLP do { console_mode = 1; } while (0) 116 #define SET_CONSOLE_3215 do { console_mode = 2; } while (0) 117 #define SET_CONSOLE_3270 do { console_mode = 3; } while (0) 118 119 #define NSS_NAME_SIZE 8 120 extern char kernel_nss_name[]; 121 122 #ifdef CONFIG_PFAULT 123 extern int pfault_init(void); 124 extern void pfault_fini(void); 125 #else /* CONFIG_PFAULT */ 126 #define pfault_init() ({-1;}) 127 #define pfault_fini() do { } while (0) 128 #endif /* CONFIG_PFAULT */ 129 130 extern void cmma_init(void); 131 132 extern void (*_machine_restart)(char *command); 133 extern void (*_machine_halt)(void); 134 extern void (*_machine_power_off)(void); 135 136 #else /* __ASSEMBLY__ */ 137 138 #ifndef CONFIG_64BIT 139 #define IPL_DEVICE 0x10404 140 #define INITRD_START 0x1040C 141 #define INITRD_SIZE 0x10414 142 #define OLDMEM_BASE 0x1041C 143 #define OLDMEM_SIZE 0x10424 144 #else /* CONFIG_64BIT */ 145 #define IPL_DEVICE 0x10400 146 #define INITRD_START 0x10408 147 #define INITRD_SIZE 0x10410 148 #define OLDMEM_BASE 0x10418 149 #define OLDMEM_SIZE 0x10420 150 #endif /* CONFIG_64BIT */ 151 #define COMMAND_LINE 0x10480 152 153 #endif /* __ASSEMBLY__ */ 154 #endif /* _ASM_S390_SETUP_H */ 155