setup.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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 1024
  10. #define ARCH_COMMAND_LINE_SIZE 896
  11. #ifdef __KERNEL__
  12. #include <asm/types.h>
  13. #define PARMAREA 0x10400
  14. #define MEMORY_CHUNKS 256
  15. #ifndef __ASSEMBLY__
  16. #ifndef __s390x__
  17. #define IPL_DEVICE (*(unsigned long *) (0x10404))
  18. #define INITRD_START (*(unsigned long *) (0x1040C))
  19. #define INITRD_SIZE (*(unsigned long *) (0x10414))
  20. #else /* __s390x__ */
  21. #define IPL_DEVICE (*(unsigned long *) (0x10400))
  22. #define INITRD_START (*(unsigned long *) (0x10408))
  23. #define INITRD_SIZE (*(unsigned long *) (0x10410))
  24. #endif /* __s390x__ */
  25. #define COMMAND_LINE ((char *) (0x10480))
  26. #define CHUNK_READ_WRITE 0
  27. #define CHUNK_READ_ONLY 1
  28. struct mem_chunk {
  29. unsigned long addr;
  30. unsigned long size;
  31. int type;
  32. };
  33. extern struct mem_chunk memory_chunk[];
  34. extern unsigned long real_memory_size;
  35. void detect_memory_layout(struct mem_chunk chunk[]);
  36. #ifdef CONFIG_S390_SWITCH_AMODE
  37. extern unsigned int switch_amode;
  38. #else
  39. #define switch_amode (0)
  40. #endif
  41. #ifdef CONFIG_S390_EXEC_PROTECT
  42. extern unsigned int s390_noexec;
  43. #else
  44. #define s390_noexec (0)
  45. #endif
  46. /*
  47. * Machine features detected in head.S
  48. */
  49. extern unsigned long machine_flags;
  50. #define MACHINE_FLAG_VM (1UL << 0)
  51. #define MACHINE_FLAG_IEEE (1UL << 1)
  52. #define MACHINE_FLAG_CSP (1UL << 3)
  53. #define MACHINE_FLAG_MVPG (1UL << 4)
  54. #define MACHINE_FLAG_DIAG44 (1UL << 5)
  55. #define MACHINE_FLAG_IDTE (1UL << 6)
  56. #define MACHINE_FLAG_DIAG9C (1UL << 7)
  57. #define MACHINE_FLAG_MVCOS (1UL << 8)
  58. #define MACHINE_FLAG_KVM (1UL << 9)
  59. #define MACHINE_FLAG_HPAGE (1UL << 10)
  60. #define MACHINE_FLAG_PFMF (1UL << 11)
  61. #define MACHINE_IS_VM (machine_flags & MACHINE_FLAG_VM)
  62. #define MACHINE_IS_KVM (machine_flags & MACHINE_FLAG_KVM)
  63. #define MACHINE_HAS_DIAG9C (machine_flags & MACHINE_FLAG_DIAG9C)
  64. #ifndef __s390x__
  65. #define MACHINE_HAS_IEEE (machine_flags & MACHINE_FLAG_IEEE)
  66. #define MACHINE_HAS_CSP (machine_flags & MACHINE_FLAG_CSP)
  67. #define MACHINE_HAS_IDTE (0)
  68. #define MACHINE_HAS_DIAG44 (1)
  69. #define MACHINE_HAS_MVPG (machine_flags & MACHINE_FLAG_MVPG)
  70. #define MACHINE_HAS_MVCOS (0)
  71. #define MACHINE_HAS_HPAGE (0)
  72. #define MACHINE_HAS_PFMF (0)
  73. #else /* __s390x__ */
  74. #define MACHINE_HAS_IEEE (1)
  75. #define MACHINE_HAS_CSP (1)
  76. #define MACHINE_HAS_IDTE (machine_flags & MACHINE_FLAG_IDTE)
  77. #define MACHINE_HAS_DIAG44 (machine_flags & MACHINE_FLAG_DIAG44)
  78. #define MACHINE_HAS_MVPG (1)
  79. #define MACHINE_HAS_MVCOS (machine_flags & MACHINE_FLAG_MVCOS)
  80. #define MACHINE_HAS_HPAGE (machine_flags & MACHINE_FLAG_HPAGE)
  81. #define MACHINE_HAS_PFMF (machine_flags & MACHINE_FLAG_PFMF)
  82. #endif /* __s390x__ */
  83. #define ZFCPDUMP_HSA_SIZE (32UL<<20)
  84. /*
  85. * Console mode. Override with conmode=
  86. */
  87. extern unsigned int console_mode;
  88. extern unsigned int console_devno;
  89. extern unsigned int console_irq;
  90. extern char vmhalt_cmd[];
  91. extern char vmpoff_cmd[];
  92. #define CONSOLE_IS_UNDEFINED (console_mode == 0)
  93. #define CONSOLE_IS_SCLP (console_mode == 1)
  94. #define CONSOLE_IS_3215 (console_mode == 2)
  95. #define CONSOLE_IS_3270 (console_mode == 3)
  96. #define SET_CONSOLE_SCLP do { console_mode = 1; } while (0)
  97. #define SET_CONSOLE_3215 do { console_mode = 2; } while (0)
  98. #define SET_CONSOLE_3270 do { console_mode = 3; } while (0)
  99. #define NSS_NAME_SIZE 8
  100. extern char kernel_nss_name[];
  101. #else /* __ASSEMBLY__ */
  102. #ifndef __s390x__
  103. #define IPL_DEVICE 0x10404
  104. #define INITRD_START 0x1040C
  105. #define INITRD_SIZE 0x10414
  106. #else /* __s390x__ */
  107. #define IPL_DEVICE 0x10400
  108. #define INITRD_START 0x10408
  109. #define INITRD_SIZE 0x10410
  110. #endif /* __s390x__ */
  111. #define COMMAND_LINE 0x10480
  112. #endif /* __ASSEMBLY__ */
  113. #endif /* __KERNEL__ */
  114. #endif /* _ASM_S390_SETUP_H */