Joseph Smith wrote:
> Quoting Corey Osgood <[EMAIL PROTECTED]>:
>
>>> So, I tried the
>>> dump_spd_registers(&memctrl[0]);
>>> dump_smbus_registers();
>>> from debug.c and here is the results:
>>> -----------------
>>> LinuxBIOS-2.0.0.0Fallback Sat Aug 11 21:37:10 EDT 2007 starting...
>>>
>>> dimm: 00.0: 50
>>> 00: bad device
>>>
>>> dimm: 01.0: 51
>>> 00: bad device
>>>
>>>
>>> smbus: 69
>>> ----------------
>>>
>>> HELP???
>>>
>>> Thanks - Joe
>>>
>>
>> In the attached debug.c is probe_spd_rom(). If your device has spd, it
>> should be able to find it. You can use the whole file and #include it
>> into the southbridge or mainboard or even northbridge code, or just copy
>> and paste it into somewhere else. Call it whereever you called
>> dump_spd_registers from. Note that it's not magic (yet), it won't
>> actually use found spd locations, you'll have to do that manually. Also,
>> what make/model is your dimm and board (I know you've told me, but my
>> memory is terrible)? The datasheets may have more info, if they're
>> available.
>>
>> -Corey
>>
> So I tried the probe_spd_rom() and it comes back with "bad device".
That's because I messed up and forgot to remove the break, so after
checking the first location, it left the function. It should have (quite
literally) filled your screen with bad device messages, with one message
saying it found an spd rom. In hindsight, it was pretty damn stupid of
me to leave that message there. Try the attached version, it should be
fixed and is even simpler now.
> Which I expected because this line in the function
>
> status = smbus_read_byte(i, 0);
>
> is my whole problem:( The smbus_read_byte function is what is not
> working in raminit.c so why would it work when called from auto.c?? No
> matter what byte I try to read it just comes back with a 0xFF ??
>
> Here is a recap of the hardware:
> RCA RM4100 Embedded Set-top-box
> Low Voltage IntelĀ® CeleronĀ® processor (Micro-FC-BGA) 733MHz
> 128MB PC133 SDRAM on board (Embedded) (In Socket2)
> Intel i82830 (i830M4) Northbridge (Developing)
> Intel i82801DB Southbridge (Using i82801xx)
> SMSC lpc47m192 SuperIO (Using smscsuperio)
>
>
> This is making me crazy, I'm so confused?
>
> Thanks - Joe
>
Essentially what seems to be going on here is the smbus is looking for
data, but it can't find the spd rom. The "bad device" error is trying to
say bad spd device, or at least that's the hope. Better parsing of the
error code (-1 vs -2, etc) could tell us more, but that's the next step
(mainly cuz I'm almost asleep right now). This is exploring stepan's
theory that the device isn't located at the standard 0x50, etc, by
checking the first byte (byte 0) at every address (denoted by i),
through the first 256, and throwing up a message if it finds anything.
Note that just because there's a device found it's not necessarily the
spd rom, but there's a decent chance of it. The other possible problem
is that, since your ram is embedded, there isn't any spd rom at all...
-Corey
static void probe_spd_rom(void)
{
int i, status;
print_debug("\r\n");
for(i = 0; i < 256; i++) {
status = smbus_read_byte(i, 0);
if (status >= 0) {
print_debug("SPD located at 0x");
print_debug_hex8(i);
print_debug("\r\n");
}
}
if (i >= 255) print_debug("No SPD Rom found");
}
--
linuxbios mailing list
[email protected]
http://www.linuxbios.org/mailman/listinfo/linuxbios