26 Feb, 2011

1 commit


31 Jul, 2010

1 commit

  • This patch exports SMBIOS provided firmware instance and label of
    onboard PCI devices to sysfs. New files are:
    /sys/bus/pci/devices/.../label which contains the firmware name for
    the device in question, and
    /sys/bus/pci/devices/.../index which contains the firmware device type
    instance for the given device.

    Signed-off-by: Jordan Hargrave
    Signed-off-by: Narendra K
    Signed-off-by: Jesse Barnes

    Narendra K
     

09 Sep, 2009

1 commit

  • There are cases where full date information is required instead of
    just the year. Add month and day parsing to dmi_get_year() and rename
    it to dmi_get_date().

    As the original function only required '/' followed by any number of
    parseable characters at the end of the string, keep that behavior to
    avoid upsetting existing users.

    The new function takes dates of format [mm[/dd]]/yy[yy]. Year, month
    and date are checked to be in the ranges of [1-9999], [1-12] and
    [1-31] respectively and any invalid or out-of-range component is
    returned as zero.

    The dummy implementation is updated accordingly but the return value
    is updated to indicate field not found which is consistent with how
    other dummy functions behave.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     

31 Mar, 2009

1 commit


28 Jan, 2009

1 commit

  • Commit d7b1956fed33d30c4815e848fd7a143722916868 ("DMI: Introduce
    dmi_first_match to make the interface more flexible") introduced compile
    errors like the following when !CONFIG_DMI

    drivers/ata/sata_sil.c: In function 'sil_broken_system_poweroff':
    drivers/ata/sata_sil.c:713: error: implicit declaration of function 'dmi_first_match'
    drivers/ata/sata_sil.c:713: warning: initialization makes pointer from integer without a cast

    We just need a dummy version of dmi_first_match() to fix this all up.

    Signed-off-by: Kumar Gala
    Signed-off-by: Linus Torvalds

    Kumar Gala
     

27 Jan, 2009

1 commit

  • Some notebooks from HP have the problem that their BIOSes attempt to
    spin down hard drives before entering ACPI system states S4 and S5.
    This leads to a yo-yo effect during system power-off shutdown and the
    last phase of hibernation when the disk is first spun down by the
    kernel and then almost immediately turned on and off by the BIOS.
    This, in turn, may result in shortening the disk's life times.

    To prevent this from happening we can blacklist the affected systems
    using DMI information. However, only the on-board controlles should
    be blacklisted and their PCI slot numbers can be used for this
    purpose. Unfortunately the existing interface for checking DMI
    information of the system is not very convenient for this purpose,
    because to use it, we would have to define special callback functions
    or create a separate struct dmi_system_id table for each blacklisted
    system.

    To overcome this difficulty introduce a new function
    dmi_first_match() returning a pointer to the first entry in an array
    of struct dmi_system_id elements that matches the system DMI
    information. Then, we can use this pointer to access the entry's
    .driver_data field containing the additional information, such as
    the PCI slot number, allowing us to do the desired blacklisting.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Jeff Garzik

    Rafael J. Wysocki
     

29 Dec, 2008

1 commit

  • Add a wrapper for testing system_info which will handle also NULL
    system infos.

    This will be used by the ata PIIX driver.

    Signed-off-by: Jiri Slaby
    Cc: Alexandru Romanescu
    Cc: Tejun Heo
    Cc: Alan Cox
    Signed-off-by: Jeff Garzik

    Jiri Slaby
     

05 Nov, 2008

1 commit

  • Impact: Should permit VMware detection on older platforms where the
    vendor is changed. Could theoretically cause a regression if some
    weird serial number scheme contains the string "VMware" by pure
    chance. Seems unlikely, especially with the mixed case.

    In some user configured cases, VMware may choose not to put a VMware specific
    DMI string, but the product serial key is always there and is VMware specific.
    Add a interface to check the serial key, when checking for VMware in the DMI
    information.

    Signed-off-by: Alok N Kataria
    Signed-off-by: H. Peter Anvin

    Alok Kataria
     

13 Oct, 2008

1 commit

  • This makes modpost handle MODULE_DEVICE_TABLE(dmi, xxxx).

    I had to change the string pointers in the match table to char arrays,
    and picked a size of 79 bytes almost at random -- do we need to make it
    bigger than that? I was a bit concerned about the 'bloat' this
    introduces into the match tables, but they should all be __initdata so
    it shouldn't matter too much.

    (Actually, modpost does go through the relocations and look at most of
    them; it wouldn't be impossible to make it handle string pointers -- but
    doesn't seem to be worth the effort, since they're __initdata).

    Signed-off-by: David Woodhouse

    David Woodhouse
     

28 Apr, 2008

1 commit

  • Turn CONFIG_DMI into a selectable option if EMBEDDED is defined, in
    order to be able to remove the DMI table scanning code if it's not
    needed, and then reduce the kernel code size.

    With CONFIG_DMI (i.e before) :

    text data bss dec hex filename
    1076076 128656 98304 1303036 13e1fc vmlinux

    Without CONFIG_DMI (i.e after) :

    text data bss dec hex filename
    1068092 126308 98304 1292704 13b9a0 vmlinux

    Result:

    text data bss dec hex filename
    -7984 -2348 0 -10332 -285c vmlinux

    The new option appears in "Processor type and features", only when
    CONFIG_EMBEDDED is defined.

    This patch is part of the Linux Tiny project, and is based on previous work
    done by Matt Mackall .

    Signed-off-by: Thomas Petazzoni
    Acked-by: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Anvin"
    Signed-off-by: Matt Mackall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Petazzoni
     

09 Feb, 2008

1 commit

  • 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
    Cc: Jean Delvare
    Cc: Len Brown
    Cc: Jeff Garzik
    Cc: Tejun Heo
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wim Van Sebroeck
     

08 Feb, 2008

1 commit


04 Feb, 2008

1 commit


24 Jan, 2008

2 commits


10 Oct, 2007

1 commit

  • Three main sets of changes:

    1) dmi_get_system_info() return value should have been marked const,
    since callers should not be changing that data.

    2) const-ify DMI internals, since DMI firmware tables should,
    whenever possible, be marked const to ensure we never ever write to
    that data area.

    3) const-ify DMI API, to enable marking tables const where possible
    in low-level drivers.

    And if we're really lucky, this might enable some additional
    optimizations on the part of the compiler.

    The bulk of the changes are #2 and #3, which are interrelated. #1 could
    have been a separate patch, but it was so small compared to the others,
    it was easier to roll it into this changeset.

    Signed-off-by: Jeff Garzik

    Jeff Garzik
     

