1 /* 2 * This file and its contents are supplied under the terms of the 3 * Common Development and Distribution License ("CDDL"), version 1.0. 4 * You may only use this file in accordance with the terms of version 5 * 1.0 of the CDDL. 6 * 7 * A full copy of the text of the CDDL should have accompanied this 8 * source. A copy of the CDDL is also available via the Internet at 9 * http://www.illumos.org/license/CDDL. 10 */ 11 12 /* 13 * Copyright 2023 Oxide Computer Company 14 */ 15 16 #ifndef _TOPO_ZEN_H 17 #define _TOPO_ZEN_H 18 19 /* 20 * The ufm module provides the ability for callers to enumerate various portions 21 * of information related to the AMD Zen family of systems. The following node 22 * types are supported and require the following argument: 23 * 24 * CHIP - topo_zen_chip_t Enumerates a full CPU socket identified 25 * tzc_sockid. It assumes the caller has already 26 * created the corresponding node range. The 27 * various CCDs, I/O dies, and more will all be 28 * populated under this. 29 */ 30 31 #ifdef __cplusplus 32 extern "C" { 33 #endif 34 35 #define TOPO_MOD_ZEN "zen" 36 #define TOPO_MOD_ZEN_VERS 1 37 38 typedef struct { 39 uint32_t tzc_sockid; 40 } topo_zen_chip_t; 41 42 /* 43 * Property groups and their corresponding properties. The properties listed 44 * here are currently specific to nodes that exist in the AMD tree. 45 */ 46 #define TOPO_PGROUP_DF "data-fabric" 47 #define TOPO_PGROUP_DF_NODEID "node-id" 48 #define TOPO_PGROUP_DF_SOCKID "socket-id" 49 #define TOPO_PGROUP_DF_DIEID "die-id" 50 #define TOPO_PGROUP_DF_REV "revision" 51 #define TOPO_PGROUP_DF_INSTID "instance-id" 52 #define TOPO_PGROUP_DF_FABID "fabric-id" 53 #define TOPO_PGROUP_DF_TYPE "type-id" 54 #define TOPO_PGROUP_DF_SUBTYPE "subtype-id" 55 #define TOPO_PGROUP_DF_PEERS "peers" 56 57 #define TOPO_PGROUP_CCD "ccd-properties" 58 #define TOPO_PGROUP_CCD_LOGID "logical-ccd" 59 #define TOPO_PGROUP_CCD_PHYSID "physical-ccd" 60 61 #define TOPO_PGROUP_CCX "ccx-properties" 62 #define TOPO_PGROUP_CCX_LOGID "logical-ccx" 63 #define TOPO_PGROUP_CCX_PHYSID "physical-ccx" 64 65 #define TOPO_PGROUP_CORE "core-properties" 66 #define TOPO_PGROUP_CORE_LOGID "logical-core" 67 #define TOPO_PGROUP_CORE_PHYSID "physical-core" 68 69 /* 70 * The strand property group is also used by the i86pc chip module. We define a 71 * different property (so we can change this type to an unsigned value). As part 72 * of working through SERD cases we should unify these. 73 */ 74 #define TOPO_PGROUP_STRAND "strand-properties" 75 #define TOPO_PGROUP_STRAND_CPUID "cpu-id" 76 #define TOPO_PGROUP_STRAND_APICID "apic-id" 77 78 /* 79 * These chip properties are loosely shared with the i86pc chip module. They're 80 * not in <fm/topo_hc.h> as these are really x86-specific items and not generic. 81 */ 82 #define TOPO_PGROUP_CHIP "chip-properties" 83 #define TOPO_PGROUP_CHIP_BRAND "brand" 84 #define TOPO_PGROUP_CHIP_FAMILY "family" 85 #define TOPO_PGROUP_CHIP_MODEL "model" 86 #define TOPO_PGROUP_CHIP_STEPPING "stepping" 87 #define TOPO_PGROUP_CHIP_SOCKET "socket" 88 #define TOPO_PGROUP_CHIP_REVISION "revision" 89 90 #ifdef __cplusplus 91 } 92 #endif 93 94 #endif /* _TOPO_ZEN_H */ 95