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