^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) .. SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) .. include:: <isonum.txt>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) ===================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) Referencing hierarchical data nodes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) ===================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) :Copyright: |copy| 2018, 2021 Intel Corporation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) :Author: Sakari Ailus <sakari.ailus@linux.intel.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) ACPI in general allows referring to device objects in the tree only.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) Hierarchical data extension nodes may not be referred to directly, hence this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) document defines a scheme to implement such references.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) A reference consist of the device object name followed by one or more
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) hierarchical data extension [1] keys. Specifically, the hierarchical data
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) extension node which is referred to by the key shall lie directly under the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) parent object i.e. either the device object or another hierarchical data
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) extension node.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) The keys in the hierarchical data nodes shall consist of the name of the node,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) "@" character and the number of the node in hexadecimal notation (without pre-
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) or postfixes). The same ACPI object shall include the _DSD property extension
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) with a property "reg" that shall have the same numerical value as the number of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) the node.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) In case a hierarchical data extensions node has no numerical value, then the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) "reg" property shall be omitted from the ACPI object's _DSD properties and the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) "@" character and the number shall be omitted from the hierarchical data
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) extension key.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) Example
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) =======
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) In the ASL snippet below, the "reference" _DSD property [2] contains a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) device object reference to DEV0 and under that device object, a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) hierarchical data extension key "node@1" referring to the NOD1 object
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) and lastly, a hierarchical data extension key "anothernode" referring to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) the ANOD object which is also the final target node of the reference.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) Device (DEV0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) Name (_DSD, Package () {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) Package () {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) Package () { "node@0", "NOD0" },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) Package () { "node@1", "NOD1" },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) })
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) Name (NOD0, Package() {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) Package () {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) Package () { "reg", 0 },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) Package () { "random-property", 3 },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) })
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) Name (NOD1, Package() {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) Package () {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) Package () { "reg", 1 },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) Package () { "anothernode", "ANOD" },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) })
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) Name (ANOD, Package() {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) Package () {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) Package () { "random-property", 0 },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) })
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) Device (DEV1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) Name (_DSD, Package () {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) Package () {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) Package () {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) "reference", Package () {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) ^DEV0, "node@1", "anothernode"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) })
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) Please also see a graph example in :doc:`graph`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) References
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) ==========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) [1] Hierarchical Data Extension UUID For _DSD.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) <https://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) referenced 2018-07-17.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) [2] Device Properties UUID For _DSD.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) <https://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) referenced 2016-10-04.