All of lore.kernel.org
 help / color / mirror / Atom feed
* Can't read DIMM SPD info (DDR2)
@ 2011-09-10 19:19 Michal Zatloukal
  2011-09-11  8:09 ` Jean Delvare
  0 siblings, 1 reply; 6+ messages in thread
From: Michal Zatloukal @ 2011-09-10 19:19 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA

Hi,
I'm unable to get decode-dimms to display SPD info from my memory modules.
Can someone please advise on finding the problem? The eeprom module is
loaded. This is on both my main system (Kubuntu 10.10) - 2.6.35 kernel,
i2c-tools 3.0.3-5 - and "latest" (Kubuntu 11.10 daily) - linux 3.0,
lm-sensors 3.3.0-4 and i2c-tools 3.0.3-5). The HW is a Fujitsu Esprimo
Mobile U9200 laptop (intel GM965). FWIW, the memtest that ships with
'buntu 11.10 (4.20 I think) reads the SPD info successfully.

Cheers and TIA,
MZ

-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Can't read DIMM SPD info (DDR2)
  2011-09-10 19:19 Can't read DIMM SPD info (DDR2) Michal Zatloukal
@ 2011-09-11  8:09 ` Jean Delvare
       [not found]   ` <20110911100945.73fffa6a-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Jean Delvare @ 2011-09-11  8:09 UTC (permalink / raw)
  To: Michal Zatloukal; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA

Hi Michal,

On Sat, 10 Sep 2011 21:19:30 +0200, Michal Zatloukal wrote:
> I'm unable to get decode-dimms to display SPD info from my memory modules.
> Can someone please advise on finding the problem? The eeprom module is
> loaded. This is on both my main system (Kubuntu 10.10) - 2.6.35 kernel,
> i2c-tools 3.0.3-5 - and "latest" (Kubuntu 11.10 daily) - linux 3.0,
> lm-sensors 3.3.0-4 and i2c-tools 3.0.3-5). The HW is a Fujitsu Esprimo
> Mobile U9200 laptop (intel GM965). FWIW, the memtest that ships with
> 'buntu 11.10 (4.20 I think) reads the SPD info successfully.

Preliminary note: the version of lm-sensors doesn't matter, as
lm-sensors has nothing to do with reading SPD information.

Second preliminary note: as far as I know, memtest86 reads SPD
information using a BIOS call, while decode-dimms gets the information
over the SMBus, assuming that SPD EEPROMs are connected to the SMBus
and reachable at run time. This difference in access methods can
explain why memtest86 can see information and decode-dimms not on the
same system.

Third preliminary note: it is very common to not see SPD EEPROMs on
the SMBus on laptops (or not all of them). On my Thinkpad T60p, SPD
EEPROMs aren't visible on the SMBus at run time, so decode-dimms
doesn't work.

First thing to check is if the SMBus on your system is properly found
and supported:

# modprobe i2c-dev
# i2cdetect -l

On an Intel system you should see an entry like:

i2c-8	smbus     	SMBus I801 adapter at 0400      	SMBus adapter

Then you can check if devices are seen on the bus:

# i2cdetect 8

If you see anything in address range 0x50 to 0x55, this is likely to be
SPD EEPROMs. Then you have to make sure that the eeprom module is
loaded:

# modprobe eeprom
$ decode-dimms

If you do not see anything in address range 0x50 to 0x55, then this
means you are in the same situation as me, i.e. SPD EEPROMs not
reachable at run time (most likely because they are behind an I2C
multiplexer or switch and the bus segment(s) with the SPD EEPROMs are
disabled by the BIOS before handing control to the OS. Unfortunately
the mux/switch control is not standard, so without detailed
documentation from the hardware manufacturer, it's very difficult to
restore access to the SPD EEPROMs at run time.

-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Can't read DIMM SPD info (DDR2)
       [not found]   ` <20110911100945.73fffa6a-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
@ 2011-09-11  9:50     ` Michal Zatloukal
  2011-09-11 11:08       ` Jean Delvare
  0 siblings, 1 reply; 6+ messages in thread
