blob: 1351984e767c8c69dda03cdd968f61c0d0452ff8 [file] [log] [blame]
Changbin Du05000042019-04-25 01:52:57 +08001.. SPDX-License-Identifier: GPL-2.0
2.. include:: <isonum.txt>
Sakari Ailusb10134a2018-07-17 17:19:13 +03003
Changbin Du05000042019-04-25 01:52:57 +08004===================================
Sakari Ailusb10134a2018-07-17 17:19:13 +03005Referencing hierarchical data nodes
Changbin Du05000042019-04-25 01:52:57 +08006===================================
7
8:Copyright: |copy| 2018 Intel Corporation
9:Author: Sakari Ailus <sakari.ailus@linux.intel.com>
Sakari Ailusb10134a2018-07-17 17:19:13 +030010
11ACPI in general allows referring to device objects in the tree only.
12Hierarchical data extension nodes may not be referred to directly, hence this
13document defines a scheme to implement such references.
14
15A reference consist of the device object name followed by one or more
16hierarchical data extension [1] keys. Specifically, the hierarchical data
17extension node which is referred to by the key shall lie directly under the
18parent object i.e. either the device object or another hierarchical data
19extension node.
20
Sakari Ailus2285e6d2018-07-17 17:19:17 +030021The keys in the hierarchical data nodes shall consist of the name of the node,
22"@" character and the number of the node in hexadecimal notation (without pre-
23or postfixes). The same ACPI object shall include the _DSD property extension
24with a property "reg" that shall have the same numerical value as the number of
25the node.
26
27In case a hierarchical data extensions node has no numerical value, then the
28"reg" property shall be omitted from the ACPI object's _DSD properties and the
29"@" character and the number shall be omitted from the hierarchical data
30extension key.
31
32
Sakari Ailusb10134a2018-07-17 17:19:13 +030033Example
Changbin Du05000042019-04-25 01:52:57 +080034=======
Sakari Ailusb10134a2018-07-17 17:19:13 +030035
Changbin Du05000042019-04-25 01:52:57 +080036In the ASL snippet below, the "reference" _DSD property [2] contains a
37device object reference to DEV0 and under that device object, a
38hierarchical data extension key "node@1" referring to the NOD1 object
39and lastly, a hierarchical data extension key "anothernode" referring to
40the ANOD object which is also the final target node of the reference.
41::
Sakari Ailusb10134a2018-07-17 17:19:13 +030042
43 Device (DEV0)
44 {
45 Name (_DSD, Package () {
46 ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
47 Package () {
Sakari Ailus2285e6d2018-07-17 17:19:17 +030048 Package () { "node@0", NOD0 },
49 Package () { "node@1", NOD1 },
Sakari Ailusb10134a2018-07-17 17:19:13 +030050 }
51 })
Sakari Ailus2285e6d2018-07-17 17:19:17 +030052 Name (NOD0, Package() {
53 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
54 Package () {
55 Package () { "random-property", 3 },
56 }
57 })
58 Name (NOD1, Package() {
Sakari Ailusb10134a2018-07-17 17:19:13 +030059 ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
60 Package () {
61 Package () { "anothernode", ANOD },
62 }
63 })
64 Name (ANOD, Package() {
65 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
66 Package () {
67 Package () { "random-property", 0 },
68 }
69 })
70 }
71
72 Device (DEV1)
73 {
74 Name (_DSD, Package () {
75 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
76 Package () {
Sakari Ailus2285e6d2018-07-17 17:19:17 +030077 Package () { "reference", ^DEV0, "node@1", "anothernode" },
Sakari Ailusb10134a2018-07-17 17:19:13 +030078 }
79 })
80 }
81
Changbin Du05000042019-04-25 01:52:57 +080082Please also see a graph example in :doc:`graph`.
Sakari Ailusb10134a2018-07-17 17:19:13 +030083
84References
Changbin Du05000042019-04-25 01:52:57 +080085==========
Sakari Ailusb10134a2018-07-17 17:19:13 +030086
87[1] Hierarchical Data Extension UUID For _DSD.
Changbin Du05000042019-04-25 01:52:57 +080088<http://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf>,
89referenced 2018-07-17.
Sakari Ailusb10134a2018-07-17 17:19:13 +030090
91[2] Device Properties UUID For _DSD.
Changbin Du05000042019-04-25 01:52:57 +080092<http://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf>,
93referenced 2016-10-04.