setup.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /*
  2. * include/asm-s390/setup.h
  3. *
  4. * S390 version
  5. * Copyright IBM Corp. 1999,2006
  6. */
  7. #ifndef _ASM_S390_SETUP_H
  8. #define _ASM_S390_SETUP_H
  9. #define COMMAND_LINE_SIZE 896
  10. #ifdef __KERNEL__
  11. #include <asm/types.h>
  12. #define PARMAREA 0x10400
  13. #define MEMORY_CHUNKS 16 /* max 0x7fff */
  14. #ifndef __ASSEMBLY__
  15. #ifndef __s390x__
  16. #define IPL_DEVICE (*(unsigned long *) (0x10404))
  17. #define INITRD_START (*(unsigned long *) (0x1040C))
  18. #define INITRD_SIZE (*(unsigned long *) (0x10414))
  19. #else /* __s390x__ */
  20. #define IPL_DEVICE (*(unsigned long *) (0x10400))
  21. #define INITRD_START (*(unsigned long *) (0x10408))
  22. #define INITRD_SIZE (*(unsigned long *) (0x10410))
  23. #endif /* __s390x__ */
  24. #define COMMAND_LINE ((char *) (0x10480))
  25. #define CHUNK_READ_WRITE 0
  26. #define CHUNK_READ_ONLY 1
  27. struct mem_chunk {
  28. unsigned long addr;
  29. unsigned long size;
  30. unsigned long type;
  31. };
  32. extern struct mem_chunk memory_chunk[];
  33. extern unsigned long real_memory_size;
  34. #ifdef CONFIG_S390_SWITCH_AMODE
  35. extern unsigned int switch_amode;
  36. #else
  37. #define switch_amode (0)
  38. #endif
  39. #ifdef CONFIG_S390_EXEC_PROTECT
  40. extern unsigned int s390_noexec;
  41. #else
  42. #define s390_noexec (0)
  43. #endif
  44. /*
  45. * Machine features detected in head.S
  46. */
  47. extern unsigned long machine_flags;
  48. #define MACHINE_IS_VM (machine_flags & 1)
  49. #define MACHINE_IS_P390 (machine_flags & 4)
  50. #define MACHINE_HAS_MVPG (machine_flags & 16)
  51. #define MACHINE_HAS_IDTE (machine_flags & 128)
  52. #define MACHINE_HAS_DIAG9C (machine_flags & 256)
  53. #ifndef __s390x__
  54. #define MACHINE_HAS_IEEE (machine_flags & 2)
  55. #define MACHINE_HAS_CSP (machine_flags & 8)
  56. #define MACHINE_HAS_DIAG44 (1)
  57. #define MACHINE_HAS_MVCOS (0)
  58. #else /* __s390x__ */
  59. #define MACHINE_HAS_IEEE (1)
  60. #define MACHINE_HAS_CSP (1)
  61. #define MACHINE_HAS_DIAG44 (machine_flags & 32)
  62. #define MACHINE_HAS_MVCOS (machine_flags & 512)
  63. #endif /* __s390x__ */
  64. #define MACHINE_HAS_SCLP (!MACHINE_IS_P390)
  65. #define ZFCPDUMP_HSA_SIZE (32UL<<20)
  66. /*
  67. * Console mode. Override with conmode=
  68. */
  69. extern unsigned int console_mode;
  70. extern unsigned int console_devno;
  71. extern unsigned int console_irq;
  72. extern char vmhalt_cmd[];
  73. extern char vmpoff_cmd[];
  74. #define CONSOLE_IS_UNDEFINED (console_mode == 0)
  75. #define CONSOLE_IS_SCLP (console_mode == 1)
  76. #define CONSOLE_IS_3215 (console_mode == 2)
  77. #define CONSOLE_IS_3270 (console_mode == 3)
  78. #define SET_CONSOLE_SCLP do { console_mode = 1; } while (0)
  79. #define SET_CONSOLE_3215 do { console_mode = 2; } while (0)
  80. #define SET_CONSOLE_3270 do { console_mode = 3; } while (0)
  81. #define NSS_NAME_SIZE 8
  82. extern char kernel_nss_name[];
  83. #else /* __ASSEMBLY__ */
  84. #ifndef __s390x__
  85. #define IPL_DEVICE 0x10404
  86. #define INITRD_START 0x1040C
  87. #define INITRD_SIZE 0x10414
  88. #else /* __s390x__ */
  89. #define IPL_DEVICE 0x10400
  90. #define INITRD_START 0x10408
  91. #define INITRD_SIZE 0x10410
  92. #endif /* __s390x__ */
  93. #define COMMAND_LINE 0x10480
  94. #endif /* __ASSEMBLY__ */
  95. #endif /* __KERNEL__ */
  96. #endif /* _ASM_S390_SETUP_H */