setup.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. * include/asm-s390/setup.h
  3. *
  4. * S390 version
  5. * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
  6. */
  7. #ifndef _ASM_S390_SETUP_H
  8. #define _ASM_S390_SETUP_H
  9. #define PARMAREA 0x10400
  10. #define COMMAND_LINE_SIZE 896
  11. #define RAMDISK_ORIGIN 0x800000
  12. #define RAMDISK_SIZE 0x800000
  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. /*
  26. * Machine features detected in head.S
  27. */
  28. extern unsigned long machine_flags;
  29. #define MACHINE_IS_VM (machine_flags & 1)
  30. #define MACHINE_IS_P390 (machine_flags & 4)
  31. #define MACHINE_HAS_MVPG (machine_flags & 16)
  32. #define MACHINE_HAS_DIAG44 (machine_flags & 32)
  33. #define MACHINE_HAS_IDTE (machine_flags & 128)
  34. #ifndef __s390x__
  35. #define MACHINE_HAS_IEEE (machine_flags & 2)
  36. #define MACHINE_HAS_CSP (machine_flags & 8)
  37. #else /* __s390x__ */
  38. #define MACHINE_HAS_IEEE (1)
  39. #define MACHINE_HAS_CSP (1)
  40. #endif /* __s390x__ */
  41. #define MACHINE_HAS_SCLP (!MACHINE_IS_P390)
  42. /*
  43. * Console mode. Override with conmode=
  44. */
  45. extern unsigned int console_mode;
  46. extern unsigned int console_devno;
  47. extern unsigned int console_irq;
  48. #define CONSOLE_IS_UNDEFINED (console_mode == 0)
  49. #define CONSOLE_IS_SCLP (console_mode == 1)
  50. #define CONSOLE_IS_3215 (console_mode == 2)
  51. #define CONSOLE_IS_3270 (console_mode == 3)
  52. #define SET_CONSOLE_SCLP do { console_mode = 1; } while (0)
  53. #define SET_CONSOLE_3215 do { console_mode = 2; } while (0)
  54. #define SET_CONSOLE_3270 do { console_mode = 3; } while (0)
  55. #else
  56. #ifndef __s390x__
  57. #define IPL_DEVICE 0x10404
  58. #define INITRD_START 0x1040C
  59. #define INITRD_SIZE 0x10414
  60. #else /* __s390x__ */
  61. #define IPL_DEVICE 0x10400
  62. #define INITRD_START 0x10408
  63. #define INITRD_SIZE 0x10410
  64. #endif /* __s390x__ */
  65. #define COMMAND_LINE 0x10480
  66. #endif
  67. #endif