2008-12-18 00:34:38

by Andrew Paprocki

[permalink] [raw]
Subject: i8k: fails to detect Dell XPS M1530, fails to get SMM BIOS version with force=1

I see two problems with the i8k module and the Dell XPS M1530. First,
the laptop is not detected. Second, even if it is detected, the module
prints that it is unable to get the SMM BIOS version even though the
module appears to be working:

# modprobe i8k force=1
# dmesg | grep i8k
[ 547.007217] i8k: not running on a supported Dell system.
[ 547.007234] i8k: vendor=Dell Inc., model=XPS M1530
, version=A08
[ 547.007629] i8k: unable to get SMM BIOS version
# cat /proc/i8k
1.0 A08 5D26YF1 53 0 0 0 0 -1 -22

Information from DMI:

BIOS Information
Vendor: Dell Inc.
Version: A08
Release Date: 03/19/2008

System Information
Manufacturer: Dell Inc.
Product Name: XPS M1530

It seems straightforward to add a record for the auto-detection, but
I'm not sure how generic it should be. From looking online, it appears
the M1330, M1530, and M1730 all need to be detected. Perhaps it should
just be "Dell XPS M Series" and only match on "XPS M"? Does anyone
else on the list use these laptops?

Thanks,
-Andrew

--- a/drivers/char/i8k.c
+++ b/drivers/char/i8k.c
@@ -485,6 +485,13 @@ static struct dmi_system_id __initdata i8k_dmi_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "MP061"),
},
},
+ {
+ .ident = "Dell XPS M1530",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "XPS M1530"),
+ },
+ },
{ }
};


2008-12-21 14:41:19

by Alan

[permalink] [raw]
Subject: Re: i8k: fails to detect Dell XPS M1530, fails to get SMM BIOS version with force=1

On Wed, 17 Dec 2008 20:07:02 -0500
"Andrew Paprocki" <[email protected]> wrote:

> On Wed, Dec 17, 2008 at 7:34 PM, Andrew Paprocki <[email protected]> wrote:
> > I see two problems with the i8k module and the Dell XPS M1530. First,
> > the laptop is not detected. Second, even if it is detected, the module
> > prints that it is unable to get the SMM BIOS version even though the
> > module appears to be working:
>
> It appears that the Dell Vostro & Precision series have the same issue
> and the driver was never updated for those as well. Patches were
> submitted back in 2007-11 and 2008-04 respectively:
>
> http://marc.info/?l=linux-kernel&m=119401935026583&w=2
> http://marc.info/?l=linux-kernel&m=120822526223412&w=2

I can find no copies of them with Signed-off-by: lines so they appear to
have escaped. If the authors of those changes would care to provided
Signed-off-by: lines I'll chase this up further.

2008-12-21 20:05:57

by Matthew Garrett

[permalink] [raw]
Subject: Re: i8k: fails to detect Dell XPS M1530, fails to get SMM BIOS version with force=1

My understanding is that the documented way of making SMM calls on any
Dell system is using the interface in the dcdbas driver. dell-laptop
uses this to export some of the information that i8k handles (and a
bunch of other stuff) but not all of it. Asking about fan information on
the libsmbios mailing list might get us the documented access method for
that, and then dell-laptop can be extended to export that ia the hwmon
interface.

--
Matthew Garrett | [email protected]

2008-12-21 23:49:31

by Federico Heinz

[permalink] [raw]
Subject: Re: i8k: fails to detect Dell XPS M1530, fails to get SMM BIOS version with force=1

On 21/12/2008, Alan Cox wrote:
> I can find no copies of them with Signed-off-by: lines so they appear to
> have escaped. If the authors of those changes would care to provided
> Signed-off-by: lines I'll chase this up further.

This trivial patch adds support for i8k on the new Dell Vostro models.
I tested it on my Vostro 1400, and it works. It does print a warning
when loading the module:

i8k: unable to get SMM BIOS version

But I couldn't figure out how to fix that. The module seems to work fine,
anyway...

Signed-off-by: Federico Heinz <[email protected]>

--- drivers/char/i8k.c.orig 2007-07-08 20:32:17.000000000 -0300
+++ drivers/char/i8k.c 2007-09-27 03:06:08.000000000 -0300
@@ -439,6 +439,13 @@
DMI_MATCH(DMI_PRODUCT_NAME, "Latitude"),
},
},
+ {
+ .ident = "Dell Vostro",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Vostro"),
+ },
+ },
{ }
};

2008-12-22 00:25:01

by Andy Spencer

[permalink] [raw]
Subject: Re: i8k: fails to detect Dell XPS M1530, fails to get SMM BIOS version with force=1

On Sun, Dec 21, 2008 at 09:41:09AM -0500, Alan Cox wrote:
> I can find no copies of them with Signed-off-by: lines so they appear
> to have escaped. If the authors of those changes would care to
> provided Signed-off-by: lines I'll chase this up further.

Patch to enable i8k on Dell Precisions.

Signed-off-by: Andy Spencer <[email protected]>

