From 0f84878c89d249dfa902d201d83cd6dc228defd7 Mon Sep 17 00:00:00 2001 From: Tony Huang Date: Wed, 30 Jul 2025 08:36:16 +0800 Subject: [PATCH] mb/google/brox: Handle NULL return value in variant_get_auxfw_version_file When bundled fw is NULL the system boot hangs. Add a judgement to return mismatch when bundled fw is NULL. BUG=b:434844512 BRANCH=firmware-brox-16080.B TEST=emerge-brox coreboot set FW_CONFIG=STORAGE_NVME and DUT can boot into OS Change-Id: Ibe81e944725b8c387c61451c2e422d57f7aeb8c1 Signed-off-by: Tony Huang Reviewed-on: https://review.coreboot.org/c/coreboot/+/88606 Tested-by: build bot (Jenkins) Reviewed-by: Jon Murphy Reviewed-by: Karthik Ramasubramanian --- src/mainboard/google/brox/variants/baseboard/brox/romstage.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mainboard/google/brox/variants/baseboard/brox/romstage.c b/src/mainboard/google/brox/variants/baseboard/brox/romstage.c index 6a03a9ae46..ce402af933 100644 --- a/src/mainboard/google/brox/variants/baseboard/brox/romstage.c +++ b/src/mainboard/google/brox/variants/baseboard/brox/romstage.c @@ -30,6 +30,10 @@ static bool check_auxfw_ver_mismatch(void) cur_major_ver = (pd_chip_r.fw_version_number >> 16) & 0xFF; is_productionfw = !!(cur_major_ver & 0xF0); + /* check whether bundled fw is NULL */ + if (!fwver_fname) + return mismatch; + /* find bundled fw hash */ new_ver = cbfs_map(fwver_fname, &new_ver_size); if (new_ver == NULL || new_ver_size != FWVER_SIZE)