diff options
author | Wim Van Sebroeck <wim@iguana.be> | 2008-02-08 04:20:58 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-08 09:22:37 -0800 |
commit | b4bd7d59451960d4e1d994c01581b31b08fe3720 (patch) | |
tree | 6cd02772f848006a349d1acc3e5c2808a3761ec7 /drivers | |
parent | 13050d89019a4127178c0945733fb23649f9f3fe (diff) |
SMBIOS/DMI: add type 41 = Onboard Devices Extended Information
From version 2.6 of the SMBIOS standard, type 10 (On Board Devices
Information) becomes obsolete. The reason for this is that no further
fields can be added to this structure without adversely affecting existing
software's ability to properly parse the data.
Therefore type 41 (Onboard Devices Extended Information) was added.
The structure is as follows:
struct smbios_type_41 {
u8 type;
u8 length;
u16 handle;
u8 reference_designation_string;
u8 device_type; /* same device type as in type 10 */
u8 device_type_instance;
u16 segment_group_number;
u8 bus_number;
u8 device_function_number;
};
For more info: http://www.dmtf.org/standards/smbios
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Len Brown <lenb@kernel.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Tejun Heo <htejun@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/firmware/dmi_scan.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c index 1412d7bcdbd..653265a40b7 100644 --- a/drivers/firmware/dmi_scan.c +++ b/drivers/firmware/dmi_scan.c @@ -250,6 +250,28 @@ static void __init dmi_save_ipmi_device(const struct dmi_header *dm) list_add(&dev->list, &dmi_devices); } +static void __init dmi_save_extended_devices(const struct dmi_header *dm) +{ + const u8 *d = (u8*) dm + 5; + struct dmi_device *dev; + + /* Skip disabled device */ + if ((*d & 0x80) == 0) + return; + + dev = dmi_alloc(sizeof(*dev)); + if (!dev) { + printk(KERN_ERR "dmi_save_extended_devices: out of memory.\n"); + return; + } + + dev->type = *d-- & 0x7f; + dev->name = dmi_string(dm, *d); + dev->device_data = NULL; + + list_add(&dev->list, &dmi_devices); +} + /* * Process a DMI table entry. Right now all we care about are the BIOS * and machine entries. For 2.5 we should pull the smbus controller info @@ -292,6 +314,9 @@ static void __init dmi_decode(const struct dmi_header *dm) break; case 38: /* IPMI Device Information */ dmi_save_ipmi_device(dm); + break; + case 41: /* Onboard Devices Extended Information */ + dmi_save_extended_devices(dm); } } |