1. 31 3月, 2009 1 次提交
    • J
      dmi: Let dmi_walk() users pass private data · e7a19c56
      Jean Delvare 提交于
      At the moment, dmi_walk() lacks flexibility, users can't pass data to
      the callback function. Add a pointer for private data to make this
      function more flexible.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Matthew Garrett <mjg@redhat.com>
      Cc: Roland Dreier <rolandd@cisco.com>
      e7a19c56
  2. 27 1月, 2009 1 次提交
    • R
      DMI: Introduce dmi_first_match to make the interface more flexible · d7b1956f
      Rafael J. Wysocki 提交于
      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: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      d7b1956f
  3. 07 1月, 2009 1 次提交
  4. 29 12月, 2008 1 次提交
  5. 08 11月, 2008 1 次提交
  6. 05 11月, 2008 1 次提交
    • A
      x86: vmware: look for DMI string in the product serial key · fd8cd7e1
      Alok Kataria 提交于
      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: NAlok N Kataria <akataria@vmware.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      fd8cd7e1
  7. 18 9月, 2008 1 次提交
  8. 25 5月, 2008 1 次提交
  9. 05 4月, 2008 1 次提交
    • C
      ipmi: change device node ordering to reflect probe order · abd24df8
      Carol Hebert 提交于
      In 2.6.14 a patch was merged which switching the order of the ipmi device
      naming from in-order-of-discovery over to reverse-order-of-discovery.
      
      So on systems with multiple BMC interfaces, the ipmi device names are being
      created in reverse order relative to how they are discovered on the system
      (e.g.  on an IBM x3950 multinode server with N nodes, the device name for the
      BMC in the first node is /dev/ipmiN-1 and the device name for the BMC in the
      last node is /dev/ipmi0, etc.).
      
      The problem is caused by the list handling routines chosen in dmi_scan.c.
      Using list_add() causes the multiple ipmi devices to be added to the device
      list using a stack-paradigm and so the ipmi driver subsequently pulls them off
      during initialization in LIFO order.  This patch changes the
      dmi_save_ipmi_device() list handling paradigm to a queue, thereby allowing the
      ipmi driver to build the ipmi device names in the order in which they are
      found on the system.
      Signed-off-by: NCarol Hebert <cah@us.ibm.com>
      Signed-off-by: NCorey Minyard <cminyard@mvista.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      abd24df8
  10. 24 2月, 2008 2 次提交
  11. 09 2月, 2008 1 次提交
  12. 08 2月, 2008 1 次提交
  13. 04 2月, 2008 1 次提交
  14. 30 1月, 2008 3 次提交
    • Y
      x86: left over fix for leak of early_ioremp in dmi_scan · 3212bff3
      Yinghai Lu 提交于
      Signed-off-by: NYinghai Lu <yinghai@sun.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      3212bff3
    • I
      x86: fix DMI ioremap leak · 0d64484f
      Ingo Molnar 提交于
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      0d64484f
    • P
      x86: fix DMI out of memory problems · 79da4721
      Parag Warudkar 提交于
      People with HP Desktops (including me) encounter couple of DMI errors
      during boot - dmi_save_oem_strings_devices: out of memory and
      dmi_string: out of memory.
      
      On some HP desktops the DMI data include OEM strings (type 11) out of
      which only few are meaningful and most other are empty. DMI code
      religiously creates copies of these 27 strings (65 bytes each in my
      case) and goes OOM in dmi_string().
      
      If DMI_MAX_DATA is bumped up a little then it goes and fails in
      dmi_save_oem_strings while allocating dmi_devices of sizeof(struct
      dmi_device) corresponding to these strings.
      
      On x86_64 since we cannot use alloc_bootmem this early, the code uses a
      static array of 2048 bytes (DMI_MAX_DATA) for allocating the memory DMI
      needs. It does not survive the creation of empty strings and devices.
      
      Fix this by detecting and not newly allocating empty strings and instead
      using a one statically defined dmi_empty_string.
      
      Also do not create a new struct dmi_device for each empty string - use
      one statically define dmi_device with .name=dmi_empty_string and add
      that to the dmi_devices list.
      
      On x64 this should stop the OOM with same current size of DMI_MAX_DATA
      and on x86 this should save a good amount of (27*65 bytes +
      27*sizeof(struct dmi_device) bootmem.
      
      Compile and boot tested on both 32-bit and 64-bit x86.
      Signed-off-by: NParag Warudkar <parag.warudkar@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      79da4721
  15. 24 1月, 2008 1 次提交
  16. 10 10月, 2007 1 次提交
    • J
      drivers/firmware: const-ify DMI API and internals · 1855256c
      Jeff Garzik 提交于
      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: NJeff Garzik <jgarzik@redhat.com>
      1855256c
  17. 12 7月, 2007 1 次提交
    • L
      DMI-based module autoloading · 4f5c791a
      Lennart Poettering 提交于
      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: NLennart Poettering <mzxreary@0pointer.de>
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      
      4f5c791a
  18. 22 10月, 2006 1 次提交
  19. 30 9月, 2006 1 次提交
  20. 26 6月, 2006 1 次提交
  21. 15 4月, 2006 1 次提交
  22. 27 3月, 2006 4 次提交
    • T
      [PATCH] EFI fixes · 23dd842c
      Tolentino, Matthew E 提交于
      Here's a patch that fixes EFI boot for x86 on 2.6.16-rc5-mm3.  The
      off-by-one is admittedly my fault, but the other two fix up the rest.
      
      Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
      Cc: Matt Domsch <Matt_Domsch@dell.com>
      Cc: "Tolentino, Matthew E" <matthew.e.tolentino@intel.com>
      Cc: "Brown, Len" <len.brown@intel.com>
      Cc: Andi Kleen <ak@muc.de>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      23dd842c
    • B
      [PATCH] EFI: keep physical table addresses in efi structure · b2c99e3c
      Bjorn Helgaas 提交于
      Almost all users of the table addresses from the EFI system table want
      physical addresses.  So rather than doing the pa->va->pa conversion, just keep
      physical addresses in struct efi.
      
      This fixes a DMI bug: the efi structure contained the physical SMBIOS address
      on x86 but the virtual address on ia64, so dmi_scan_machine() used ioremap()
      on a virtual address on ia64.
      
      This is essentially the same as an earlier patch by Matt Tolentino:
      	http://marc.theaimsgroup.com/?l=linux-kernel&m=112130292316281&w=2
      except that this changes all table addresses, not just ACPI addresses.
      
      Matt's original patch was backed out because it caused MCAs on HP sx1000
      systems.  That problem is resolved by the ioremap() attribute checking added
      for ia64.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Cc: Matt Domsch <Matt_Domsch@dell.com>
      Cc: "Tolentino, Matthew E" <matthew.e.tolentino@intel.com>
      Cc: "Brown, Len" <len.brown@intel.com>
      Cc: Andi Kleen <ak@muc.de>
      Acked-by: N"Luck, Tony" <tony.luck@intel.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b2c99e3c
    • B
      [PATCH] DMI: only ioremap stuff we actually need · 27d8e3d1
      Bjorn Helgaas 提交于
      dmi_scan_machine() tries to ioremap 0x10000 (64K) bytes, even though it only
      looks at the first 32 bytes or so.  If the SMBIOS table is near the end of a
      memory region, the ioremap() may fail when it shouldn't.
      
      This is in the efi_enabled path, so it really only affects ia64 at the moment.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Cc: Matt Domsch <Matt_Domsch@dell.com>
      Cc: "Tolentino, Matthew E" <matthew.e.tolentino@intel.com>
      Cc: "Brown, Len" <len.brown@intel.com>
      Cc: Andi Kleen <ak@muc.de>
      Acked-by: N"Luck, Tony" <tony.luck@intel.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      27d8e3d1
    • M
      [PATCH] ia64: use i386 dmi_scan.c · 3ed3bce8
      Matt Domsch 提交于
      Enable DMI table parsing on ia64.
      
      Andi Kleen has a patch in his x86_64 tree which enables the use of i386
      dmi_scan.c on x86_64.  dmi_scan.c functions are being used by the
      drivers/char/ipmi/ipmi_si_intf.c driver for autodetecting the ports or
      memory spaces where the IPMI controllers may be found.
      
      This patch adds equivalent changes for ia64 as to what is in the x86_64
      tree.  In addition, I reworked the DMI detection, such that on EFI-capable
      systems, it uses the efi.smbios pointer to find the table, rather than
      brute-force searching from 0xF0000.  On non-EFI systems, it continues the
      brute-force search.
      
      My test system, an Intel S870BN4 'Tiger4', aka Dell PowerEdge 7250, with
      latest BIOS, does not list the IPMI controller in the ACPI namespace, nor
      does it have an ACPI SPMI table.  Also note, currently shipping Dell x8xx
      EM64T servers don't have these either, so DMI is the only method for
      obtaining the address of the IPMI controller.
      Signed-off-by: NMatt Domsch <Matt_Domsch@dell.com>
      Acked-by: N"Luck, Tony" <tony.luck@intel.com>
      Cc: Andi Kleen <ak@muc.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3ed3bce8
  23. 26 3月, 2006 3 次提交
  24. 12 1月, 2006 1 次提交
    • A
      [PATCH] x86_64: Generalize DMI and enable for x86-64 · e9928674
      Andi Kleen 提交于
      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: NAndi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e9928674
  25. 08 9月, 2005 5 次提交
  26. 26 6月, 2005 3 次提交