On Fri, Mar 12, 2010 at 7:08 PM, Joseph Smith <joe@settoplinux.org> wrote:
On 03/12/2010 06:07 PM, ron minnich wrote:
On Fri, Mar 12, 2010 at 2:55 PM, Keith Hui<buurin@gmail.com>  wrote:

If we go through all the Kconfigs for all 440BX boards and identify all that
have 4 slots, and enter this setting for all of them, done before my 440BX
ram init code is ready. ;-) There is a reason for expert mode, no?

I think this goes beyond expert mode. It seems to me it is a setting
that can render the machine unbootable if configured incorrectly. Even
for experts, I don't think it should be visible in Kconfig.

has anyone even tested this yet???

>> slot4_detect = (spd_read_byte((DIMM_SPD_BASE + 3), SPD_MEMORY_TYPE);
>>
>> if (slot4_detect != 0xff) {
>>
>>      /* We have 4 slots */
>>      ----Set bit 4 in SDRAMPWR----
>>      #define DIMM_SOCKETS 4
>> } else {
>>
>>      /* We have 3 slots */
>>      ----Set bit 4 in SDRAMPWR----
>>      #define DIMM_SOCKETS 3
>> }
>>

You put a #define inside a actual code branch? I highly doubt if that would work AT ALL. :-)

And this code will fail on any 4-DIMM boards without a stick installed in slot 3.

There is a possibility that a board would have 3 DIMM slots, yet only wired for GCKE. I doubt any manufacturer would actually do that, but still a possibility. Dumping the BX configuration space with factory BIOS installed still provides the most authoritative answer.

We currently have support for about 15 440BX mainboards. If someone can go through them and get the correct SDRAMPWR setting for all of them that we don't already know - especially those with 3 DIMM slots, I'll code this setting for all of them and get it out of sight.

Thanks
Keith