data-node-references.rst 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. .. SPDX-License-Identifier: GPL-2.0
  2. .. include:: <isonum.txt>
  3. ===================================
  4. Referencing hierarchical data nodes
  5. ===================================
  6. :Copyright: |copy| 2018, 2021 Intel Corporation
  7. :Author: Sakari Ailus <[email protected]>
  8. ACPI in general allows referring to device objects in the tree only.
  9. Hierarchical data extension nodes may not be referred to directly, hence this
  10. document defines a scheme to implement such references.
  11. A reference consist of the device object name followed by one or more
  12. hierarchical data extension [dsd-guide] keys. Specifically, the hierarchical
  13. data extension node which is referred to by the key shall lie directly under
  14. the parent object i.e. either the device object or another hierarchical data
  15. extension node.
  16. The keys in the hierarchical data nodes shall consist of the name of the node,
  17. "@" character and the number of the node in hexadecimal notation (without pre-
  18. or postfixes). The same ACPI object shall include the _DSD property extension
  19. with a property "reg" that shall have the same numerical value as the number of
  20. the node.
  21. In case a hierarchical data extensions node has no numerical value, then the
  22. "reg" property shall be omitted from the ACPI object's _DSD properties and the
  23. "@" character and the number shall be omitted from the hierarchical data
  24. extension key.
  25. Example
  26. =======
  27. In the ASL snippet below, the "reference" _DSD property contains a
  28. device object reference to DEV0 and under that device object, a
  29. hierarchical data extension key "node@1" referring to the NOD1 object
  30. and lastly, a hierarchical data extension key "anothernode" referring to
  31. the ANOD object which is also the final target node of the reference.
  32. ::
  33. Device (DEV0)
  34. {
  35. Name (_DSD, Package () {
  36. ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
  37. Package () {
  38. Package () { "node@0", "NOD0" },
  39. Package () { "node@1", "NOD1" },
  40. }
  41. })
  42. Name (NOD0, Package() {
  43. ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
  44. Package () {
  45. Package () { "reg", 0 },
  46. Package () { "random-property", 3 },
  47. }
  48. })
  49. Name (NOD1, Package() {
  50. ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
  51. Package () {
  52. Package () { "reg", 1 },
  53. Package () { "anothernode", "ANOD" },
  54. }
  55. })
  56. Name (ANOD, Package() {
  57. ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
  58. Package () {
  59. Package () { "random-property", 0 },
  60. }
  61. })
  62. }
  63. Device (DEV1)
  64. {
  65. Name (_DSD, Package () {
  66. ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
  67. Package () {
  68. Package () {
  69. "reference", Package () {
  70. ^DEV0, "node@1", "anothernode"
  71. }
  72. },
  73. }
  74. })
  75. }
  76. Please also see a graph example in
  77. Documentation/firmware-guide/acpi/dsd/graph.rst.
  78. References
  79. ==========
  80. [dsd-guide] DSD Guide.
  81. https://github.com/UEFI/DSD-Guide/blob/main/dsd-guide.adoc, referenced
  82. 2021-11-30.