nb/intel/i945: Refactor `dump_spd_registers` function
Use the mainboard-provided SPD map and skip unused addresses. Change-Id: I2b5b71cff290343c1000d5613209049fa9724e3d Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/51899 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
This commit is contained in:
parent
6c6e049282
commit
a60b42a26a
|
@ -57,11 +57,13 @@ void dump_pci_devices(void)
|
|||
}
|
||||
}
|
||||
|
||||
void dump_spd_registers(void)
|
||||
void dump_spd_registers(u8 spd_map[4])
|
||||
{
|
||||
unsigned int device;
|
||||
device = DIMM0;
|
||||
while (device <= DIMM3) {
|
||||
for (unsigned int d = 0; d < 4; d++) {
|
||||
const unsigned int device = spd_map[d];
|
||||
if (device == 0)
|
||||
continue;
|
||||
|
||||
int status = 0;
|
||||
int i;
|
||||
printk(BIOS_DEBUG, "\ndimm %02x", device);
|
||||
|
@ -76,7 +78,6 @@ void dump_spd_registers(void)
|
|||
}
|
||||
printk(BIOS_DEBUG, "%02x ", status);
|
||||
}
|
||||
device++;
|
||||
printk(BIOS_DEBUG, "\n");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -337,7 +337,7 @@ void i945_late_initialization(int s3resume);
|
|||
void print_pci_devices(void);
|
||||
void dump_pci_device(unsigned int dev);
|
||||
void dump_pci_devices(void);
|
||||
void dump_spd_registers(void);
|
||||
void dump_spd_registers(u8 spd_map[4]);
|
||||
void sdram_dump_mchbar_registers(void);
|
||||
|
||||
u32 decode_igd_memory_size(u32 gms);
|
||||
|
|
|
@ -48,11 +48,11 @@ void mainboard_romstage_entry(void)
|
|||
|
||||
mainboard_pre_raminit_config(s3resume);
|
||||
|
||||
if (CONFIG(DEBUG_RAM_SETUP))
|
||||
dump_spd_registers();
|
||||
|
||||
mainboard_get_spd_map(spd_map);
|
||||
|
||||
if (CONFIG(DEBUG_RAM_SETUP))
|
||||
dump_spd_registers(spd_map);
|
||||
|
||||
sdram_initialize(s3resume ? BOOT_PATH_RESUME : BOOT_PATH_NORMAL, spd_map);
|
||||
|
||||
/* This should probably go away. Until now it is required
|
||||
|
|
Loading…
Reference in New Issue