setup.h 3.9 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/lowcore.h>
  13. #include <asm/types.h>
  14. #define PARMAREA 0x10400
  15. #define MEMORY_CHUNKS 256
  16. #ifndef __ASSEMBLY__
  17. #ifndef __s390x__
  18. #define IPL_DEVICE (*(unsigned long *) (0x10404))
  19. #define INITRD_START (*(unsigned long *) (0x1040C))
  20. #define INITRD_SIZE (*(unsigned long *) (0x10414))
  21. #else /* __s390x__ */
  22. #define IPL_DEVICE (*(unsigned long *) (0x10400))
  23. #define INITRD_START (*(unsigned long *) (0x10408))
  24. #define INITRD_SIZE (*(unsigned long *) (0x10410))
  25. #endif /* __s390x__ */
  26. #define COMMAND_LINE ((char *) (0x10480))
  27. #define CHUNK_READ_WRITE 0
  28. #define CHUNK_READ_ONLY 1
  29. struct mem_chunk {
  30. unsigned long addr;
  31. unsigned long size;
  32. int type;
  33. };
  34. extern struct mem_chunk memory_chunk[];
  35. extern unsigned long real_memory_size;
  36. extern int memory_end_set;
  37. extern unsigned long memory_end;
  38. void detect_memory_layout(struct mem_chunk chunk[]);
  39. #ifdef CONFIG_S390_SWITCH_AMODE
  40. extern unsigned int switch_amode;
  41. #else
  42. #define switch_amode (0)
  43. #endif
  44. #ifdef CONFIG_S390_EXEC_PROTECT
  45. extern unsigned int s390_noexec;
  46. #else
  47. #define s390_noexec (0)
  48. #endif
  49. /*
  50. * Machine features detected in head.S
  51. */
  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 (S390_lowcore.machine_flags & MACHINE_FLAG_VM)
  64. #define MACHINE_IS_KVM (S390_lowcore.machine_flags & MACHINE_FLAG_KVM)
  65. #define MACHINE_HAS_DIAG9C (S390_lowcore.machine_flags & MACHINE_FLAG_DIAG9C)
  66. #ifndef __s390x__
  67. #define MACHINE_HAS_IEEE (S390_lowcore.machine_flags & MACHINE_FLAG_IEEE)
  68. #define MACHINE_HAS_CSP (S390_lowcore.machine_flags & MACHINE_FLAG_CSP)
  69. #define MACHINE_HAS_IDTE (0)
  70. #define MACHINE_HAS_DIAG44 (1)
  71. #define MACHINE_HAS_MVPG (S390_lowcore.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 (S390_lowcore.machine_flags & MACHINE_FLAG_IDTE)
  79. #define MACHINE_HAS_DIAG44 (S390_lowcore.machine_flags & MACHINE_FLAG_DIAG44)
  80. #define MACHINE_HAS_MVPG (1)
  81. #define MACHINE_HAS_MVCOS (S390_lowcore.machine_flags & MACHINE_FLAG_MVCOS)
  82. #define MACHINE_HAS_HPAGE (S390_lowcore.machine_flags & MACHINE_FLAG_HPAGE)
  83. #define MACHINE_HAS_PFMF (S390_lowcore.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 */