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