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 8a1117495SSakari Ailus:Copyright: |copy| 2018, 2021 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 16*59f3f982SSakari Ailushierarchical data extension [dsd-guide] keys. Specifically, the hierarchical 17*59f3f982SSakari Ailusdata extension node which is referred to by the key shall lie directly under 18*59f3f982SSakari Ailusthe parent 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 36*59f3f982SSakari AilusIn the ASL snippet below, the "reference" _DSD property 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 () { 48a423bd84SSakari Ailus Package () { "node@0", "NOD0" }, 49a423bd84SSakari 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 () { 55a1117495SSakari Ailus Package () { "reg", 0 }, 5605000042SChangbin Du Package () { "random-property", 3 }, 5705000042SChangbin Du } 5805000042SChangbin Du }) 5905000042SChangbin Du Name (NOD1, Package() { 6005000042SChangbin Du ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), 6105000042SChangbin Du Package () { 62a1117495SSakari Ailus Package () { "reg", 1 }, 63a423bd84SSakari Ailus Package () { "anothernode", "ANOD" }, 6405000042SChangbin Du } 6505000042SChangbin Du }) 6605000042SChangbin Du Name (ANOD, Package() { 6705000042SChangbin Du ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), 6805000042SChangbin Du Package () { 6905000042SChangbin Du Package () { "random-property", 0 }, 7005000042SChangbin Du } 7105000042SChangbin Du }) 7205000042SChangbin Du } 7305000042SChangbin Du 7405000042SChangbin Du Device (DEV1) 7505000042SChangbin Du { 7605000042SChangbin Du Name (_DSD, Package () { 7705000042SChangbin Du ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), 7805000042SChangbin Du Package () { 79a1117495SSakari Ailus Package () { 80a1117495SSakari Ailus "reference", Package () { 81a1117495SSakari Ailus ^DEV0, "node@1", "anothernode" 82a1117495SSakari Ailus } 83a1117495SSakari Ailus }, 8405000042SChangbin Du } 8505000042SChangbin Du }) 8605000042SChangbin Du } 8705000042SChangbin Du 884d361d6cSMauro Carvalho ChehabPlease also see a graph example in 894d361d6cSMauro Carvalho ChehabDocumentation/firmware-guide/acpi/dsd/graph.rst. 9005000042SChangbin Du 9105000042SChangbin DuReferences 9205000042SChangbin Du========== 9305000042SChangbin Du 94*59f3f982SSakari Ailus[dsd-guide] DSD Guide. 95*59f3f982SSakari Ailus https://github.com/UEFI/DSD-Guide/blob/main/dsd-guide.adoc, referenced 96*59f3f982SSakari Ailus 2021-11-30. 97