diff --git a/drivers/char/i8k.c b/drivers/char/i8k.c
index b60d425..099fc89 100644
--- a/drivers/char/i8k.c
+++ b/drivers/char/i8k.c
@@ -485,6 +485,13 @@ static struct dmi_system_id __initdata i8k_dmi_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "MP061"),
},
},
+ {
+ .ident = "Dell Precision",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Precision"),
+ },
+ },
{ }
};


Attachments:
(No filename) (780.00 B)
(No filename) (197.00 B)
Download all attachments

2008-12-18 01:07:20

by Andrew Paprocki

[permalink] [raw]
Subject: Re: i8k: fails to detect Dell XPS M1530, fails to get SMM BIOS version with force=1

On Wed, Dec 17, 2008 at 7:34 PM, Andrew Paprocki <[email protected]> wrote:
> I see two problems with the i8k module and the Dell XPS M1530. First,
> the laptop is not detected. Second, even if it is detected, the module
> prints that it is unable to get the SMM BIOS version even though the
> module appears to be working:

It appears that the Dell Vostro & Precision series have the same issue
and the driver was never updated for those as well. Patches were
submitted back in 2007-11 and 2008-04 respectively:

http://marc.info/?l=linux-kernel&m=119401935026583&w=2
http://marc.info/?l=linux-kernel&m=120822526223412&w=2

The same message prints for (at least one of) those as well:

i8k: unable to get SMM BIOS version

-Andrew

2008-12-18 06:22:51

by Andrew Morton

[permalink] [raw]
Subject: Re: i8k: fails to detect Dell XPS M1530, fails to get SMM BIOS version with force=1

On Wed, 17 Dec 2008 20:07:02 -0500 "Andrew Paprocki" <[email protected]> wrote:

> On Wed, Dec 17, 2008 at 7:34 PM, Andrew Paprocki <[email protected]> wrote:
> > I see two problems with the i8k module and the Dell XPS M1530. First,
> > the laptop is not detected. Second, even if it is detected, the module
> > prints that it is unable to get the SMM BIOS version even though the
> > module appears to be working:
>
> It appears that the Dell Vostro & Precision series have the same issue
> and the driver was never updated for those as well. Patches were
> submitted back in 2007-11 and 2008-04 respectively:
>
> http://marc.info/?l=linux-kernel&m=119401935026583&w=2
> http://marc.info/?l=linux-kernel&m=120822526223412&w=2

Thanks, I picked up all three (much to various people's surprise, I expect).

> The same message prints for (at least one of) those as well:
>
> i8k: unable to get SMM BIOS version

hm. But the driver works OK anyway?

2008-12-18 07:53:32

by Andrew Paprocki

[permalink] [raw]
Subject: Re: i8k: fails to detect Dell XPS M1530, fails to get SMM BIOS version with force=1

On Thu, Dec 18, 2008 at 1:22 AM, Andrew Morton
<[email protected]> wrote:
>> The same message prints for (at least one of) those as well:
>>
>> i8k: unable to get SMM BIOS version
>
> hm. But the driver works OK anyway?

It appears to work.

I tried to figure out why the SMM message is printing out. I can't
find any reference for the #defined values in i8k.c. The only prior
source code I can find mentioning some of them appears to be from the
Windows fanio driver inside the i8kfangui source code
(i8kfangui31-src.zip). Those constants seem to have been reverse
engineered by disassembling the nbsvc.mdm (really an MS-DOS
executable) that Dell puts in the first partition of the laptop hard
drive.

Is there a valid reference for how this SMM mechanism works and what
the inputs/outputs are? There must be some other snippets of code
around because there are a few values in i8k.c which are not in
i8kfangui31-src.zip. I could help with this code if anyone has a
reliable source for this information. The i8kfangui31 source mentions
V1266, and if I strings my copy of nbsvc.mdm, I see V1323. I'm not
sure how this (incomplete) table was derived.

--- begin paste

According to the module NBSVC.MDM the following SMM (System
Management Mode) functions are currently available (V1266):

cmd function
0x00a3 get current speed indicator of a fan (args: fan)
0x01a3 set speed of a fan (args: fan & speed)
0x02a3 get RPM of a fan (args: fan)
0x03a3 ??? (1 byte)
0x04a3 get nominal fan speed (2 args)
0x05a3 get fan tolerance speed (2 args)
0x10a3 get sensor temperature (1 arg: sensor#)
0x11a3 ???
0x12a3 arg 0x0003=NBSVC-Query
arg 0x0000=NBSVC-Clear
arg 0x122=NBSVC-Start Trend
arg 0x0100=NBSVC-Stop Trend
arg 0x02??=NBSVC-Read
0x21a3 ??? (2 args: 1 byte (oder 0x16) + 1 byte)
0x22a3 get charger info (1 arg)
0x23a3 ??? (4 args: 2x 1 byte, 1xword, 1xdword)
0x24a3 get adaptor info status (1 arg oder 0x03)
0x30a3 ??? (no args)
0x31a3 ??? (no args)
0x32a3 ??? (no args)
0x33a3 ??? (no args)
0x36a3 get hotkey scancode list (args see diags)
0x37a3 ??? (no args)
0x40a3 get docking state (no args)
0xf0a3 ??? (2 args)
0xfea3 check SMBIOS version (1 arg)
0xffa3 check SMBIOS interface (returns:"DELLDIAG")