DSD-properties-rules.txt 4.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. _DSD Device Properties Usage Rules
  2. ----------------------------------
  3. Properties, Property Sets and Property Subsets
  4. ----------------------------------------------
  5. The _DSD (Device Specific Data) configuration object, introduced in ACPI 5.1,
  6. allows any type of device configuration data to be provided via the ACPI
  7. namespace. In principle, the format of the data may be arbitrary, but it has to
  8. be identified by a UUID which must be recognized by the driver processing the
  9. _DSD output. However, there are generic UUIDs defined for _DSD recognized by
  10. the ACPI subsystem in the Linux kernel which automatically processes the data
  11. packages associated with them and makes those data available to device drivers
  12. as "device properties".
  13. A device property is a data item consisting of a string key and a value (of a
  14. specific type) associated with it.
  15. In the ACPI _DSD context it is an element of the sub-package following the
  16. generic Device Properties UUID in the _DSD return package as specified in the
  17. Device Properties UUID definition document [1].
  18. It also may be regarded as the definition of a key and the associated data type
  19. that can be returned by _DSD in the Device Properties UUID sub-package for a
  20. given device.
  21. A property set is a collection of properties applicable to a hardware entity
  22. like a device. In the ACPI _DSD context it is the set of all properties that
  23. can be returned in the Device Properties UUID sub-package for the device in
  24. question.
  25. Property subsets are nested collections of properties. Each of them is
  26. associated with an additional key (name) allowing the subset to be referred
  27. to as a whole (and to be treated as a separate entity). The canonical
  28. representation of property subsets is via the mechanism specified in the
  29. Hierarchical Properties Extension UUID definition document [2].
  30. Property sets may be hierarchical. That is, a property set may contain
  31. multiple property subsets that each may contain property subsets of its
  32. own and so on.
  33. General Validity Rule for Property Sets
  34. ---------------------------------------
  35. Valid property sets must follow the guidance given by the Device Properties UUID
  36. definition document [1].
  37. _DSD properties are intended to be used in addition to, and not instead of, the
  38. existing mechanisms defined by the ACPI specification. Therefore, as a rule,
  39. they should only be used if the ACPI specification does not make direct
  40. provisions for handling the underlying use case. It generally is invalid to
  41. return property sets which do not follow that rule from _DSD in data packages
  42. associated with the Device Properties UUID.
  43. Additional Considerations
  44. -------------------------
  45. There are cases in which, even if the general rule given above is followed in
  46. principle, the property set may still not be regarded as a valid one.
  47. For example, that applies to device properties which may cause kernel code
  48. (either a device driver or a library/subsystem) to access hardware in a way
  49. possibly leading to a conflict with AML methods in the ACPI namespace. In
  50. particular, that may happen if the kernel code uses device properties to
  51. manipulate hardware normally controlled by ACPI methods related to power
  52. management, like _PSx and _DSW (for device objects) or _ON and _OFF (for power
  53. resource objects), or by ACPI device disabling/enabling methods, like _DIS and
  54. _SRS.
  55. In all cases in which kernel code may do something that will confuse AML as a
  56. result of using device properties, the device properties in question are not
  57. suitable for the ACPI environment and consequently they cannot belong to a valid
  58. property set.
  59. Property Sets and Device Tree Bindings
  60. --------------------------------------
  61. It often is useful to make _DSD return property sets that follow Device Tree
  62. bindings.
  63. In those cases, however, the above validity considerations must be taken into
  64. account in the first place and returning invalid property sets from _DSD must be
  65. avoided. For this reason, it may not be possible to make _DSD return a property
  66. set following the given DT binding literally and completely. Still, for the
  67. sake of code re-use, it may make sense to provide as much of the configuration
  68. data as possible in the form of device properties and complement that with an
  69. ACPI-specific mechanism suitable for the use case at hand.
  70. In any case, property sets following DT bindings literally should not be
  71. expected to automatically work in the ACPI environment regardless of their
  72. contents.
  73. References
  74. ----------
  75. [1] http://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf
  76. [2] http://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf