From aaea9aacab17588f62fca094ed6704da54878906 Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Fri, 1 Aug 2008 19:39:13 +0000 Subject: [PATCH] The Geode LX RAMinit code already has textual register names in the debug routine. Use them for printout. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Peter Stuge git-svn-id: svn://coreboot.org/repository/coreboot-v3@708 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- northbridge/amd/geodelx/raminit.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/northbridge/amd/geodelx/raminit.c b/northbridge/amd/geodelx/raminit.c index cd68110c4b..b13ffde313 100644 --- a/northbridge/amd/geodelx/raminit.c +++ b/northbridge/amd/geodelx/raminit.c @@ -41,7 +41,6 @@ u8 spd_read_byte(u16 device, u8 address); * compare to a factory BIOS setting. * @param level printk level */ - void dumplxmsrs(void) { const static unsigned long msrs[] = { @@ -64,13 +63,15 @@ void dumplxmsrs(void) }; int i; - for(i = 0; i < sizeof(msrs)/sizeof(msrs[0]); i++){ + for (i = 0; i < ARRAY_SIZE(msrs); i++) { struct msr msr; msr = rdmsr(msrs[i]); - printk(BIOS_DEBUG, "(%lx): %x.%x\n", msrs[i], msr.hi, msr.lo); + printk(BIOS_DEBUG, "%s (%lx): %x.%x\n", msrnames[i], msrs[i], + msr.hi, msr.lo); } } + /** * Halt and Catch Fire. Print an error, then loop, sending NULLs on * serial port, to ensure the message is visible.