Back to home page

OSCL-LXR

 
 

    


0001 What:           /sys/firmware/dmi/entries/
0002 Date:           February 2011
0003 Contact:        Mike Waychison <mikew@google.com>
0004 Description:
0005                 Many machines' firmware (x86 and ia64) export DMI /
0006                 SMBIOS tables to the operating system.  Getting at this
0007                 information is often valuable to userland, especially in
0008                 cases where there are OEM extensions used.
0009 
0010                 The kernel itself does not rely on the majority of the
0011                 information in these tables being correct.  It equally
0012                 cannot ensure that the data as exported to userland is
0013                 without error either.
0014 
0015                 DMI is structured as a large table of entries, where
0016                 each entry has a common header indicating the type and
0017                 length of the entry, as well as a firmware-provided
0018                 'handle' that is supposed to be unique amongst all
0019                 entries.
0020 
0021                 Some entries are required by the specification, but many
0022                 others are optional.  In general though, users should
0023                 never expect to find a specific entry type on their
0024                 system unless they know for certain what their firmware
0025                 is doing.  Machine to machine experiences will vary.
0026 
0027                 Multiple entries of the same type are allowed.  In order
0028                 to handle these duplicate entry types, each entry is
0029                 assigned by the operating system an 'instance', which is
0030                 derived from an entry type's ordinal position.  That is
0031                 to say, if there are 'N' multiple entries with the same type
0032                 'T' in the DMI tables (adjacent or spread apart, it
0033                 doesn't matter), they will be represented in sysfs as
0034                 entries "T-0" through "T-(N-1)":
0035 
0036                 Example entry directories::
0037 
0038                         /sys/firmware/dmi/entries/17-0
0039                         /sys/firmware/dmi/entries/17-1
0040                         /sys/firmware/dmi/entries/17-2
0041                         /sys/firmware/dmi/entries/17-3
0042                         ...
0043 
0044                 Instance numbers are used in lieu of the firmware
0045                 assigned entry handles as the kernel itself makes no
0046                 guarantees that handles as exported are unique, and
0047                 there are likely firmware images that get this wrong in
0048                 the wild.
0049 
0050                 Each DMI entry in sysfs has the common header values
0051                 exported as attributes:
0052 
0053                 ========  =================================================
0054                 handle    The 16bit 'handle' that is assigned to this
0055                           entry by the firmware.  This handle may be
0056                           referred to by other entries.
0057                 length    The length of the entry, as presented in the
0058                           entry itself.  Note that this is _not the
0059                           total count of bytes associated with the
0060                           entry.  This value represents the length of
0061                           the "formatted" portion of the entry.  This
0062                           "formatted" region is sometimes followed by
0063                           the "unformatted" region composed of nul
0064                           terminated strings, with termination signalled
0065                           by a two nul characters in series.
0066                 raw       The raw bytes of the entry. This includes the
0067                           "formatted" portion of the entry, the
0068                           "unformatted" strings portion of the entry,
0069                           and the two terminating nul characters.
0070                 type      The type of the entry.  This value is the same
0071                           as found in the directory name.  It indicates
0072                           how the rest of the entry should be interpreted.
0073                 instance  The instance ordinal of the entry for the
0074                           given type.  This value is the same as found
0075                           in the parent directory name.
0076                 position  The ordinal position (zero-based) of the entry
0077                           within the entirety of the DMI entry table.
0078                 ========  =================================================
0079 
0080                 **Entry Specialization**
0081 
0082                 Some entry types may have other information available in
0083                 sysfs.  Not all types are specialized.
0084 
0085                 **Type 15 - System Event Log**
0086 
0087                 This entry allows the firmware to export a log of
0088                 events the system has taken.  This information is
0089                 typically backed by nvram, but the implementation
0090                 details are abstracted by this table.  This entry's data
0091                 is exported in the directory::
0092 
0093                   /sys/firmware/dmi/entries/15-0/system_event_log
0094 
0095                 and has the following attributes (documented in the
0096                 SMBIOS / DMI specification under "System Event Log (Type 15)":
0097 
0098                 - area_length
0099                 - header_start_offset
0100                 - data_start_offset
0101                 - access_method
0102                 - status
0103                 - change_token
0104                 - access_method_address
0105                 - header_format
0106                 - per_log_type_descriptor_length
0107                 - type_descriptors_supported_count
0108 
0109                 As well, the kernel exports the binary attribute:
0110 
0111                 =============     ====================================
0112                 raw_event_log     The raw binary bits of the event log
0113                                   as described by the DMI entry.
0114                 =============     ====================================