2007-02-06 03:18:37 +07: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 21:01:31 +07:00
|
|
|
#include <asm/chpid.h>
|
2013-11-30 18:00:28 +07:00
|
|
|
#include <asm/cpu.h>
|
2007-02-06 03:18:37 +07:00
|
|
|
|
2007-04-27 21:01:31 +07:00
|
|
|
#define SCLP_CHP_INFO_MASK_SIZE 32
|
2015-06-18 19:23:00 +07:00
|
|
|
#define SCLP_MAX_CORES 256
|
2007-04-27 21:01:31 +07: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 16:24:09 +07:00
|
|
|
#define LOADPARM_LEN 8
|
|
|
|
|
|
|
|
struct sclp_ipl_info {
|
|
|
|
int is_valid;
|
|
|
|
int has_dump;
|
|
|
|
char loadparm[LOADPARM_LEN];
|
|
|
|
};
|
|
|
|
|
2015-06-18 19:23:00 +07:00
|
|
|
struct sclp_core_entry {
|
2015-01-14 23:52:10 +07:00
|
|
|
u8 core_id;
|
2013-12-30 18:54:14 +07:00
|
|
|
u8 reserved0[2];
|
|
|
|
u8 : 3;
|
|
|
|
u8 siif : 1;
|
2014-10-14 17:11:02 +07:00
|
|
|
u8 sigpif : 1;
|
|
|
|
u8 : 3;
|
2013-12-30 18:54:14 +07:00
|
|
|
u8 reserved2[10];
|
2008-01-26 20:10:56 +07:00
|
|
|
u8 type;
|
|
|
|
u8 reserved1;
|
|
|
|
} __attribute__((packed));
|
|
|
|
|
2015-06-18 19:23:00 +07:00
|
|
|
struct sclp_core_info {
|
2008-01-26 20:10:56 +07:00
|
|
|
unsigned int configured;
|
|
|
|
unsigned int standby;
|
|
|
|
unsigned int combined;
|
2015-06-18 19:23:00 +07:00
|
|
|
struct sclp_core_entry core[SCLP_MAX_CORES];
|
2008-01-26 20:10:56 +07:00
|
|
|
};
|
|
|
|
|
2015-05-06 18:18:59 +07: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 19:23:00 +07:00
|
|
|
unsigned char has_core_type : 1;
|
2015-05-06 18:18:59 +07:00
|
|
|
unsigned char has_sprp : 1;
|
|
|
|
unsigned int ibc;
|
|
|
|
unsigned int mtid;
|
|
|
|
unsigned int mtid_cp;
|
|
|
|
unsigned int mtid_prev;
|
|
|
|
unsigned long long rzm;
|
|
|
|
unsigned long long rnmax;
|
|
|
|
unsigned long long hamax;
|
2015-06-18 19:23:00 +07:00
|
|
|
unsigned int max_cores;
|
2015-05-06 18:18:59 +07:00
|
|
|
unsigned long hsa_size;
|
2015-05-06 14:17:51 +07:00
|
|
|
unsigned long long facilities;
|
2015-05-06 18:18:59 +07:00
|
|
|
};
|
|
|
|
extern struct sclp_info sclp;
|
|
|
|
|
2015-06-18 19:23:00 +07:00
|
|
|
int sclp_get_core_info(struct sclp_core_info *info);
|
|
|
|
int sclp_core_configure(u8 core);
|
|
|
|
int sclp_core_deconfigure(u8 core);
|
2007-07-10 16:24:09 +07: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 20:35:47 +07:00
|
|
|
int sclp_pci_configure(u32 fid);
|
|
|
|
int sclp_pci_deconfigure(u32 fid);
|
2013-09-12 04:24:54 +07:00
|
|
|
int memcpy_hsa(void *dest, unsigned long src, size_t count, int mode);
|
2013-11-13 16:38:27 +07:00
|
|
|
void sclp_early_detect(void);
|
2015-01-03 16:29:07 +07:00
|
|
|
long _sclp_print_early(const char *);
|
|
|
|
|
2007-02-06 03:18:37 +07:00
|
|
|
#endif /* _ASM_S390_SCLP_H */
|