12 Jul, 2007

1 commit

  • The patch below adds DMI/SMBIOS based module autoloading to the Linux
    kernel. The idea is to load laptop drivers automatically (and other
    drivers which cannot be autoloaded otherwise), based on the DMI system
    identification information of the BIOS.

    Right now most distros manually try to load all available laptop
    drivers on bootup in the hope that at least one of them loads
    successfully. This patch does away with all that, and uses udev to
    automatically load matching drivers on the right machines.

    Basically the patch just exports the DMI information that has been
    parsed by the kernel anyway to userspace via a sysfs device
    /sys/class/dmi/id and makes sure that proper modalias attributes are
    available. Besides adding the "modalias" attribute it also adds
    attributes for a few other DMI fields which might be useful for
    writing udev rules.

    This patch is not an attempt to export the entire DMI/SMBIOS data to
    userspace. We already have "dmidecode" which parses the complete DMI
    info from userspace. The purpose of this patch is machine model
    identification and good udev integration.

    To take advantage of DMI based module autoloading, a driver should
    export one or more MODULE_ALIAS fields similar to these:

    MODULE_ALIAS("dmi:*:svnMICRO-STARINT'LCO.,LTD:pnMS-1013:pvr0131*:cvnMICRO-STARINT'LCO.,LTD:ct10:*");
    MODULE_ALIAS("dmi:*:svnMicro-StarInternational:pnMS-1058:pvr0581:rvnMSI:rnMS-1058:*:ct10:*");
    MODULE_ALIAS("dmi:*:svnMicro-StarInternational:pnMS-1412:*:rvnMSI:rnMS-1412:*:cvnMICRO-STARINT'LCO.,LTD:ct10:*");
    MODULE_ALIAS("dmi:*:svnNOTEBOOK:pnSAM2000:pvr0131*:cvnMICRO-STARINT'LCO.,LTD:ct10:*");

    These lines are specific to my msi-laptop.c driver. They are basically
    just a concatenation of a few carefully selected DMI fields with all
    potentially bad characters stripped.

    Besides laptop drivers, modules like "hdaps", the i2c modules
    and the hwmon modules are good candidates for "dmi:" MODULE_ALIAS
    lines.

    Besides merely exporting the DMI data via sysfs the patch adds
    support for a few more DMI fields. Especially the CHASSIS fields are
    very useful to identify different laptop modules. The patch also adds
    working MODULE_ALIAS lines to my msi-laptop.c driver.

    I'd like to thank Kay Sievers for helping me to clean up this patch
    for posting it on lkml.

    Patch is against Linus' current GIT HEAD. Should probably apply to
    older kernels as well without modification.

    Signed-off-by: Lennart Poettering
    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Lennart Poettering
     

