soc/intel/mtl: Choose serial msg `log_level` based on DIMM count

This patch modifies the serial msg log_level at runtime to highlight
an ERROR if the DIMM count is zero. It would help to draw the
attention while parsing the serial msg and catch any underlying issue.

TEST=Able to see ERROR msg while booting google/rex with FSP v3064

Without this patch:
    [DEBUG]  0 DIMMs found

With this patch:
    [ERROR]  No DIMMs found

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: Iacf41efecb4962f91cf322bbc50636dc44033e3e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73756
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Subrata Banik 2023-03-16 18:25:45 +05:30
parent 7877ceda9e
commit ecb4a24eaa
1 changed files with 4 additions and 1 deletions

View File

@ -114,7 +114,10 @@ static void save_dimm_info(void)
}
}
mem_info->dimm_cnt = index;
printk(BIOS_DEBUG, "%d DIMMs found\n", mem_info->dimm_cnt);
if (mem_info->dimm_cnt == 0)
printk(BIOS_ERR, "No DIMMs found\n");
else
printk(BIOS_DEBUG, "%d DIMMs found\n", mem_info->dimm_cnt);
}
void mainboard_romstage_entry(void)