sysfs-firmware-dmi 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. What: /sys/firmware/dmi/
  2. Date: February 2011
  3. Contact: Mike Waychison <mikew@google.com>
  4. Description:
  5. Many machines' firmware (x86 and ia64) export DMI /
  6. SMBIOS tables to the operating system. Getting at this
  7. information is often valuable to userland, especially in
  8. cases where there are OEM extensions used.
  9. The kernel itself does not rely on the majority of the
  10. information in these tables being correct. It equally
  11. cannot ensure that the data as exported to userland is
  12. without error either.
  13. DMI is structured as a large table of entries, where
  14. each entry has a common header indicating the type and
  15. length of the entry, as well as 'handle' that is
  16. supposed to be unique amongst all entries.
  17. Some entries are required by the specification, but many
  18. others are optional. In general though, users should
  19. never expect to find a specific entry type on their
  20. system unless they know for certain what their firmware
  21. is doing. Machine to machine will vary.
  22. Multiple entries of the same type are allowed. In order
  23. to handle these duplicate entry types, each entry is
  24. assigned by the operating system an 'instance', which is
  25. derived from an entry type's ordinal position. That is
  26. to say, if there are 'N' multiple entries with the same type
  27. 'T' in the DMI tables (adjacent or spread apart, it
  28. doesn't matter), they will be represented in sysfs as
  29. entries "T-0" through "T-(N-1)":
  30. Example entry directories:
  31. /sys/firmware/dmi/entries/17-0
  32. /sys/firmware/dmi/entries/17-1
  33. /sys/firmware/dmi/entries/17-2
  34. /sys/firmware/dmi/entries/17-3
  35. ...
  36. Instance numbers are used in lieu of the firmware
  37. assigned entry handles as the kernel itself makes no
  38. guarantees that handles as exported are unique, and
  39. there are likely firmware images that get this wrong in
  40. the wild.
  41. Each DMI entry in sysfs has the common header values
  42. exported as attributes:
  43. handle : The 16bit 'handle' that is assigned to this
  44. entry by the firmware. This handle may be
  45. referred to by other entries.
  46. length : The length of the entry, as presented in the
  47. entry itself. Note that this is _not the
  48. total count of bytes associated with the
  49. entry_. This value represents the length of
  50. the "formatted" portion of the entry. This
  51. "formatted" region is sometimes followed by
  52. the "unformatted" region composed of nul
  53. terminated strings, with termination signalled
  54. by a two nul characters in series.
  55. raw : The raw bytes of the entry. This includes the
  56. "formatted" portion of the entry, the
  57. "unformatted" strings portion of the entry,
  58. and the two terminating nul characters.
  59. type : The type of the entry. This value is the same
  60. as found in the directory name. It indicates
  61. how the rest of the entry should be
  62. interpreted.
  63. instance: The instance ordinal of the entry for the
  64. given type. This value is the same as found
  65. in the parent directory name.
  66. position: The position of the entry within the entirety
  67. of the entirety.
  68. === Entry Specialization ===
  69. Some entry types may have other information available in
  70. sysfs.
  71. --- Type 15 - System Event Log ---
  72. This entry allows the firmware to export a log of
  73. events the system has taken. This information is
  74. typically backed by nvram, but the implementation
  75. details are abstracted by this table. This entries data
  76. is exported in the directory:
  77. /sys/firmware/dmi/entries/15-0/system_event_log
  78. and has the following attributes (documented in the
  79. SMBIOS / DMI specification under "System Event Log (Type 15)":
  80. area_length
  81. header_start_offset
  82. data_start_offset
  83. access_method
  84. status
  85. change_token
  86. access_method_address
  87. header_format
  88. per_log_type_descriptor_length
  89. type_descriptors_supported_count
  90. As well, the kernel exports the binary attribute:
  91. raw_event_log : The raw binary bits of the event log
  92. as described by the DMI entry.