xref: /linux/Documentation/ABI/testing/dell-smbios-wmi (revision f2645fa317b8905b8934f06a0601d5b7fa66aba0)
1*f2645fa3SMario LimoncielloWhat:		/dev/wmi/dell-smbios
2*f2645fa3SMario LimoncielloDate:		November 2017
3*f2645fa3SMario LimoncielloKernelVersion:	4.15
4*f2645fa3SMario LimoncielloContact:	"Mario Limonciello" <mario.limonciello@dell.com>
5*f2645fa3SMario LimoncielloDescription:
6*f2645fa3SMario Limonciello		Perform SMBIOS calls on supported Dell machines.
7*f2645fa3SMario Limonciello		through the Dell ACPI-WMI interface.
8*f2645fa3SMario Limonciello
9*f2645fa3SMario Limonciello		IOCTL's and buffer formats are defined in:
10*f2645fa3SMario Limonciello		<uapi/linux/wmi.h>
11*f2645fa3SMario Limonciello
12*f2645fa3SMario Limonciello		1) To perform an SMBIOS call from userspace, you'll need to
13*f2645fa3SMario Limonciello		first determine the minimum size of the calling interface
14*f2645fa3SMario Limonciello		buffer for your machine.
15*f2645fa3SMario Limonciello		Platforms that contain larger buffers can return larger
16*f2645fa3SMario Limonciello		objects from the system firmware.
17*f2645fa3SMario Limonciello		Commonly this size is either 4k or 32k.
18*f2645fa3SMario Limonciello
19*f2645fa3SMario Limonciello		To determine the size of the buffer read() a u64 dword from
20*f2645fa3SMario Limonciello		the WMI character device /dev/wmi/dell-smbios.
21*f2645fa3SMario Limonciello
22*f2645fa3SMario Limonciello		2) After you've determined the minimum size of the calling
23*f2645fa3SMario Limonciello		interface buffer, you can allocate a structure that represents
24*f2645fa3SMario Limonciello		the structure documented above.
25*f2645fa3SMario Limonciello
26*f2645fa3SMario Limonciello		3) In the 'length' object store the size of the buffer you
27*f2645fa3SMario Limonciello		determined above and allocated.
28*f2645fa3SMario Limonciello
29*f2645fa3SMario Limonciello		4) In this buffer object, prepare as necessary for the SMBIOS
30*f2645fa3SMario Limonciello		call you're interested in.  Typically SMBIOS buffers have
31*f2645fa3SMario Limonciello		"class", "select", and "input" defined to values that coincide
32*f2645fa3SMario Limonciello		with the data you are interested in.
33*f2645fa3SMario Limonciello		Documenting class/select/input values is outside of the scope
34*f2645fa3SMario Limonciello		of this documentation. Check with the libsmbios project for
35*f2645fa3SMario Limonciello		further documentation on these values.
36*f2645fa3SMario Limonciello
37*f2645fa3SMario Limonciello		6) Run the call by using ioctl() as described in the header.
38*f2645fa3SMario Limonciello
39*f2645fa3SMario Limonciello		7) The output will be returned in the buffer object.
40*f2645fa3SMario Limonciello
41*f2645fa3SMario Limonciello		8) Be sure to free up your allocated object.
42