Author: oxygene Date: Fri Feb 12 00:00:10 2010 New Revision: 5119 URL: http://tracker.coreboot.org/trac/coreboot/changeset/5119
Log: Fix AUTO_XIP_ROM_BASE issues on AMD boards with certain compilers, and expose the error earlier in the build.
Signed-off-by: Patrick Georgi patrick.georgi@coresystems.de Acked-by: Patrick Georgi patrick.georgi@coresystems.de
Modified: trunk/src/arch/i386/Makefile.inc trunk/src/cpu/amd/mtrr/amd_earlymtrr.c trunk/src/cpu/x86/mtrr/earlymtrr.c
Modified: trunk/src/arch/i386/Makefile.inc ============================================================================== --- trunk/src/arch/i386/Makefile.inc Thu Feb 11 22:51:04 2010 (r5118) +++ trunk/src/arch/i386/Makefile.inc Fri Feb 12 00:00:10 2010 (r5119) @@ -87,8 +87,10 @@ $(CC) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(src) -I. -c -S $(src)/mainboard/$(MAINBOARDDIR)/ap_romstage.c -o $@
$(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc: $(src)/mainboard/$(MAINBOARDDIR)/romstage.c $(OPTION_TABLE_H) $(obj)/build.h - $(CC) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -include $(obj)/build.h -I$(src) -I. -c -S $< -o - | sed -e 's/.rodata/.rom.data/g' -e 's/.text/.section .rom.text/g' > $@.tmp + $(CC) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -include $(obj)/build.h -I$(src) -I. -c -S $< -o $@.tmp1 + sed -e 's/.rodata/.rom.data/g' -e 's/.text/.section .rom.text/g' $@.tmp1 > $@.tmp mv $@.tmp $@ + rm -f $@.tmp1 endif endif
Modified: trunk/src/cpu/amd/mtrr/amd_earlymtrr.c ============================================================================== --- trunk/src/cpu/amd/mtrr/amd_earlymtrr.c Thu Feb 11 22:51:04 2010 (r5118) +++ trunk/src/cpu/amd/mtrr/amd_earlymtrr.c Fri Feb 12 00:00:10 2010 (r5119) @@ -43,6 +43,7 @@
#if defined(CONFIG_XIP_ROM_SIZE) #if defined(CONFIG_TINY_BOOTBLOCK) && CONFIG_TINY_BOOTBLOCK +extern unsigned long AUTO_XIP_ROM_BASE; #define REAL_XIP_ROM_BASE AUTO_XIP_ROM_BASE #else #define REAL_XIP_ROM_BASE CONFIG_XIP_ROM_BASE
Modified: trunk/src/cpu/x86/mtrr/earlymtrr.c ============================================================================== --- trunk/src/cpu/x86/mtrr/earlymtrr.c Thu Feb 11 22:51:04 2010 (r5118) +++ trunk/src/cpu/x86/mtrr/earlymtrr.c Fri Feb 12 00:00:10 2010 (r5119) @@ -101,6 +101,7 @@
#if defined(CONFIG_XIP_ROM_SIZE) #if defined(CONFIG_TINY_BOOTBLOCK) && CONFIG_TINY_BOOTBLOCK +extern unsigned long AUTO_XIP_ROM_BASE; #define REAL_XIP_ROM_BASE AUTO_XIP_ROM_BASE #else #define REAL_XIP_ROM_BASE CONFIG_XIP_ROM_BASE