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_DIMM_H
17 #define	_TOPO_DIMM_H
18 
19 /*
20  * This is an interface to the topo DIMM enumerator. The purpose of this module
21  * is to have a common interface to create DIMMs that potentially consumes both
22  * platform-specific information (e.g. zen_umc, imc, etc.) and general
23  * information (e.g. various SPD revisions, SMBIOS, etc).
24  *
25  * Currently, the primary supported enumeration entry point is the DIMM entry
26  * point. The parent should not create the range. That will be taken care of
27  * automatically.
28  */
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 #define	TOPO_MOD_DIMM	"dimm"
35 #define	TOPO_MOD_DIMM_VERS	1
36 
37 /*
38  * Information to enumerate a given DIMM. This will expand as we have more
39  * integration with other variants (and fold SMBIOS information, this'll expand.
40  * This structure should be consider private and not a stable interface.
41  */
42 typedef struct {
43 	uint32_t td_nspd;
44 	const uint8_t *td_spd;
45 } topo_dimm_t;
46 
47 #ifdef __cplusplus
48 }
49 #endif
50 
51 #endif /* _TOPO_DIMM_H */
52