From: Michal Zatloukal @ 2011-09-11  9:50 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA

On Sun, 11 Sep 2011 10:09:45 +0200, Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
wrote:

> Hi Michal,
> ...
> Second preliminary note: as far as I know, memtest86 reads SPD
> information using a BIOS call, while decode-dimms gets the information
> over the SMBus, assuming that SPD EEPROMs are connected to the SMBus
> and reachable at run time. This difference in access methods can
> explain why memtest86 can see information and decode-dimms not on the
> same system.

Is there a way to do the BIOS call method in Linux? If it's a sort-of
standard way to access SPD info, would it be the one used by CPU-Z to read
the SPD info on Windows? (which does work on this HW)

> First thing to check is if the SMBus on your system is properly found
> and supported:
>
> # modprobe i2c-dev
> # i2cdetect -l
>
> On an Intel system you should see an entry like:
>
> i2c-8	smbus     	SMBus I801 adapter at 0400      	SMBus adapter

Nope. On 'buntu 10.10, I only got 5 entries (didn't write them down), none
of which said smbus. On 11.10, I get:

# i2cdetect -l
i2c-0   i2c             i915 gmbus disabled                     I2C adapter
i2c-1   i2c             i915 gmbus ssc                          I2C adapter
i2c-2   i2c             i915 GPIOB                              I2C adapter
i2c-3   i2c             i915 gmbus vga                          I2C adapter
i2c-4   i2c             i915 GPIOA                              I2C adapter
i2c-5   i2c             i915 gmbus panel                        I2C adapter
i2c-6   i2c             i915 GPIOC                              I2C adapter
i2c-7   i2c             i915 gmbus dpc                          I2C adapter
i2c-8   i2c             i915 GPIOD                              I2C adapter
i2c-9   i2c             i915 gmbus dpb                          I2C adapter
i2c-10  i2c             i915 GPIOE                              I2C adapter
i2c-11  i2c             i915 gmbus reserved                     I2C adapter
i2c-12  i2c             i915 gmbus dpd                          I2C adapter
i2c-13  i2c             i915 GPIOF                              I2C adapter
i2c-14  i2c             SDVO DDC proxy                          I2C adapter

