summaryrefslogtreecommitdiff
path: root/Documentation/netlink/specs/drm_ras.yaml
blob: 4c2ac9a1ba3f58bcffc45f11efa3e0ed7e097b01 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
---
name: drm-ras
protocol: genetlink
uapi-header: drm/drm_ras.h

doc: >-
  DRM RAS (Reliability, Availability, Serviceability) over Generic Netlink.
  Provides a standardized mechanism for DRM drivers to register "nodes"
  representing hardware/software components capable of reporting error counters.
  Userspace tools can query the list of nodes or individual error counters
  via the Generic Netlink interface.

definitions:
  -
    type: enum
    name: node-type
    value-start: 1
    entries: [error-counter]
    doc: >-
         Type of the node. Currently, only error-counter nodes are
         supported, which expose reliability counters for a hardware/software
         component.

attribute-sets:
  -
    name: node-attrs
    attributes:
      -
        name: node-id
        type: u32
        doc: >-
             Unique identifier for the node.
             Assigned dynamically by the DRM RAS core upon registration.
      -
        name: device-name
        type: string
        doc: >-
             Device name chosen by the driver at registration.
             Can be a PCI BDF, UUID, or module name if unique.
      -
        name: node-name
        type: string
        doc: >-
             Node name chosen by the driver at registration.
             Can be an IP block name, or any name that identifies the
             RAS node inside the device.
      -
        name: node-type
        type: u32
        doc: Type of this node, identifying its function.
        enum: node-type
  -
    name: error-counter-attrs
    attributes:
      -
        name: node-id
        type: u32
        doc: Node ID targeted by this error counter operation.
      -
        name: error-id
        type: u32
        doc: Unique identifier for a specific error counter within an node.
      -
        name: error-name
        type: string
        doc: Name of the error.
      -
        name: error-value
        type: u32
        doc: Current value of the requested error counter.
      -
        name: error-threshold
        type: u32
        doc: Error threshold of the counter.
  -
    name: error-event-attrs
    attributes:
      -
        name: device-name
        type: string
        doc: Device (PCI BDF, UUID) that reported the error.
      -
        name: node-id
        type: u32
        doc: ID of the node that reported the error.
      -
        name: node-name
        type: string
        doc: Name of the node that reported the error.
      -
        name: error-id
        type: u32
        doc: ID of the error counter.
      -
        name: error-name
        type: string
        doc: Name of the error.
      -
        name: error-value
        type: u32
        doc: Current value of the error counter.

operations:
  list:
    -
      name: list-nodes
      doc: >-
           Retrieve the full list of currently registered DRM RAS nodes.
           Each node includes its dynamically assigned ID, name, and type.
           **Important:** User space must call this operation first to obtain
           the node IDs. These IDs are required for all subsequent
           operations on nodes, such as querying error counters.
      attribute-set: node-attrs
      flags: [admin-perm]
      dump:
        reply:
          attributes:
            - node-id
            - device-name
            - node-name
            - node-type
    -
      name: get-error-counter
      doc: >-
           Retrieve error counter for a given node.
           The response includes the id, the name, and even the current
           value of each counter.
      attribute-set: error-counter-attrs
      flags: [admin-perm]
      do:
        request:
          attributes: &id-attrs
            - node-id
            - error-id
        reply:
          attributes: &errorinfo
            - error-id
            - error-name
            - error-value
      dump:
        request:
          attributes:
            - node-id
        reply:
          attributes: *errorinfo
    -
      name: clear-error-counter
      doc: >-
           Clear error counter for a given node.
           The request includes the error-id and node-id of the
           counter to be cleared.
      attribute-set: error-counter-attrs
      flags: [admin-perm]
      do:
        request:
          attributes: *id-attrs
    -
      name: error-event
      doc: >-
           Report an error event to userspace.
           The event includes the device, node and error information
           of the error that triggered the event.
      attribute-set: error-event-attrs
      mcgrp: error-report
      event:
        attributes:
          - device-name
          - node-id
          - node-name
          - error-id
          - error-name
          - error-value
    -
      name: get-error-threshold
      doc: >-
           Retrieve error threshold of a given counter.
           The response includes the id, the name, and current threshold
           of the counter.
      attribute-set: error-counter-attrs
      flags: [admin-perm]
      do:
        request:
          attributes: *id-attrs
        reply:
          attributes:
            - error-id
            - error-name
            - error-threshold
    -
      name: set-error-threshold
      doc: >-
           Set error threshold of a given counter.
      attribute-set: error-counter-attrs
      flags: [admin-perm]
      do:
        request:
          attributes:
            - node-id
            - error-id
            - error-threshold

mcast-groups:
  list:
    -
      name: error-report