at v2.6.17 3.4 kB view raw
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 11#ifdef __KERNEL__ 12 13#include <asm/types.h> 14 15#define PARMAREA 0x10400 16#define COMMAND_LINE_SIZE 896 17#define RAMDISK_ORIGIN 0x800000 18#define RAMDISK_SIZE 0x800000 19#define MEMORY_CHUNKS 16 /* max 0x7fff */ 20#define IPL_PARMBLOCK_ORIGIN 0x2000 21 22#ifndef __ASSEMBLY__ 23 24#ifndef __s390x__ 25#define IPL_DEVICE (*(unsigned long *) (0x10404)) 26#define INITRD_START (*(unsigned long *) (0x1040C)) 27#define INITRD_SIZE (*(unsigned long *) (0x10414)) 28#else /* __s390x__ */ 29#define IPL_DEVICE (*(unsigned long *) (0x10400)) 30#define INITRD_START (*(unsigned long *) (0x10408)) 31#define INITRD_SIZE (*(unsigned long *) (0x10410)) 32#endif /* __s390x__ */ 33#define COMMAND_LINE ((char *) (0x10480)) 34 35/* 36 * Machine features detected in head.S 37 */ 38extern unsigned long machine_flags; 39 40#define MACHINE_IS_VM (machine_flags & 1) 41#define MACHINE_IS_P390 (machine_flags & 4) 42#define MACHINE_HAS_MVPG (machine_flags & 16) 43#define MACHINE_HAS_DIAG44 (machine_flags & 32) 44#define MACHINE_HAS_IDTE (machine_flags & 128) 45 46#ifndef __s390x__ 47#define MACHINE_HAS_IEEE (machine_flags & 2) 48#define MACHINE_HAS_CSP (machine_flags & 8) 49#else /* __s390x__ */ 50#define MACHINE_HAS_IEEE (1) 51#define MACHINE_HAS_CSP (1) 52#endif /* __s390x__ */ 53 54 55#define MACHINE_HAS_SCLP (!MACHINE_IS_P390) 56 57/* 58 * Console mode. Override with conmode= 59 */ 60extern unsigned int console_mode; 61extern unsigned int console_devno; 62extern unsigned int console_irq; 63 64#define CONSOLE_IS_UNDEFINED (console_mode == 0) 65#define CONSOLE_IS_SCLP (console_mode == 1) 66#define CONSOLE_IS_3215 (console_mode == 2) 67#define CONSOLE_IS_3270 (console_mode == 3) 68#define SET_CONSOLE_SCLP do { console_mode = 1; } while (0) 69#define SET_CONSOLE_3215 do { console_mode = 2; } while (0) 70#define SET_CONSOLE_3270 do { console_mode = 3; } while (0) 71 72struct ipl_list_header { 73 u32 length; 74 u8 reserved[3]; 75 u8 version; 76} __attribute__((packed)); 77 78struct ipl_block_fcp { 79 u32 length; 80 u8 pbt; 81 u8 reserved1[322-1]; 82 u16 devno; 83 u8 reserved2[4]; 84 u64 wwpn; 85 u64 lun; 86 u32 bootprog; 87 u8 reserved3[12]; 88 u64 br_lba; 89 u32 scp_data_len; 90 u8 reserved4[260]; 91 u8 scp_data[]; 92} __attribute__((packed)); 93 94struct ipl_parameter_block { 95 union { 96 u32 length; 97 struct ipl_list_header header; 98 } hdr; 99 struct ipl_block_fcp fcp; 100} __attribute__((packed)); 101 102#define IPL_MAX_SUPPORTED_VERSION (0) 103 104#define IPL_TYPE_FCP (0) 105 106/* 107 * IPL validity flags and parameters as detected in head.S 108 */ 109extern u32 ipl_parameter_flags; 110extern u16 ipl_devno; 111 112#define IPL_DEVNO_VALID (ipl_parameter_flags & 1) 113#define IPL_PARMBLOCK_VALID (ipl_parameter_flags & 2) 114 115#define IPL_PARMBLOCK_START ((struct ipl_parameter_block *) \ 116 IPL_PARMBLOCK_ORIGIN) 117#define IPL_PARMBLOCK_SIZE (IPL_PARMBLOCK_START->hdr.length) 118 119#else /* __ASSEMBLY__ */ 120 121#ifndef __s390x__ 122#define IPL_DEVICE 0x10404 123#define INITRD_START 0x1040C 124#define INITRD_SIZE 0x10414 125#else /* __s390x__ */ 126#define IPL_DEVICE 0x10400 127#define INITRD_START 0x10408 128#define INITRD_SIZE 0x10410 129#endif /* __s390x__ */ 130#define COMMAND_LINE 0x10480 131 132#endif /* __ASSEMBLY__ */ 133#endif /* __KERNEL__ */ 134#endif /* _ASM_S390_SETUP_H */