18c2ecf20Sopenharmony_ciWhat: /dev/wmi/dell-smbios 28c2ecf20Sopenharmony_ciDate: November 2017 38c2ecf20Sopenharmony_ciKernelVersion: 4.15 48c2ecf20Sopenharmony_ciContact: "Mario Limonciello" <mario.limonciello@dell.com> 58c2ecf20Sopenharmony_ciDescription: 68c2ecf20Sopenharmony_ci Perform SMBIOS calls on supported Dell machines. 78c2ecf20Sopenharmony_ci through the Dell ACPI-WMI interface. 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci IOCTL's and buffer formats are defined in: 108c2ecf20Sopenharmony_ci <uapi/linux/wmi.h> 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci 1) To perform an SMBIOS call from userspace, you'll need to 138c2ecf20Sopenharmony_ci first determine the minimum size of the calling interface 148c2ecf20Sopenharmony_ci buffer for your machine. 158c2ecf20Sopenharmony_ci Platforms that contain larger buffers can return larger 168c2ecf20Sopenharmony_ci objects from the system firmware. 178c2ecf20Sopenharmony_ci Commonly this size is either 4k or 32k. 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci To determine the size of the buffer read() a u64 dword from 208c2ecf20Sopenharmony_ci the WMI character device /dev/wmi/dell-smbios. 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci 2) After you've determined the minimum size of the calling 238c2ecf20Sopenharmony_ci interface buffer, you can allocate a structure that represents 248c2ecf20Sopenharmony_ci the structure documented above. 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci 3) In the 'length' object store the size of the buffer you 278c2ecf20Sopenharmony_ci determined above and allocated. 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci 4) In this buffer object, prepare as necessary for the SMBIOS 308c2ecf20Sopenharmony_ci call you're interested in. Typically SMBIOS buffers have 318c2ecf20Sopenharmony_ci "class", "select", and "input" defined to values that coincide 328c2ecf20Sopenharmony_ci with the data you are interested in. 338c2ecf20Sopenharmony_ci Documenting class/select/input values is outside of the scope 348c2ecf20Sopenharmony_ci of this documentation. Check with the libsmbios project for 358c2ecf20Sopenharmony_ci further documentation on these values. 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci 6) Run the call by using ioctl() as described in the header. 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci 7) The output will be returned in the buffer object. 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci 8) Be sure to free up your allocated object. 42