2008-12-23 22:03:11

by Michał Mirosław

[permalink] [raw]
Subject: [PATCH] pci-quirks: HP hides SMBus controller in Compaq nx9500 laptops

I found no references to SMBus in ACPI DSDT disassembly on my laptop
so this should be safe.

Signed-off-by: Micha? Miros?aw <[email protected]>

diff -urN linux-2.6.27.7-brfix1-nvpid/drivers/pci/quirks.c pci-quirks/drivers/pci/quirks.c
--- linux-2.6.27.7-brfix1-nvpid/drivers/pci/quirks.c 2008-10-10 00:13:53.000000000 +0200
+++ pci-quirks/drivers/pci/quirks.c 2008-12-06 22:18:46.000000000 +0100
@@ -1040,6 +1040,7 @@
switch (dev->subsystem_device) {
case 0x12bc: /* HP D330L */
case 0x12bd: /* HP D530 */
+ case 0x006a: /* HP Compaq nx9500 */
asus_hides_smbus = 1;
}
else if (dev->device == PCI_DEVICE_ID_INTEL_82875_HB)


2008-12-26 18:24:35

by Pavel Machek

[permalink] [raw]
Subject: Re: [PATCH] pci-quirks: HP hides SMBus controller in Compaq nx9500 laptops

On Tue 2008-12-23 22:54:07, Micha? Miros?aw wrote:
> I found no references to SMBus in ACPI DSDT disassembly on my laptop
> so this should be safe.
>
> Signed-off-by: Michał Mirosław <[email protected]>

Well, it could still be used by smm bios traps...

Pavel

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

2009-01-05 19:19:38

by Jesse Barnes

[permalink] [raw]
Subject: Re: [PATCH] pci-quirks: HP hides SMBus controller in Compaq nx9500 laptops

On Wednesday, December 31, 1969 10:46 pm Pavel Machek wrote:
> On Tue 2008-12-23 22:54:07, Micha? Miros?aw wrote:
> > I found no references to SMBus in ACPI DSDT disassembly on my laptop
> > so this should be safe.
> >
> > Signed-off-by: Michał Mirosław <[email protected]>
>
> Well, it could still be used by smm bios traps...

Also, the changelog doesn't include a description of what this patch fixes, if
anything. Care to resend with an explanation Michal?

Thanks,
--
Jesse Barnes, Intel Open Source Technology Center

2009-01-05 20:02:35

by Michał Mirosław

[permalink] [raw]
Subject: Re: [PATCH] pci-quirks: HP hides SMBus controller in Compaq nx9500 laptops

On Mon, Jan 05, 2009 at 11:19:20AM -0800, Jesse Barnes wrote:
> On Wednesday, December 31, 1969 10:46 pm Pavel Machek wrote:
> > On Tue 2008-12-23 22:54:07, Micha? Miros?aw wrote:
> > > I found no references to SMBus in ACPI DSDT disassembly on my laptop
> > > so this should be safe.
> > >
> > > Signed-off-by: Micha? Miros?aw <[email protected]>
> > Well, it could still be used by smm bios traps...
> Also, the changelog doesn't include a description of what this patch fixes, if
> anything. Care to resend with an explanation Michal?

This patch enables SMBus controller on HP Compaq nx9500 laptop and
allowes to read SPD EEPROMs of the memory modules.
I found no references to SMBus in ACPI DSDT disassembly on my laptop, but
there are some additional devices on the bus (besides SPD chips).

rechot ~ # lspci -s 00:1f.3
00:1f.3 SMBus: Intel Corporation 82801EB/ER (ICH5/ICH5R) SMBus Controller (rev 02)

rechot ~ # i2cdetect -a 0
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0.
I will probe address range 0x00-0x7f.
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- 08 -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- 44 -- -- -- -- -- -- -- -- -- -- --
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- 69 -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

I observed no ill effects after scanning the bus, but YMMV.

Using the bus is probably not a good idea if the SMM code is really using
it, and so it might be better if this patch lies in the archives for now.
After I get the BIOS flashing to work I'll look into this.

