sclp.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * include/asm-s390/sclp.h
  3. *
  4. * Copyright IBM Corp. 2007
  5. * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>
  6. */
  7. #ifndef _ASM_S390_SCLP_H
  8. #define _ASM_S390_SCLP_H
  9. #include <linux/types.h>
  10. #include <asm/chpid.h>
  11. struct sccb_header {
  12. u16 length;
  13. u8 function_code;
  14. u8 control_mask[3];
  15. u16 response_code;
  16. } __attribute__((packed));
  17. #define LOADPARM_LEN 8
  18. struct sclp_readinfo_sccb {
  19. struct sccb_header header; /* 0-7 */
  20. u16 rnmax; /* 8-9 */
  21. u8 rnsize; /* 10 */
  22. u8 _reserved0[24 - 11]; /* 11-23 */
  23. u8 loadparm[LOADPARM_LEN]; /* 24-31 */
  24. u8 _reserved1[91 - 32]; /* 32-90 */
  25. u8 flags; /* 91 */
  26. u8 _reserved2[100 - 92]; /* 92-99 */
  27. u32 rnsize2; /* 100-103 */
  28. u64 rnmax2; /* 104-111 */
  29. u8 _reserved3[4096 - 112]; /* 112-4095 */
  30. } __attribute__((packed, aligned(4096)));
  31. #define SCLP_CHP_INFO_MASK_SIZE 32
  32. struct sclp_chp_info {
  33. u8 recognized[SCLP_CHP_INFO_MASK_SIZE];
  34. u8 standby[SCLP_CHP_INFO_MASK_SIZE];
  35. u8 configured[SCLP_CHP_INFO_MASK_SIZE];
  36. };
  37. extern struct sclp_readinfo_sccb s390_readinfo_sccb;
  38. extern void sclp_readinfo_early(void);
  39. extern int sclp_sdias_blk_count(void);
  40. extern int sclp_sdias_copy(void *dest, int blk_num, int nr_blks);
  41. extern int sclp_chp_configure(struct chp_id chpid);
  42. extern int sclp_chp_deconfigure(struct chp_id chpid);
  43. extern int sclp_chp_read_info(struct sclp_chp_info *info);
  44. #endif /* _ASM_S390_SCLP_H */