- Solo updates

git-svn-id: svn://svn.coreboot.org/coreboot/trunk@952 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Eric Biederman 2003-07-12 01:44:36 +00:00
parent 34cadde255
commit c24a568551
2 changed files with 71 additions and 34 deletions

View File

@ -116,40 +116,78 @@ static void dump_pci_device(unsigned dev)
} }
} }
static void dump_spd_registers(void) static void dump_spd_registers(const struct mem_controller *ctrl)
{ {
unsigned device; int i;
device = SMBUS_MEM_DEVICE_START;
print_debug("\r\n"); print_debug("\r\n");
while(device <= SMBUS_MEM_DEVICE_END) { for(i = 0; i < 4; i++) {
int i; unsigned device;
print_debug("dimm: "); device = ctrl->channel0[i];
print_debug_hex8(device); if (device) {
for(i = 0; i < 256; i++) { int j;
int status; print_debug("dimm: ");
unsigned char byte; print_debug_hex8(i);
if ((i & 0xf) == 0) { print_debug(".0: ");
print_debug("\r\n"); print_debug_hex8(device);
print_debug_hex8(i); for(j = 0; j < 256; j++) {
print_debug(": "); int status;
unsigned char byte;
if ((j & 0xf) == 0) {
print_debug("\r\n");
print_debug_hex8(j);
print_debug(": ");
}
status = smbus_read_byte(device, j);
if (status < 0) {
print_debug("bad device\r\n");
break;
}
byte = status & 0xff;
print_debug_hex8(byte);
print_debug_char(' ');
} }
status = smbus_read_byte(device, i); print_debug("\r\n");
if (status < 0) { }
print_debug("bad device\r\n"); device = ctrl->channel1[i];
break; if (device) {
} int j;
byte = status & 0xff; print_debug("dimm: ");
print_debug_hex8(byte); print_debug_hex8(i);
print_debug_char(' '); print_debug(".1: ");
print_debug_hex8(device);
for(j = 0; j < 256; j++) {
int status;
unsigned char byte;
if ((j & 0xf) == 0) {
print_debug("\r\n");
print_debug_hex8(j);
print_debug(": ");
}
status = smbus_read_byte(device, j);
if (status < 0) {
print_debug("bad device\r\n");
break;
}
byte = status & 0xff;
print_debug_hex8(byte);
print_debug_char(' ');
}
print_debug("\r\n");
} }
device += SMBUS_MEM_DEVICE_INC;
print_debug("\r\n");
} }
} }
static void main(void) static void main(void)
{ {
static const struct mem_controller cpu0 = {
.f0 = PCI_DEV(0, 0x18, 0),
.f1 = PCI_DEV(0, 0x18, 1),
.f2 = PCI_DEV(0, 0x18, 2),
.f3 = PCI_DEV(0, 0x18, 3),
.channel0 = { (0xa << 3), (0xa << 3)|1, 0, 0 },
.channel1 = { 0, 0, 0, 0},
};
uart_init(); uart_init();
console_init(); console_init();
#if 0 #if 0
@ -165,9 +203,9 @@ static void main(void)
enumerate_ht_chain(); enumerate_ht_chain();
print_pci_devices(); print_pci_devices();
enable_smbus(); enable_smbus();
sdram_initialize(); dump_spd_registers(&cpu0);
sdram_initialize(&cpu0);
dump_spd_registers();
dump_pci_device(PCI_DEV(0, 0x18, 2)); dump_pci_device(PCI_DEV(0, 0x18, 2));
/* Check the first 512M */ /* Check the first 512M */

View File

@ -9,15 +9,14 @@
static void main(void) static void main(void)
{ {
/* Nothing special needs to be done to find bus 0 */
/* Allow the HT devices to be found */
enumerate_ht_chain();
/* Setup the 8111 */
amd8111_enable_rom();
if (do_normal_boot()) { if (do_normal_boot()) {
/* Nothing special needs to be done to find bus 0 */
/* Allow the HT devices to be found */
enumerate_ht_chain();
/* Setup the 8111 */
amd8111_enable_rom();
/* Jump to the normal image */ /* Jump to the normal image */
asm("jmp __normal_image"); asm("jmp __normal_image");
} }