sclp.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. #define SCLP_CHP_INFO_MASK_SIZE 32
  10. struct sclp_chp_info {
  11. u8 recognized[SCLP_CHP_INFO_MASK_SIZE];
  12. u8 standby[SCLP_CHP_INFO_MASK_SIZE];
  13. u8 configured[SCLP_CHP_INFO_MASK_SIZE];
  14. };
  15. #define LOADPARM_LEN 8
  16. struct sclp_ipl_info {
  17. int is_valid;
  18. int has_dump;
  19. char loadparm[LOADPARM_LEN];
  20. };
  21. struct sclp_cpu_entry {
  22. u8 address;
  23. u8 reserved0[13];
  24. u8 type;
  25. u8 reserved1;
  26. } __attribute__((packed));
  27. struct sclp_cpu_info {
  28. unsigned int configured;
  29. unsigned int standby;
  30. unsigned int combined;
  31. int has_cpu_type;
  32. struct sclp_cpu_entry cpu[255];
  33. };
  34. int sclp_get_cpu_info(struct sclp_cpu_info *info);
  35. int sclp_cpu_configure(u8 cpu);
  36. int sclp_cpu_deconfigure(u8 cpu);
  37. void sclp_facilities_detect(void);
  38. unsigned long long sclp_get_rnmax(void);
  39. unsigned long long sclp_get_rzm(void);
  40. u8 sclp_get_fac85(void);
  41. int sclp_sdias_blk_count(void);
  42. int sclp_sdias_copy(void *dest, int blk_num, int nr_blks);
  43. int sclp_chp_configure(struct chp_id chpid);
  44. int sclp_chp_deconfigure(struct chp_id chpid);
  45. int sclp_chp_read_info(struct sclp_chp_info *info);
  46. void sclp_get_ipl_info(struct sclp_ipl_info *info);
  47. bool sclp_has_linemode(void);
  48. bool sclp_has_vt220(void);
  49. #endif /* _ASM_S390_SCLP_H */