22 Oct, 2006

1 commit


30 Sep, 2006

1 commit

  • This teaches dmi_decode() how to decode and save OEM Strings (type 11) DMI
    information, which is currently discarded silently. Existing code using
    DMI is not affected. Follows the "System Management BIOS (SMBIOS)
    Specification" (http://www.dmtf.org/standards/smbios), and also the
    userspace dmidecode.c code.

    OEM Strings are the only safe way to identify some hardware, e.g., the
    ThinkPad embedded controller used by the soon-to-be-submitted tp_smapi
    driver. This will also let us eliminate the long whitelist in the mainline
    hdaps driver (in a future patch).

    Signed-off-by: Shem Multinymous
    Cc: Bjorn Helgaas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shem Multinymous
     

26 Apr, 2006

1 commit


26 Mar, 2006

1 commit

  • - Move the core parser into dmi_scan.c. It can be useful for other
    subsystems too.
    - Differentiate between field doesn't exist and field is 0 or
    unparseable. The first case is likely an old BIOS with broken ACPI,
    the later is likely a slightly buggy BIOS where someone forget to
    edit the date. Don't blacklist in the later case.

    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     

12 Jan, 2006

1 commit

  • Some people need it now on 64bit so reuse the i386 code for
    x86-64. This will be also useful for future bug workarounds.

    It is a bit simplified there because there is no need
    to do it very early on x86-64. This means it doesn't need
    early ioremap et.al. We run it as a core initcall right now.

    I hope it's not needed for early setup.

    I added a general CONFIG_DMI symbol in case IA64 or someone
    else wants to reuse the code later too.

    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     

31 Oct, 2005

1 commit

  • Add CONFIG_X86_32 for i386. This allows selecting options that only apply
    to 32-bit systems.

    (X86 && !X86_64) becomes X86_32
    (X86 || X86_64) becomes X86

    Signed-off-by: Brian Gerst
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Brian Gerst
     

13 Sep, 2005

1 commit


08 Sep, 2005

1 commit


26 Jun, 2005

1 commit

  • I8K: Change to use stock dmi infrastructure instead of homegrown
    parsing code. The driver now requires box's DMI data to match
    list of supported models so driver can be safely compiled-in
    by default without fear of it poking into random SMM BIOS
    code. DMI checks can be ignored with i8k.ignore_dmi option.

    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dmitry Torokhov
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds