105000042SChangbin Du.. SPDX-License-Identifier: GPL-2.0 205000042SChangbin Du.. include:: <isonum.txt> 305000042SChangbin Du 405000042SChangbin Du=================================== 505000042SChangbin DuReferencing hierarchical data nodes 605000042SChangbin Du=================================== 705000042SChangbin Du 805000042SChangbin Du:Copyright: |copy| 2018 Intel Corporation 905000042SChangbin Du:Author: Sakari Ailus <sakari.ailus@linux.intel.com> 1005000042SChangbin Du 1105000042SChangbin DuACPI in general allows referring to device objects in the tree only. 1205000042SChangbin DuHierarchical data extension nodes may not be referred to directly, hence this 1305000042SChangbin Dudocument defines a scheme to implement such references. 1405000042SChangbin Du 1505000042SChangbin DuA reference consist of the device object name followed by one or more 1605000042SChangbin Duhierarchical data extension [1] keys. Specifically, the hierarchical data 1705000042SChangbin Duextension node which is referred to by the key shall lie directly under the 1805000042SChangbin Duparent object i.e. either the device object or another hierarchical data 1905000042SChangbin Duextension node. 2005000042SChangbin Du 2105000042SChangbin DuThe keys in the hierarchical data nodes shall consist of the name of the node, 2205000042SChangbin Du"@" character and the number of the node in hexadecimal notation (without pre- 2305000042SChangbin Duor postfixes). The same ACPI object shall include the _DSD property extension 2405000042SChangbin Duwith a property "reg" that shall have the same numerical value as the number of 2505000042SChangbin Duthe node. 2605000042SChangbin Du 2705000042SChangbin DuIn case a hierarchical data extensions node has no numerical value, then the 2805000042SChangbin Du"reg" property shall be omitted from the ACPI object's _DSD properties and the 2905000042SChangbin Du"@" character and the number shall be omitted from the hierarchical data 3005000042SChangbin Duextension key. 3105000042SChangbin Du 3205000042SChangbin Du 3305000042SChangbin DuExample 3405000042SChangbin Du======= 3505000042SChangbin Du 3605000042SChangbin DuIn the ASL snippet below, the "reference" _DSD property [2] contains a 3705000042SChangbin Dudevice object reference to DEV0 and under that device object, a 3805000042SChangbin Duhierarchical data extension key "node@1" referring to the NOD1 object 3905000042SChangbin Duand lastly, a hierarchical data extension key "anothernode" referring to 4005000042SChangbin Duthe ANOD object which is also the final target node of the reference. 4105000042SChangbin Du:: 4205000042SChangbin Du 4305000042SChangbin Du Device (DEV0) 4405000042SChangbin Du { 4505000042SChangbin Du Name (_DSD, Package () { 4605000042SChangbin Du ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), 4705000042SChangbin Du Package () { 48*a423bd84SSakari Ailus Package () { "node@0", "NOD0" }, 49*a423bd84SSakari Ailus Package () { "node@1", "NOD1" }, 5005000042SChangbin Du } 5105000042SChangbin Du }) 5205000042SChangbin Du Name (NOD0, Package() { 5305000042SChangbin Du ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), 5405000042SChangbin Du Package () { 5505000042SChangbin Du Package () { "random-property", 3 }, 5605000042SChangbin Du } 5705000042SChangbin Du }) 5805000042SChangbin Du Name (NOD1, Package() { 5905000042SChangbin Du ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), 6005000042SChangbin Du Package () { 61*a423bd84SSakari Ailus Package () { "anothernode", "ANOD" }, 6205000042SChangbin Du } 6305000042SChangbin Du }) 6405000042SChangbin Du Name (ANOD, Package() { 6505000042SChangbin Du ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), 6605000042SChangbin Du Package () { 6705000042SChangbin Du Package () { "random-property", 0 }, 6805000042SChangbin Du } 6905000042SChangbin Du }) 7005000042SChangbin Du } 7105000042SChangbin Du 7205000042SChangbin Du Device (DEV1) 7305000042SChangbin Du { 7405000042SChangbin Du Name (_DSD, Package () { 7505000042SChangbin Du ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), 7605000042SChangbin Du Package () { 7705000042SChangbin Du Package () { "reference", ^DEV0, "node@1", "anothernode" }, 7805000042SChangbin Du } 7905000042SChangbin Du }) 8005000042SChangbin Du } 8105000042SChangbin Du 8205000042SChangbin DuPlease also see a graph example in :doc:`graph`. 8305000042SChangbin Du 8405000042SChangbin DuReferences 8505000042SChangbin Du========== 8605000042SChangbin Du 8705000042SChangbin Du[1] Hierarchical Data Extension UUID For _DSD. 8805000042SChangbin Du<http://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf>, 8905000042SChangbin Dureferenced 2018-07-17. 9005000042SChangbin Du 9105000042SChangbin Du[2] Device Properties UUID For _DSD. 9205000042SChangbin Du<http://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf>, 9305000042SChangbin Dureferenced 2016-10-04. 94