sclp.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /*
  2. * Copyright IBM Corp. 2007
  3. * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>
  4. */
  5. #ifndef _ASM_S390_SCLP_H
  6. #define _ASM_S390_SCLP_H
  7. #include <linux/types.h>
  8. #include <asm/chpid.h>
  9. #include <asm/cpu.h>
  10. #define SCLP_CHP_INFO_MASK_SIZE 32
  11. #define SCLP_MAX_CORES 256
  12. struct sclp_chp_info {
  13. u8 recognized[SCLP_CHP_INFO_MASK_SIZE];
  14. u8 standby[SCLP_CHP_INFO_MASK_SIZE];
  15. u8 configured[SCLP_CHP_INFO_MASK_SIZE];
  16. };
  17. #define LOADPARM_LEN 8
  18. struct sclp_ipl_info {
  19. int is_valid;
  20. int has_dump;
  21. char loadparm[LOADPARM_LEN];
  22. };
  23. struct sclp_core_entry {
  24. u8 core_id;
  25. u8 reserved0;
  26. u8 : 4;
  27. u8 sief2 : 1;
  28. u8 skey : 1;
  29. u8 : 2;
  30. u8 : 2;
  31. u8 gpere : 1;
  32. u8 siif : 1;
  33. u8 sigpif : 1;
  34. u8 : 3;
  35. u8 reserved2[3];
  36. u8 : 2;
  37. u8 ib : 1;
  38. u8 cei : 1;
  39. u8 : 4;
  40. u8 reserved3[6];
  41. u8 type;
  42. u8 reserved1;
  43. } __attribute__((packed));
  44. struct sclp_core_info {
  45. unsigned int configured;
  46. unsigned int standby;
  47. unsigned int combined;
  48. struct sclp_core_entry core[SCLP_MAX_CORES];
  49. };
  50. struct sclp_info {
  51. unsigned char has_linemode : 1;
  52. unsigned char has_vt220 : 1;
  53. unsigned char has_siif : 1;
  54. unsigned char has_sigpif : 1;
  55. unsigned char has_core_type : 1;
  56. unsigned char has_sprp : 1;
  57. unsigned char has_hvs : 1;
  58. unsigned char has_esca : 1;
  59. unsigned char has_sief2 : 1;
  60. unsigned char has_64bscao : 1;
  61. unsigned char has_gpere : 1;
  62. unsigned char has_cmma : 1;
  63. unsigned char has_gsls : 1;
  64. unsigned char has_ib : 1;
  65. unsigned char has_cei : 1;
  66. unsigned char has_pfmfi : 1;
  67. unsigned char has_ibs : 1;
  68. unsigned char has_skey : 1;
  69. unsigned int ibc;
  70. unsigned int mtid;
  71. unsigned int mtid_cp;
  72. unsigned int mtid_prev;
  73. unsigned long rzm;
  74. unsigned long rnmax;
  75. unsigned long hamax;
  76. unsigned int max_cores;
  77. unsigned long hsa_size;
  78. unsigned long facilities;
  79. unsigned int hmfai;
  80. };
  81. extern struct sclp_info sclp;
  82. struct zpci_report_error_header {
  83. u8 version; /* Interface version byte */
  84. u8 action; /* Action qualifier byte
  85. * 1: Deconfigure and repair action requested
  86. * (OpenCrypto Problem Call Home)
  87. * 2: Informational Report
  88. * (OpenCrypto Successful Diagnostics Execution)
  89. */
  90. u16 length; /* Length of Subsequent Data (up to 4K – SCLP header */
  91. u8 data[0]; /* Subsequent Data passed verbatim to SCLP ET 24 */
  92. } __packed;
  93. int sclp_get_core_info(struct sclp_core_info *info);
  94. int sclp_core_configure(u8 core);
  95. int sclp_core_deconfigure(u8 core);
  96. int sclp_sdias_blk_count(void);
  97. int sclp_sdias_copy(void *dest, int blk_num, int nr_blks);
  98. int sclp_chp_configure(struct chp_id chpid);
  99. int sclp_chp_deconfigure(struct chp_id chpid);
  100. int sclp_chp_read_info(struct sclp_chp_info *info);
  101. void sclp_get_ipl_info(struct sclp_ipl_info *info);
  102. int sclp_pci_configure(u32 fid);
  103. int sclp_pci_deconfigure(u32 fid);
  104. int sclp_pci_report(struct zpci_report_error_header *report, u32 fh, u32 fid);
  105. int memcpy_hsa_kernel(void *dest, unsigned long src, size_t count);
  106. int memcpy_hsa_user(void __user *dest, unsigned long src, size_t count);
  107. void sclp_early_detect(void);
  108. void _sclp_print_early(const char *);
  109. void sclp_ocf_cpc_name_copy(char *dst);
  110. #endif /* _ASM_S390_SCLP_H */