Debian Codegraph @

Documentation/firmware-guide/acpi/dsd/data-node-references.rst

raw
1 .. SPDX-License-Identifier: GPL-2.0
2 .. include:: <isonum.txt>
3
4 ===================================
5 Referencing hierarchical data nodes
6 ===================================
7
8 :Copyright: |copy| 2018, 2021 Intel Corporation
9 :Author: Sakari Ailus <[email protected]>
10
11 ACPI in general allows referring to device objects in the tree only.
12 Hierarchical data extension nodes may not be referred to directly, hence this
13 document defines a scheme to implement such references.
14
15 A reference to a _DSD hierarchical data node is a string consisting of a
16 device object reference followed by a dot (".") and a relative path to a data
17 node object. Do not use non-string references as this will produce a copy of
18 the hierarchical data node, not a reference!
19
20 The hierarchical data extension node which is referred to shall be located
21 directly under its parent object i.e. either the device object or another
22 hierarchical data extension node [dsd-guide].
23
24 The keys in the hierarchical data nodes shall consist of the name of the node,
25 "@" character and the number of the node in hexadecimal notation (without pre-
26 or postfixes). The same ACPI object shall include the _DSD property extension
27 with a property "reg" that shall have the same numerical value as the number of
28 the node.
29
30 In case a hierarchical data extensions node has no numerical value, then the
31 "reg" property shall be omitted from the ACPI object's _DSD properties and the
32 "@" character and the number shall be omitted from the hierarchical data
33 extension key.
34
35
36 Example
37 =======
38
39 In the ASL snippet below, the "reference" _DSD property contains a string
40 reference to a hierarchical data extension node ANOD under DEV0 under the parent
41 of DEV1. ANOD is also the final target node of the reference.
42 ::
43
44 Device (DEV0)
45 {
46 Name (_DSD, Package () {
47 ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
48 Package () {
49 Package () { "node@0", "NOD0" },
50 Package () { "node@1", "NOD1" },
51 }
52 })
53 Name (NOD0, Package() {
54 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
55 Package () {
56 Package () { "reg", 0 },
57 Package () { "random-property", 3 },
58 }
59 })
60 Name (NOD1, Package() {
61 ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
62 Package () {
63 Package () { "reg", 1 },
64 Package () { "anothernode", "ANOD" },
65 }
66 })
67 Name (ANOD, Package() {
68 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
69 Package () {
70 Package () { "random-property", 0 },
71 }
72 })
73 }
74
75 Device (DEV1)
76 {
77 Name (_DSD, Package () {
78 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
79 Package () {
80 Package () { "reference", "^DEV0.ANOD" }
81 },
82 }
83 })
84 }
85
86 Please also see a graph example in
87 Documentation/firmware-guide/acpi/dsd/graph.rst.
88
89 References
90 ==========
91
92 [dsd-guide] DSD Guide.
93 https://github.com/UEFI/DSD-Guide/blob/main/dsd-guide.adoc, referenced
94 2021-11-30.