- 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,24 +116,28 @@ 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;
device = SMBUS_MEM_DEVICE_START;
print_debug("\r\n");
while(device <= SMBUS_MEM_DEVICE_END) {
int i; int i;
print_debug("\r\n");
for(i = 0; i < 4; i++) {
unsigned device;
device = ctrl->channel0[i];
if (device) {
int j;
print_debug("dimm: "); print_debug("dimm: ");
print_debug_hex8(i);
print_debug(".0: ");
print_debug_hex8(device); print_debug_hex8(device);
for(i = 0; i < 256; i++) { for(j = 0; j < 256; j++) {
int status; int status;
unsigned char byte; unsigned char byte;
if ((i & 0xf) == 0) { if ((j & 0xf) == 0) {
print_debug("\r\n"); print_debug("\r\n");
print_debug_hex8(i); print_debug_hex8(j);
print_debug(": "); print_debug(": ");
} }
status = smbus_read_byte(device, i); status = smbus_read_byte(device, j);
if (status < 0) { if (status < 0) {
print_debug("bad device\r\n"); print_debug("bad device\r\n");
break; break;
@ -142,14 +146,48 @@ static void dump_spd_registers(void)
print_debug_hex8(byte); print_debug_hex8(byte);
print_debug_char(' '); print_debug_char(' ');
} }
device += SMBUS_MEM_DEVICE_INC;
print_debug("\r\n"); print_debug("\r\n");
} }
device = ctrl->channel1[i];
if (device) {
int j;
print_debug("dimm: ");
print_debug_hex8(i);
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");
}
}
} }
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)
{ {
if (do_normal_boot()) {
/* Nothing special needs to be done to find bus 0 */ /* Nothing special needs to be done to find bus 0 */
/* Allow the HT devices to be found */ /* Allow the HT devices to be found */
enumerate_ht_chain(); enumerate_ht_chain();
/* Setup the 8111 */ /* Setup the 8111 */
amd8111_enable_rom(); amd8111_enable_rom();
if (do_normal_boot()) {
/* Jump to the normal image */ /* Jump to the normal image */
asm("jmp __normal_image"); asm("jmp __normal_image");
} }