From 6a1b0161842cbc53035877c73f1ae9a2f6f65810 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Sun, 22 Feb 2026 17:08:27 +0100 Subject: [PATCH] nb/intel/haswell: Tidy up memory info prints Be consistent when printing the channel assignment, and use unsigned printf specifiers since the values themselves are unsigned. Change-Id: I66b93233707dec73dc7a25423789a24770ac678f Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/91376 Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier Reviewed-by: Paul Menzel Reviewed-by: Benjamin Doron --- src/northbridge/intel/haswell/raminit_shared.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/northbridge/intel/haswell/raminit_shared.c b/src/northbridge/intel/haswell/raminit_shared.c index 6fcb0ec98a..1e6394da77 100644 --- a/src/northbridge/intel/haswell/raminit_shared.c +++ b/src/northbridge/intel/haswell/raminit_shared.c @@ -36,7 +36,7 @@ void report_memory_config(void) printk(BIOS_DEBUG, "memcfg DDR3 clock %d MHz\n", DIV_ROUND_CLOSEST(mchbar_read32(MC_BIOS_DATA) * 13333 * 2, 100)); - printk(BIOS_DEBUG, "memcfg channel assignment: A: %d, B % d, C % d\n", + printk(BIOS_DEBUG, "memcfg channel assignment: A: %u, B: %u, C: %u\n", (addr_decoder_common >> 0) & 3, (addr_decoder_common >> 2) & 3, (addr_decoder_common >> 4) & 3); @@ -44,7 +44,7 @@ void report_memory_config(void) for (unsigned int i = 0; i < NUM_CHANNELS; i++) { const uint32_t ch_conf = mchbar_read32(MAD_DIMM(i)); - printk(BIOS_DEBUG, "memcfg channel[%d] config (%8.8x):\n", i, ch_conf); + printk(BIOS_DEBUG, "memcfg channel[%u] config (%8.8x):\n", i, ch_conf); printk(BIOS_DEBUG, " ECC %s\n", ecc_decoder[(ch_conf >> 24) & 3]); printk(BIOS_DEBUG, " enhanced interleave mode %s\n", ((ch_conf >> 22) & 1) ? "on" : "off"); @@ -52,13 +52,13 @@ void report_memory_config(void) printk(BIOS_DEBUG, " rank interleave %s\n", ((ch_conf >> 21) & 1) ? "on" : "off"); - printk(BIOS_DEBUG, " DIMMA %d MB width %s %s rank%s\n", + printk(BIOS_DEBUG, " DIMMA %u MB width %s %s rank%s\n", ((ch_conf >> 0) & 0xff) * 256, ((ch_conf >> 19) & 1) ? "x16" : "x8 or x32", ((ch_conf >> 17) & 1) ? "dual" : "single", ((ch_conf >> 16) & 1) ? "" : ", selected"); - printk(BIOS_DEBUG, " DIMMB %d MB width %s %s rank%s\n", + printk(BIOS_DEBUG, " DIMMB %u MB width %s %s rank%s\n", ((ch_conf >> 8) & 0xff) * 256, ((ch_conf >> 20) & 1) ? "x16" : "x8 or x32", ((ch_conf >> 18) & 1) ? "dual" : "single",