firmware: dmi_scan: add SBMIOS entry and DMI tables
authorIvan Khoronzhuk <ivan.khoronzhuk@globallogic.com>
Thu, 25 Jun 2015 07:06:56 +0000 (09:06 +0200)
committerJean Delvare <jdelvare@suse.de>
Thu, 25 Jun 2015 07:06:56 +0000 (09:06 +0200)
Some utils, like dmidecode and smbios, need to access SMBIOS entry
table area in order to get information like SMBIOS version, size, etc.
Currently it's done via /dev/mem. But for situation when /dev/mem
usage is disabled, the utils have to use dmi sysfs instead, which
doesn't represent SMBIOS entry and adds code/delay redundancy when direct
access for table is needed.

So this patch creates dmi/tables and adds SMBIOS entry point to allow
utils in question to work correctly without /dev/mem. Also patch adds
raw dmi table to simplify dmi table processing in user space, as
proposed by Jean Delvare.

Tested-by: Roy Franz <roy.franz@linaro.org>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@globallogic.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Documentation/ABI/testing/sysfs-firmware-dmi-tables [new file with mode: 0644]
MAINTAINERS
drivers/firmware/dmi-sysfs.c
drivers/firmware/dmi_scan.c
include/linux/dmi.h

diff --git a/Documentation/ABI/testing/sysfs-firmware-dmi-tables b/Documentation/ABI/testing/sysfs-firmware-dmi-tables
new file mode 100644 (file)
index 0000000..ff3cac8
--- /dev/null
@@ -0,0 +1,22 @@
+What:          /sys/firmware/dmi/tables/
+Date:          April 2015
+Contact:       Ivan Khoronzhuk <ivan.khoronzhuk@globallogic.com>
+Description:
+               The firmware provides DMI structures as a packed list of
+               data referenced by a SMBIOS table entry point. The SMBIOS
+               entry point contains general information, like SMBIOS
+               version, DMI table size, etc. The structure, content and
+               size of SMBIOS entry point is dependent on SMBIOS version.
+               The format of SMBIOS entry point and DMI structures
+               can be read in SMBIOS specification.
+
+               The dmi/tables provides raw SMBIOS entry point and DMI tables
+               through sysfs as an alternative to utilities reading them
+               from /dev/mem. The raw SMBIOS entry point and DMI table are
+               presented as binary attributes and are accessible via:
+
+               /sys/firmware/dmi/tables/smbios_entry_point
+               /sys/firmware/dmi/tables/DMI
+
+               The complete DMI information can be obtained using these two
+               tables.
index 0502f9a..ca47368 100644 (file)
@@ -3289,6 +3289,7 @@ DMI/SMBIOS SUPPORT
 M:     Jean Delvare <jdelvare@suse.de>
 S:     Maintained
 T:     quilt http://jdelvare.nerim.net/devel/linux/jdelvare-dmi/
+F:     Documentation/ABI/testing/sysfs-firmware-dmi-tables
 F:     drivers/firmware/dmi-id.c
 F:     drivers/firmware/dmi_scan.c
 F:     include/linux/dmi.h
Simple merge
Simple merge
Simple merge