[coreboot] [PATCH] more fake SPD debugging

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Wed Mar 5 14:38:54 CET 2008


On 05.03.2008 07:23, ron minnich wrote:
> attached. It dies and I'm sure it is bad ram settings, but it's a start.
>   

Yes. Try the following patch.

Add debugging to fake SPD read functions. We want to know when we try to 
read from a nonexisting member of the fake SPD.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>

Index: LinuxBIOSv3-spd_debug/mainboard/artecgroup/dbe61/initram.c
===================================================================
--- LinuxBIOSv3-spd_debug/mainboard/artecgroup/dbe61/initram.c	(Revision 631)
+++ LinuxBIOSv3-spd_debug/mainboard/artecgroup/dbe61/initram.c	(Arbeitskopie)
@@ -97,7 +97,7 @@
 	/* returns 0xFF on any failures */
 	u8 ret = 0xff;
 
-	printk(BIOS_DEBUG, "spd_read_byte dev %04x\n", device);
+	printk(BIOS_DEBUG, "spd_read_byte dev %04x", device);
 	if (device == DIMM0) {
 		for (i = 0; i < ARRAY_SIZE(spd_table); i++) {
 			if (spd_table[i].address == address) {
@@ -105,6 +105,9 @@
 			}
 		}
 	}
+	if (i == ARRAY_SIZE(spd_table))
+		printk(BIOS_DEBUG, " addr %02x does not exist in SPD table",
+			address);
 
 	printk(BIOS_DEBUG, " addr %02x returns %02x\n", address, ret);
 	return ret;
Index: LinuxBIOSv3-spd_debug/mainboard/artecgroup/dbe62/initram.c
===================================================================
--- LinuxBIOSv3-spd_debug/mainboard/artecgroup/dbe62/initram.c	(Revision 631)
+++ LinuxBIOSv3-spd_debug/mainboard/artecgroup/dbe62/initram.c	(Arbeitskopie)
@@ -87,7 +87,7 @@
 	/* returns 0xFF on any failures */
 	u8 ret = 0xff;
 
-	printk(BIOS_DEBUG, "spd_read_byte dev %04x\n", device);
+	printk(BIOS_DEBUG, "spd_read_byte dev %04x", device);
 	if (device == DIMM0) {
 		for (i = 0; i < ARRAY_SIZE(spd_table); i++) {
 			if (spd_table[i].address == address) {
@@ -95,6 +95,9 @@
 			}
 		}
 	}
+	if (i == ARRAY_SIZE(spd_table))
+		printk(BIOS_DEBUG, " addr %02x does not exist in SPD table",
+			address);
 
 	printk(BIOS_DEBUG, " addr %02x returns %02x\n", address, ret);
 	return ret;
Index: LinuxBIOSv3-spd_debug/mainboard/pcengines/alix1c/initram.c
===================================================================
--- LinuxBIOSv3-spd_debug/mainboard/pcengines/alix1c/initram.c	(Revision 631)
+++ LinuxBIOSv3-spd_debug/mainboard/pcengines/alix1c/initram.c	(Arbeitskopie)
@@ -97,7 +97,7 @@
 	/* returns 0xFF on any failures */
 	u8 ret = 0xff;
 
-	printk(BIOS_DEBUG, "spd_read_byte dev %04x\n", device);
+	printk(BIOS_DEBUG, "spd_read_byte dev %04x", device);
 	if (device == DIMM0) {
 		for (i = 0; i < ARRAY_SIZE(spd_table); i++) {
 			if (spd_table[i].address == address) {
@@ -105,6 +105,9 @@
 			}
 		}
 	}
+	if (i == ARRAY_SIZE(spd_table))
+		printk(BIOS_DEBUG, " addr %02x does not exist in SPD table",
+			address);
 
 	printk(BIOS_DEBUG, " addr %02x returns %02x\n", address, ret);
 	return ret;


-- 
http://www.hailfinger.org/





More information about the coreboot mailing list