1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * Structures used to Store System Information 4 * 5 * Copyright IBM Corp. 2022 6 */ 7 8 #ifndef _S390X_STSI_H_ 9 #define _S390X_STSI_H_ 10 11 struct sysinfo_3_2_2 { 12 uint8_t reserved[31]; 13 uint8_t count; 14 struct { 15 uint8_t reserved2[4]; 16 uint16_t total_cpus; 17 uint16_t conf_cpus; 18 uint16_t standby_cpus; 19 uint16_t reserved_cpus; 20 uint8_t name[8]; 21 uint32_t caf; 22 uint8_t cpi[16]; 23 uint8_t reserved5[3]; 24 uint8_t ext_name_encoding; 25 uint32_t reserved3; 26 uint8_t uuid[16]; 27 } vm[8]; 28 uint8_t reserved4[1504]; 29 uint8_t ext_names[8][256]; 30 }; 31 32 #define CPUS_TLE_RES_BITS 0x00fffffff8000000UL 33 struct topology_core { 34 uint8_t nl; 35 uint8_t reserved1[3]; 36 uint8_t reserved4:5; 37 uint8_t d:1; 38 uint8_t pp:2; 39 uint8_t type; 40 uint16_t origin; 41 uint64_t mask; 42 }; 43 44 #define CONTAINER_TLE_RES_BITS 0x00ffffffffffff00UL 45 struct topology_container { 46 uint8_t nl; 47 uint8_t reserved[6]; 48 uint8_t id; 49 }; 50 51 union topology_entry { 52 uint8_t nl; 53 struct topology_core cpu; 54 struct topology_container container; 55 }; 56 57 #define CPU_TOPOLOGY_MAX_LEVEL 6 58 struct sysinfo_15_1_x { 59 uint8_t reserved0[2]; 60 uint16_t length; 61 uint8_t mag[CPU_TOPOLOGY_MAX_LEVEL]; 62 uint8_t reserved0a; 63 uint8_t mnest; 64 uint8_t reserved0c[4]; 65 union topology_entry tle[]; 66 }; 67 68 #endif /* _S390X_STSI_H_ */ 69