setup.h 3.8 KB

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