xref: /illumos-gate/usr/src/uts/common/sys/sysevent/pcie.h (revision a61ed2ce7a86a4d6428f2a83eb4739fae945447e)
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 2019 Joyent, Inc.
14  */
15 
16 #ifndef _SYS_SYSEVENT_PCIE_H
17 #define	_SYS_SYSEVENT_PCIE_H
18 
19 /*
20  * PCIe System Event payloads
21  */
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 /*
28  * Event schema for ESC_PCIE_LINK_STATE
29  *
30  *	Event Class	- EC_PCIE
31  *	Event Sub-Class	- ESC_PCIE_LINK_STATE
32  *
33  *	Attribute Name	- PCIE_EV_DETECTOR_PATH
34  *	Attribute Type	- SE_DATA_TYPE_STRING
35  *	Attribute Value	- [devfs path of the node that detected the change]
36  *
37  *	Attribute Name	- PCIE_EV_CHILD_PATH
38  *	Attribute Type	- SE_DATA_TYPE_STRING
39  *	Attribute Value	- [devfs path of the updated child]
40  *
41  *	Attribute Name	- PCIE_EV_DETECTOR_FLAGS
42  *	Attribute Type	- SE_DATA_TYPE_UINT64
43  *	Attribute Value	- [PCIe flags that indicate the type of change]
44  */
45 
46 #define	PCIE_EV_DETECTOR_PATH	"detector_path"
47 #define	PCIE_EV_CHILD_PATH	"child_path"
48 #define	PCIE_EV_DETECTOR_FLAGS	"detector_flags"
49 
50 #define	PCIE_EV_DETECTOR_FLAGS_LBMS	0x01
51 #define	PCIE_EV_DETECTOR_FLAGS_LABS	0x02
52 
53 #ifdef __cplusplus
54 }
55 #endif
56 
57 #endif /* _SYS_SYSEVENT_PCIE_H */
58