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