sclp.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. struct sclp_chp_info {
  12. u8 recognized[SCLP_CHP_INFO_MASK_SIZE];
  13. u8 standby[SCLP_CHP_INFO_MASK_SIZE];
  14. u8 configured[SCLP_CHP_INFO_MASK_SIZE];
  15. };
  16. #define LOADPARM_LEN 8
  17. struct sclp_ipl_info {
  18. int is_valid;
  19. int has_dump;
  20. char loadparm[LOADPARM_LEN];
  21. };
  22. struct sclp_cpu_entry {
  23. u8 core_id;
  24. u8 reserved0[2];
  25. u8 : 3;
  26. u8 siif : 1;
  27. u8 sigpif : 1;
  28. u8 : 3;
  29. u8 reserved2[10];
  30. u8 type;
  31. u8 reserved1;
  32. } __attribute__((packed));
  33. struct sclp_cpu_info {
  34. unsigned int configured;
  35. unsigned int standby;
  36. unsigned int combined;
  37. int has_cpu_type;
  38. struct sclp_cpu_entry cpu[MAX_CPU_ADDRESS + 1];
  39. };
  40. int sclp_get_cpu_info(struct sclp_cpu_info *info);
  41. int sclp_cpu_configure(u8 cpu);
  42. int sclp_cpu_deconfigure(u8 cpu);
  43. unsigned long long sclp_get_rnmax(void);
  44. unsigned long long sclp_get_rzm(void);
  45. unsigned int sclp_get_max_cpu(void);
  46. unsigned int sclp_get_mtid(u8 cpu_type);
  47. unsigned int sclp_get_mtid_max(void);
  48. unsigned int sclp_get_mtid_prev(void);
  49. int sclp_sdias_blk_count(void);
  50. int sclp_sdias_copy(void *dest, int blk_num, int nr_blks);
  51. int sclp_chp_configure(struct chp_id chpid);
  52. int sclp_chp_deconfigure(struct chp_id chpid);
  53. int sclp_chp_read_info(struct sclp_chp_info *info);
  54. void sclp_get_ipl_info(struct sclp_ipl_info *info);
  55. bool __init sclp_has_linemode(void);
  56. bool __init sclp_has_vt220(void);
  57. bool sclp_has_sprp(void);
  58. int sclp_pci_configure(u32 fid);
  59. int sclp_pci_deconfigure(u32 fid);
  60. int memcpy_hsa(void *dest, unsigned long src, size_t count, int mode);
  61. unsigned long sclp_get_hsa_size(void);
  62. void sclp_early_detect(void);
  63. int sclp_has_siif(void);
  64. int sclp_has_sigpif(void);
  65. unsigned int sclp_get_ibc(void);
  66. long _sclp_print_early(const char *);
  67. #endif /* _ASM_S390_SCLP_H */