Best Regards,
Michal Miroslaw

2009-01-06 08:41:32

by Pavel Machek

[permalink] [raw]
Subject: Re: [PATCH] pci-quirks: HP hides SMBus controller in Compaq nx9500 laptops

> On Mon, Jan 05, 2009 at 11:19:20AM -0800, Jesse Barnes wrote:
> > On Wednesday, December 31, 1969 10:46 pm Pavel Machek wrote:
> > > On Tue 2008-12-23 22:54:07, Micha? Miros?aw wrote:
> > > > I found no references to SMBus in ACPI DSDT disassembly on my laptop
> > > > so this should be safe.
> > > >
> > > > Signed-off-by: Micha? Miros?aw <[email protected]>
> > > Well, it could still be used by smm bios traps...
> > Also, the changelog doesn't include a description of what this patch fixes, if
> > anything. Care to resend with an explanation Michal?
>
> This patch enables SMBus controller on HP Compaq nx9500 laptop and
> allowes to read SPD EEPROMs of the memory modules.
> I found no references to SMBus in ACPI DSDT disassembly on my laptop, but
> there are some additional devices on the bus (besides SPD chips).
>
> rechot ~ # lspci -s 00:1f.3
> 00:1f.3 SMBus: Intel Corporation 82801EB/ER (ICH5/ICH5R) SMBus Controller (rev 02)
>
> rechot ~ # i2cdetect -a 0
> WARNING! This program can confuse your I2C bus, cause data loss and worse!
> I will probe file /dev/i2c-0.
> I will probe address range 0x00-0x7f.
> Continue? [Y/n] y
> 0 1 2 3 4 5 6 7 8 9 a b c d e f
> 00: -- -- -- -- -- -- -- -- 08 -- -- -- -- -- -- --
> 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 40: -- -- -- -- 44 -- -- -- -- -- -- -- -- -- -- --
> 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 60: -- -- -- -- -- -- -- -- -- 69 -- -- -- -- -- --
> 70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>
> I observed no ill effects after scanning the bus, but YMMV.
>
> Using the bus is probably not a good idea if the SMM code is really using
> it, and so it might be better if this patch lies in the archives for now.
> After I get the BIOS flashing to work I'll look into this.

I'm not saying SMM code _does_ use it... I just don't know, and
reading DSDT will not tell me (or you).
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

2009-01-06 12:43:43

by Michał Mirosław

[permalink] [raw]
Subject: Re: [PATCH] pci-quirks: HP hides SMBus controller in Compaq nx9500 laptops

On Tue, Jan 06, 2009 at 09:41:21AM +0100, Pavel Machek wrote:
> > rechot ~ # i2cdetect -a 0
> > WARNING! This program can confuse your I2C bus, cause data loss and worse!
> > I will probe file /dev/i2c-0.
> > I will probe address range 0x00-0x7f.
> > Continue? [Y/n] y
> > 0 1 2 3 4 5 6 7 8 9 a b c d e f
> > 00: -- -- -- -- -- -- -- -- 08 -- -- -- -- -- -- --
> > 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> > 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> > 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> > 40: -- -- -- -- 44 -- -- -- -- -- -- -- -- -- -- --
> > 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> > 60: -- -- -- -- -- -- -- -- -- 69 -- -- -- -- -- --
> > 70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> >
> > I observed no ill effects after scanning the bus, but YMMV.
> >
> > Using the bus is probably not a good idea if the SMM code is really using
> > it, and so it might be better if this patch lies in the archives for now.
> > After I get the BIOS flashing to work I'll look into this.
> I'm not saying SMM code _does_ use it... I just don't know, and
> reading DSDT will not tell me (or you).

But it is likely, isn't it? By 'looking into this' I meant that I will
take the BIOS apart again, disassemble it and check whatever it is that
the vendor is hiding. I'll repost this patch if it turns out there's
nothing to worry about.

Anyway - if someone wants to do the digging sooner, I can share
what I already know (including some documentation, tools and BIOS images
I found using Google).

Best Regards,
Michal Miroslaw