2007-02-06 04:18:37 +08:00
|
|
|
|
/*
|
|
|
|
|
* Copyright IBM Corp. 2007
|
|
|
|
|
* Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef _ASM_S390_SCLP_H
|
|
|
|
|
#define _ASM_S390_SCLP_H
|
|
|
|
|
|
|
|
|
|
#include <linux/types.h>
|
2007-04-27 22:01:31 +08:00
|
|
|
|
#include <asm/chpid.h>
|
2013-11-30 19:00:28 +08:00
|
|
|
|
#include <asm/cpu.h>
|
2007-02-06 04:18:37 +08:00
|
|
|
|
|
2007-04-27 22:01:31 +08:00
|
|
|
|
#define SCLP_CHP_INFO_MASK_SIZE 32
|
2015-06-18 20:23:00 +08:00
|
|
|
|
#define SCLP_MAX_CORES 256
|
2007-04-27 22:01:31 +08:00
|
|
|
|
|
|
|
|
|
struct sclp_chp_info {
|
|
|
|
|
u8 recognized[SCLP_CHP_INFO_MASK_SIZE];
|
|
|
|
|
u8 standby[SCLP_CHP_INFO_MASK_SIZE];
|
|
|
|
|
u8 configured[SCLP_CHP_INFO_MASK_SIZE];
|
|
|
|
|
};
|
|
|
|
|
|
2007-07-10 17:24:09 +08:00
|
|
|
|
#define LOADPARM_LEN 8
|
|
|
|
|
|
|
|
|
|
struct sclp_ipl_info {
|
|
|
|
|
int is_valid;
|
|
|
|
|
int has_dump;
|
|
|
|
|
char loadparm[LOADPARM_LEN];
|
|
|
|
|
};
|
|
|
|
|
|
2015-06-18 20:23:00 +08:00
|
|
|
|
struct sclp_core_entry {
|
2015-01-15 00:52:10 +08:00
|
|
|
|
u8 core_id;
|
2015-02-24 22:51:55 +08:00
|
|
|
|
u8 reserved0;
|
|
|
|
|
u8 : 4;
|
|
|
|
|
u8 sief2 : 1;
|
2015-11-24 19:56:43 +08:00
|
|
|
|
u8 skey : 1;
|
|
|
|
|
u8 : 2;
|
2015-11-24 19:51:52 +08:00
|
|
|
|
u8 : 2;
|
|
|
|
|
u8 gpere : 1;
|
2013-12-30 19:54:14 +08:00
|
|
|
|
u8 siif : 1;
|
2014-10-14 18:11:02 +08:00
|
|
|
|
u8 sigpif : 1;
|
|
|
|
|
u8 : 3;
|
2015-11-24 19:59:03 +08:00
|
|
|
|
u8 reserved2[3];
|
|
|
|
|
u8 : 2;
|
|
|
|
|
u8 ib : 1;
|
2015-11-24 20:00:23 +08:00
|
|
|
|
u8 cei : 1;
|
|
|
|
|
u8 : 4;
|
2015-11-24 19:59:03 +08:00
|
|
|
|
u8 reserved3[6];
|
2008-01-26 21:10:56 +08:00
|
|
|
|
u8 type;
|
|
|
|
|
u8 reserved1;
|
|
|
|
|
} __attribute__((packed));
|
|
|
|
|
|
2015-06-18 20:23:00 +08:00
|
|
|
|
struct sclp_core_info {
|
2008-01-26 21:10:56 +08:00
|
|
|
|
unsigned int configured;
|
|
|
|
|
unsigned int standby;
|
|
|
|
|
unsigned int combined;
|
2015-06-18 20:23:00 +08:00
|
|
|
|
struct sclp_core_entry core[SCLP_MAX_CORES];
|
2008-01-26 21:10:56 +08:00
|
|
|
|
};
|
|
|
|
|
|
2015-05-06 19:18:59 +08:00
|
|
|
|
struct sclp_info {
|
|
|
|
|
unsigned char has_linemode : 1;
|
|
|
|
|
unsigned char has_vt220 : 1;
|
|
|
|
|
unsigned char has_siif : 1;
|
|
|
|
|
unsigned char has_sigpif : 1;
|
2015-06-18 20:23:00 +08:00
|
|
|
|
unsigned char has_core_type : 1;
|
2015-05-06 19:18:59 +08:00
|
|
|
|
unsigned char has_sprp : 1;
|
2014-10-09 22:04:48 +08:00
|
|
|
|
unsigned char has_hvs : 1;
|
|
|
|
|
unsigned char has_esca : 1;
|
2015-02-24 22:51:55 +08:00
|
|
|
|
unsigned char has_sief2 : 1;
|
2015-11-24 19:49:43 +08:00
|
|
|
|
unsigned char has_64bscao : 1;
|
2015-11-24 19:51:52 +08:00
|
|
|
|
unsigned char has_gpere : 1;
|
2015-11-24 19:55:35 +08:00
|
|
|
|
unsigned char has_cmma : 1;
|
2015-11-24 19:53:46 +08:00
|
|
|
|
unsigned char has_gsls : 1;
|
2015-11-24 19:59:03 +08:00
|
|
|
|
unsigned char has_ib : 1;
|
2015-11-24 20:00:23 +08:00
|
|
|
|
unsigned char has_cei : 1;
|
2015-11-24 20:02:25 +08:00
|
|
|
|
unsigned char has_pfmfi : 1;
|
2015-11-24 20:02:52 +08:00
|
|
|
|
unsigned char has_ibs : 1;
|
2015-11-24 19:56:43 +08:00
|
|
|
|
unsigned char has_skey : 1;
|
2015-05-06 19:18:59 +08:00
|
|
|
|
unsigned int ibc;
|
|
|
|
|
unsigned int mtid;
|
|
|
|
|
unsigned int mtid_cp;
|
|
|
|
|
unsigned int mtid_prev;
|
2015-12-31 17:07:21 +08:00
|
|
|
|
unsigned long rzm;
|
|
|
|
|
unsigned long rnmax;
|
|
|
|
|
unsigned long hamax;
|
2015-06-18 20:23:00 +08:00
|
|
|
|
unsigned int max_cores;
|
2015-05-06 19:18:59 +08:00
|
|
|
|
unsigned long hsa_size;
|
2015-12-31 17:07:21 +08:00
|
|
|
|
unsigned long facilities;
|
2016-04-01 20:36:51 +08:00
|
|
|
|
unsigned int hmfai;
|
2015-05-06 19:18:59 +08:00
|
|
|
|
};
|
|
|
|
|
extern struct sclp_info sclp;
|
|
|
|
|
|
2015-11-27 18:18:02 +08:00
|
|
|
|
struct zpci_report_error_header {
|
|
|
|
|
u8 version; /* Interface version byte */
|
|
|
|
|
u8 action; /* Action qualifier byte
|
|
|
|
|
* 1: Deconfigure and repair action requested
|
|
|
|
|
* (OpenCrypto Problem Call Home)
|
|
|
|
|
* 2: Informational Report
|
|
|
|
|
* (OpenCrypto Successful Diagnostics Execution)
|
|
|
|
|
*/
|
|
|
|
|
u16 length; /* Length of Subsequent Data (up to 4K – SCLP header */
|
|
|
|
|
u8 data[0]; /* Subsequent Data passed verbatim to SCLP ET 24 */
|
|
|
|
|
} __packed;
|
|
|
|
|
|
2016-12-03 16:48:01 +08:00
|
|
|
|
int _sclp_get_core_info_early(struct sclp_core_info *info);
|
|
|
|
|
int _sclp_get_core_info(struct sclp_core_info *info);
|
2015-06-18 20:23:00 +08:00
|
|
|
|
int sclp_core_configure(u8 core);
|
|
|
|
|
int sclp_core_deconfigure(u8 core);
|
2007-07-10 17:24:09 +08:00
|
|
|
|
int sclp_sdias_blk_count(void);
|
|
|
|
|
int sclp_sdias_copy(void *dest, int blk_num, int nr_blks);
|
|
|
|
|
int sclp_chp_configure(struct chp_id chpid);
|
|
|
|
|
int sclp_chp_deconfigure(struct chp_id chpid);
|
|
|
|
|
int sclp_chp_read_info(struct sclp_chp_info *info);
|
|
|
|
|
void sclp_get_ipl_info(struct sclp_ipl_info *info);
|
2012-11-29 21:35:47 +08:00
|
|
|
|
int sclp_pci_configure(u32 fid);
|
|
|
|
|
int sclp_pci_deconfigure(u32 fid);
|
2015-11-27 18:18:02 +08:00
|
|
|
|
int sclp_pci_report(struct zpci_report_error_header *report, u32 fh, u32 fid);
|
2015-10-12 16:43:37 +08:00
|
|
|
|
int memcpy_hsa_kernel(void *dest, unsigned long src, size_t count);
|
|
|
|
|
int memcpy_hsa_user(void __user *dest, unsigned long src, size_t count);
|
2013-11-13 17:38:27 +08:00
|
|
|
|
void sclp_early_detect(void);
|
2015-11-24 23:28:55 +08:00
|
|
|
|
void _sclp_print_early(const char *);
|
2017-01-11 16:14:52 +08:00
|
|
|
|
void __sclp_print_early(const char *s, unsigned int len);
|
2016-02-08 20:36:22 +08:00
|
|
|
|
void sclp_ocf_cpc_name_copy(char *dst);
|
2015-01-03 17:29:07 +08:00
|
|
|
|
|
2016-12-03 16:48:01 +08:00
|
|
|
|
static inline int sclp_get_core_info(struct sclp_core_info *info, int early)
|
|
|
|
|
{
|
|
|
|
|
if (early)
|
|
|
|
|
return _sclp_get_core_info_early(info);
|
|
|
|
|
return _sclp_get_core_info(info);
|
|
|
|
|
}
|
|
|
|
|
|
2007-02-06 04:18:37 +08:00
|
|
|
|
#endif /* _ASM_S390_SCLP_H */
|