And BTW, this is the same list I get on my "server/router/AP" (Intel
D945GSEJT nettop board running 'buntu 11.04) which is also in the same
situation (can't read SPD info).

> Then you can check if devices are seen on the bus:
>
> # i2cdetect 8
>
> If you see anything in address range 0x50 to 0x55, this is likely to be
> SPD EEPROMs. Then you have to make sure that the eeprom module is
> loaded:

   From the above list, buses 3-6 have a value 0x50 at 0x50 like so:
# i2cdetect -y 5
        0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
<snip>
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Though that's probably irrelevant, as it's not the SMBus, if I understand
correctly.


-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Can't read DIMM SPD info (DDR2)
  2011-09-11  9:50     ` Michal Zatloukal
@ 2011-09-11 11:08       ` Jean Delvare
       [not found]         ` <20110911130823.2dff3fab-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Jean Delvare @ 2011-09-11 11:08 UTC (permalink / raw)
  To: Michal Zatloukal; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA

On Sun, 11 Sep 2011 11:50:09 +0200, Michal Zatloukal wrote:
> On Sun, 11 Sep 2011 10:09:45 +0200, Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
> wrote:
> 
> > Hi Michal,
> > ...
> > Second preliminary note: as far as I know, memtest86 reads SPD
> > information using a BIOS call, while decode-dimms gets the information
> > over the SMBus, assuming that SPD EEPROMs are connected to the SMBus
> > and reachable at run time. This difference in access methods can
> > explain why memtest86 can see information and decode-dimms not on the
> > same system.
> 
> Is there a way to do the BIOS call method in Linux? If it's a sort-of
> standard way to access SPD info, would it be the one used by CPU-Z to read
> the SPD info on Windows? (which does work on this HW)

I am not so familiar with this. I seem to recall that BIOS calls are
not easy/safe to use in protected mode on x86, so it might be difficult
or even impossible to do that from user-space. From kernel space,
maybe, I don't know.

It is very possible that it's what CPU-Z is doing. However I don't know
if the author is willing to share his method. A quick web search did
not return anything, but I admit I did not spend too much time on it,
and I am also not so sure what I am looking for.

If anyone ever writes a kernel driver exposing SPD data to user-space,
I will be very happy to update decode-dimms to take benefit of that.

> > First thing to check is if the SMBus on your system is properly found
> > and supported:
> >
> > # modprobe i2c-dev
> > # i2cdetect -l
> >
> > On an Intel system you should see an entry like:
> >
> > i2c-8	smbus     	SMBus I801 adapter at 0400      	SMBus adapter
> 
> Nope. On 'buntu 10.10, I only got 5 entries (didn't write them down), none
> of which said smbus. On 11.10, I get:
> 
> # i2cdetect -l
> i2c-0   i2c             i915 gmbus disabled                     I2C adapter
> i2c-1   i2c             i915 gmbus ssc                          I2C adapter
> i2c-2   i2c             i915 GPIOB                              I2C adapter
> i2c-3   i2c             i915 gmbus vga                          I2C adapter
> i2c-4   i2c             i915 GPIOA                              I2C adapter
> i2c-5   i2c             i915 gmbus panel                        I2C adapter
> i2c-6   i2c             i915 GPIOC                              I2C adapter
> i2c-7   i2c             i915 gmbus dpc                          I2C adapter
> i2c-8   i2c             i915 GPIOD                              I2C adapter
> i2c-9   i2c             i915 gmbus dpb                          I2C adapter
> i2c-10  i2c             i915 GPIOE                              I2C adapter
> i2c-11  i2c             i915 gmbus reserved                     I2C adapter
> i2c-12  i2c             i915 gmbus dpd                          I2C adapter
> i2c-13  i2c             i915 GPIOF                              I2C adapter
> i2c-14  i2c             SDVO DDC proxy                          I2C adapter
> 
> And BTW, this is the same list I get on my "server/router/AP" (Intel
> D945GSEJT nettop board running 'buntu 11.04) which is also in the same
> situation (can't read SPD info).

No SMBus I801 adapter. Is the i2c-i801 driver loaded? Do you see any
complaints in the kernel log (e.g. ACPI resource conflict) when reloading
the i2c-i801 driver?

> > Then you can check if devices are seen on the bus:
> >
> > # i2cdetect 8
> >
> > If you see anything in address range 0x50 to 0x55, this is likely to be
> > SPD EEPROMs. Then you have to make sure that the eeprom module is
> > loaded:
> 
>    From the above list, buses 3-6 have a value 0x50 at 0x50 like so:
> # i2cdetect -y 5
>         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
> <snip>
> 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 
> Though that's probably irrelevant, as it's not the SMBus, if I understand
> correctly.

Most likely the EDID from your screen, you can decode it with:
# modprobe eeprom
$ decode-edid

But that's not what your are looking for.

-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Can't read DIMM SPD info (DDR2)
       [not found]         ` <20110911130823.2dff3fab-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
@ 2011-09-11 12:11           ` Michal Zatloukal
  2011-09-11 12:40             ` Jean Delvare
  0 siblings, 1 reply; 6+ messages in thread
From: Michal Zatloukal @ 2011-09-11 12:11 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA

On Sun, 11 Sep 2011 13:08:23 +0200, Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
wrote:


<snip>
> No SMBus I801 adapter. Is the i2c-i801 driver loaded? Do you see any
> complaints in the kernel log (e.g. ACPI resource conflict) when reloading
> the i2c-i801 driver?

D'oh, that's the whole problem! After loading the i2c-i801 driver, it
works perfectly. Laptop and server. :)
There's no problem loading the driver that I can see, it's simply not
loaded by default.

Sep 11 13:12:55 johny kernel: [391626.148255] i801_smbus 0000:00:1f.3: PCI
INT B -> GSI 19 (level, low) -> IRQ 19

Sep 11 13:10:23 esprimo kernel: [ 6993.108993] i801_smbus 0000:00:1f.3:
PCI INT C -> GSI 19 (level, low) -> IRQ 19

There are some complaints from drm from when I probed the other buses:
Sep 11 13:10:59 esprimo kernel: [ 7029.730036] [drm] GMBUS timed out,
falling back to bit banging on pin 0 [i915 gmbus disabled]
Sep 11 13:11:01 esprimo kernel: [ 7031.120065] [drm] GMBUS timed out,
falling back to bit banging on pin 6 [i915 gmbus reserved]


$ decode-dimms
# decode-dimms version 5733 (2009-06-09 13:13:41 +0200)

Memory Serial Presence Detect Decoder
By Philip Edelbrock, Christian Zuckschwerdt, Burkart Lingner,
Jean Delvare, Trent Piepho and others

Decoding EEPROM: /sys/bus/i2c/drivers/eeprom/15-0050
Guessing DIMM is in                             bank 1

<snip>
Number of SDRAM DIMMs detected and decoded: 2

Thanks for the help.


-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Can't read DIMM SPD info (DDR2)
  2011-09-11 12:11           ` Michal Zatloukal
@ 2011-09-11 12:40             ` Jean Delvare
  0 siblings, 0 replies; 6+ messages in thread
From: Jean Delvare @ 2011-09-11 12:40 UTC (permalink / raw)
  To: Michal Zatloukal; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA

On Sun, 11 Sep 2011 14:11:14 +0200, Michal Zatloukal wrote:
> On Sun, 11 Sep 2011 13:08:23 +0200, Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
> wrote:
> 
> 
> <snip>
> > No SMBus I801 adapter. Is the i2c-i801 driver loaded? Do you see any
> > complaints in the kernel log (e.g. ACPI resource conflict) when reloading
> > the i2c-i801 driver?
> 
> D'oh, that's the whole problem! After loading the i2c-i801 driver, it
> works perfectly. Laptop and server. :)
> There's no problem loading the driver that I can see, it's simply not
> loaded by default.

