[coreboot-gerrit] Patch set updated for coreboot: [DON'T MERGE] Investigating CL #16987

Jonathan Neuschäfer (j.neuschaefer@gmx.net) gerrit at coreboot.org
Thu Oct 20 20:14:19 CEST 2016


Jonathan Neuschäfer (j.neuschaefer at gmx.net) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17060

-gerrit

commit c71dc80c9c5d84d81ef5cf58c5f9206bd05dbf3e
Author: Jonathan Neuschäfer <j.neuschaefer at gmx.net>
Date:   Wed Oct 19 02:18:54 2016 +0200

    [DON'T MERGE] Investigating CL #16987
    
    https://review.coreboot.org/#/c/16987/ results in a crash in AMDFWTOOL
    for some boards, on jenkins. With this patch, I try to figure out what's
    going on.
    
    Change-Id: Ic36b8be2b0ee458311dcc8e9139df2b4d113b4ba
    Signed-off-by: Jonathan Neuschäfer <j.neuschaefer at gmx.net>
---
 Makefile.inc                               | 2 +-
 src/mainboard/emulation/Kconfig            | 1 +
 src/southbridge/amd/pi/hudson/Makefile.inc | 3 +++
 util/abuild/abuild                         | 2 +-
 util/amdfwtool/amdfwtool.c                 | 4 ++++
 5 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/Makefile.inc b/Makefile.inc
index 127f372..f95488c 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -487,7 +487,7 @@ $(IFDFAKE): $(top)/util/ifdfake/ifdfake.c
 AMDFWTOOL:=$(objutil)/amdfwtool/amdfwtool
 $(AMDFWTOOL): $(top)/util/amdfwtool/amdfwtool.c
 	@printf "    HOSTCC     $(subst $(obj)/,,$(@))\n"
-	$(HOSTCC) $(HOSTCFLAGS) -DCONFIG_ROM_SIZE=$(CONFIG_ROM_SIZE) -o $@ $<
+	$(HOSTCC) $(HOSTCFLAGS) -fsanitize=address -DCONFIG_ROM_SIZE=$(CONFIG_ROM_SIZE) -o $@ $<
 
 CBOOTIMAGE:=$(objutil)/cbootimage/cbootimage
 
diff --git a/src/mainboard/emulation/Kconfig b/src/mainboard/emulation/Kconfig
index 1dc89ca..bd0a807 100644
--- a/src/mainboard/emulation/Kconfig
+++ b/src/mainboard/emulation/Kconfig
@@ -2,6 +2,7 @@ if VENDOR_EMULATION
 
 choice
 	prompt "Mainboard model"
+	#default BOARD_EMULATION_QEMU_X86_I440FX
 
 source "src/mainboard/emulation/*/Kconfig.name"
 
diff --git a/src/southbridge/amd/pi/hudson/Makefile.inc b/src/southbridge/amd/pi/hudson/Makefile.inc
index 291e25f..107be69 100644
--- a/src/southbridge/amd/pi/hudson/Makefile.inc
+++ b/src/southbridge/amd/pi/hudson/Makefile.inc
@@ -206,6 +206,8 @@ $(obj)/amdfw.rom:	$(call strip_quotes, $(CONFIG_HUDSON_XHCI_FWM_FILE)) \
 			$(AMDFWTOOL)
 	rm -f $@
 	@printf "    AMDFWTOOL  $(subst $(obj)/,,$(@))\n"
+	@printf " HOSTCC version: "
+	$(HOSTCC) --version
 	$(AMDFWTOOL) \
 		$(OPT_HUDSON_XHCI_FWM_FILE) \
 		$(OPT_HUDSON_IMC_FWM_FILE) \
@@ -235,6 +237,7 @@ $(obj)/amdfw.rom:	$(call strip_quotes, $(CONFIG_HUDSON_XHCI_FWM_FILE)) \
 		$(OPT_2SMUFIRMWARE2_FILE) \
 		$(OPT_2SMUSCS_FILE) \
 		--output	$@
+	please_fail_here
 
 cbfs-files-y += apu/amdfw
 apu/amdfw-file := $(obj)/amdfw.rom
diff --git a/util/abuild/abuild b/util/abuild/abuild
index a2a428b..8fa62dc 100755
--- a/util/abuild/abuild
+++ b/util/abuild/abuild
@@ -671,7 +671,7 @@ else
 	junit '<testsuite>'
 	if [ "$mode" != "text" ]; then
 		for xmlfile in $TARGET/abuild/*_*.xml; do
-			cat $xmlfile >> $REAL_XMLFILE
+			cat $xmlfile | tr -d '\0' >> $REAL_XMLFILE
 		done
 	fi
 	XMLFILE=$REAL_XMLFILE
diff --git a/util/amdfwtool/amdfwtool.c b/util/amdfwtool/amdfwtool.c
index 3dff2ac..cb4687d 100644
--- a/util/amdfwtool/amdfwtool.c
+++ b/util/amdfwtool/amdfwtool.c
@@ -391,6 +391,9 @@ int main(int argc, char **argv)
 	int targetfd;
 	char *output;
 
+	FILE *tty = stderr;
+
+	fprintf(tty, "#0 AMDFWTOOL: allocating rom, %u bytes\n", CONFIG_ROM_SIZE);
 	rom = malloc(CONFIG_ROM_SIZE);
 	memset (rom, 0xFF, CONFIG_ROM_SIZE);
 	if (!rom) {
@@ -542,6 +545,7 @@ int main(int argc, char **argv)
 		amd_romsig[4] = current + ROM_BASE_ADDRESS;
 
 		current += 0x200;	/* Conservative size of pspdir */
+		fprintf(tty, "#0 ANDFWTOOL: calling integrate_psp_firmwares at %u\n", current);
 		current = integrate_psp_firmwares(rom, current, pspdir, amd_psp_fw_table);
 	}
 



More information about the coreboot-gerrit mailing list