1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <console/console.h>
4 #include <device/pci_ops.h>
5 #include <device/smbus_host.h>
9 void dump_spd_registers(void)
12 printk(BIOS_DEBUG
, "\n");
13 for (i
= 0; i
< DIMM_SOCKETS
; i
++) {
18 printk(BIOS_DEBUG
, "DIMM %d: %02x", i
, device
);
19 for (j
= 0; j
< 256; j
++) {
23 printk(BIOS_DEBUG
, "\n%02x: ", j
);
25 status
= smbus_read_byte(device
, j
);
27 printk(BIOS_DEBUG
, "bad device\n");
31 printk(BIOS_DEBUG
, "%02x ", byte
);
33 printk(BIOS_DEBUG
, "\n");
38 void dump_pci_device(unsigned int dev
)
41 printk(BIOS_DEBUG
, "PCI: %02x:%02x.%02x", (dev
>> 20) & 0xff, (dev
>> 15) & 0x1f,
44 for (i
= 0; i
<= 255; i
++) {
46 printk(BIOS_DEBUG
, "\n%02x:", i
);
47 printk(BIOS_DEBUG
, " %02x", pci_read_config8(dev
, i
));
49 printk(BIOS_DEBUG
, "\n");