Ah! Now I remember. Ubuntu? I think they _blacklist_ i2c-i801 for every
machine in the world because it caused problems on one single machine
years ago. Try:
$ /sbin/modprobe -c | grep i801
and I'm sure you'll find a blacklist statement.

So, either delete the blacklist statement in /etc/modprobe.d/* (but it
may come back on system update) or manually load the driver at boot
time (no idea how this is done on Ubuntu, sorry).

And (if I am right) please report this as a BUG to Ubuntu maintainers.
Blacklisting a perfectly working driver needed by millions of users
simply makes no sense. Whatever the problem was, I bet it is solved by
now anyway.

> $ decode-dimms
> # decode-dimms version 5733 (2009-06-09 13:13:41 +0200)
> 
> Memory Serial Presence Detect Decoder
> By Philip Edelbrock, Christian Zuckschwerdt, Burkart Lingner,
> Jean Delvare, Trent Piepho and others
> 
> Decoding EEPROM: /sys/bus/i2c/drivers/eeprom/15-0050
> Guessing DIMM is in                             bank 1
> 
> <snip>
> Number of SDRAM DIMMs detected and decoded: 2

Great! Glad I could help :)

-- 
Jean Delvare
http://khali.linux-fr.org/wishlist.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-09-11 12:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-10 19:19 Can't read DIMM SPD info (DDR2) Michal Zatloukal
2011-09-11  8:09 ` Jean Delvare
     [not found]   ` <20110911100945.73fffa6a-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2011-09-11  9:50     ` Michal Zatloukal
2011-09-11 11:08       ` Jean Delvare
     [not found]         ` <20110911130823.2dff3fab-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2011-09-11 12:11           ` Michal Zatloukal
2011-09-11 12:40             ` Jean Delvare

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.