OK, here is where I am.
Here is the start of the key function
in src/northbridge/via/vt8601/raminit.c
static void sdram_set_registers(const struct mem_controller *ctrl) {
static const uint16_t raminit_ma_reg_table[] = {
/* Values for MA type register to try */
0x0000, 0x8088, 0xe0ee,
0xffff // end mark
};
device_t north = 0;
uint8_t c, r;
print_err("vt8601 init starting\n");
north = pci_locate_device(PCI_ID(0x1106, 0x8601), 0);
print_err_hex32(north);
print_err(" is the north\n");
print_err_hex16(pci_read_config16(north, 0));
print_err(" ");
print_err_hex16(pci_read_config16(north, 2));
print_err("\r\n");
// memory clk enable. We are not using ECC
pci_write_config8(north,0x78, 0x01);
print_err_hex8(pci_read_config8(north, 0x78));
.
.
.
Here's what is going wrong.
LinuxBIOS-1.1.4.0Fallback Fri Sep 26 16:44:17 MDT 2003 starting...
SMBus controller enabled
vt8601 init starting
00000800 is the north
1106 8601
00
That 00 is the result of reading register 78. Note that I tried to set it
to 1.
Somehow, none of my config writes to any register are working. Not one.
The reads read back fine. That 1106/8601 you see is the result of a config
read from the north bridge. But the writes all fail.
Any idea why this would be? Seems like something is locked somehow. I've
looked at the assembly code and it actually looks ok. This is pretty odd.
The sequence of writes is taken directly from the V1 code.
here's a dump of the north bridge after ALL the writes have been tried.
00:06 11 01 86 07 00 30 02 00 00 04 06 00 00 01 00
10:00 00 00 00 00 00 00 00 00 00 00 00 f0 00 00 00
20:f0 ff 00 00 f0 ff 00 00 00 00 00 00 00 00 00 00
30:00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 00
40:00 00 00 22 00 00 00 00 00 00 00 00 00 00 00 00
50:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80:01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00
90:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
One thing I definitely don't understand: why is the north 00000800? I
would have expected it to be 0. But it works: reads from 'north' return
sensible values. Still ...
thanks
ron