Author: stepan Date: Tue Mar 30 23:52:05 2010 New Revision: 5335 URL: https://tracker.coreboot.org/trac/coreboot/changeset/5335
Log: get coreboot_ap memory training in cache mechanism in place. Didn't work since Kconfig (needs more patches to ap_romstage.c but this is a first step)
Signed-off-by: Stefan Reinauer stepan@coresystems.de Acked-by: Stefan Reinauer stepan@coresystems.de
Deleted: trunk/src/arch/i386/coreboot_apc.ld Modified: trunk/src/arch/i386/Makefile.inc trunk/src/arch/i386/init/ldscript_apc.lb trunk/src/cpu/amd/car/copy_and_run.c
Modified: trunk/src/arch/i386/Makefile.inc ============================================================================== --- trunk/src/arch/i386/Makefile.inc Tue Mar 30 23:48:23 2010 (r5334) +++ trunk/src/arch/i386/Makefile.inc Tue Mar 30 23:52:05 2010 (r5335) @@ -22,12 +22,16 @@ ifeq ($(CONFIG_BOOTSPLASH),y) COREBOOT_ROM_DEPENDENCIES+=$(CONFIG_FALLBACK_BOOTSPLASH_FILE) endif +ifeq ($(CONFIG_AP_CODE_IN_CAR),y) +COREBOOT_ROM_DEPENDENCIES+=$(obj)/coreboot_ap +endif + $(obj)/coreboot.rom: $(obj)/coreboot.pre $(obj)/coreboot_ram $(CBFSTOOL) $(call strip_quotes,$(COREBOOT_ROM_DEPENDENCIES)) printf " CBFS $(subst $(obj)/,,$(@))\n" cp $(obj)/coreboot.pre $@.tmp - if [ -f fallback/coreboot_apc ]; \ + if [ -f $(obj)/coreboot_ap ]; \ then \ - $(CBFSTOOL) $@.tmp add-stage fallback/coreboot_apc $(CONFIG_CBFS_PREFIX)/coreboot_apc $(CBFS_COMPRESS_FLAG); \ + $(CBFSTOOL) $@.tmp add-stage $(obj)/coreboot_ap $(CONFIG_CBFS_PREFIX)/coreboot_ap $(CBFS_COMPRESS_FLAG); \ fi $(CBFSTOOL) $@.tmp add-stage $(obj)/coreboot_ram $(CONFIG_CBFS_PREFIX)/coreboot_ram $(CBFS_COMPRESS_FLAG) ifeq ($(CONFIG_PAYLOAD_NONE),y) @@ -81,6 +85,19 @@ $(AR) cr $(obj)/coreboot.a $^
####################################################################### +# coreboot_ap.rom + +ifeq ($(CONFIG_AP_CODE_IN_CAR),y) + +$(obj)/coreboot_ap: $(obj)/mainboard/$(MAINBOARDDIR)/ap_romstage.o + @printf " CC $(subst $(obj)/,,$(@))\n" + $(CC) -nostdlib -nostartfiles -static -o $@ -L$(obj) -T $(src)/arch/i386/init/ldscript_apc.lb $^ + $(NM) -n $(obj)/coreboot_ap | sort > $(obj)/coreboot_ap.map + + +endif + +####################################################################### # done
crt0s = @@ -174,10 +191,6 @@ crt0s += $(src)/cpu/x86/mmx_disable.inc endif
-ifeq ($(CONFIG_AP_CODE_IN_CAR),y) -ldscripts += $(src)/arch/i386/init/ldscript_apc.lb -endif - ifeq ($(CONFIG_BIG_BOOTBLOCK),y) crt0s += $(chipset_bootblock_inc) ldscripts += $(chipset_bootblock_lds) @@ -198,7 +211,7 @@
$(obj)/mainboard/$(MAINBOARDDIR)/ap_romstage.o: $(src)/mainboard/$(MAINBOARDDIR)/ap_romstage.c $(OPTION_TABLE_H) @printf " CC $(subst $(obj)/,,$(@))\n" - $(CC) -MMD $(CFLAGS) -I$(src) -I. -c -S $(src)/mainboard/$(MAINBOARDDIR)/ap_romstage.c -o $@ + $(CC) -MMD $(CFLAGS) -I$(src) -I. -c $(src)/mainboard/$(MAINBOARDDIR)/ap_romstage.c -o $@
$(obj)/mainboard/$(MAINBOARDDIR)/romstage.pre.inc: $(src)/mainboard/$(MAINBOARDDIR)/romstage.c $(OPTION_TABLE_H) $(obj)/build.h printf " CC romstage.inc\n"
Modified: trunk/src/arch/i386/init/ldscript_apc.lb ============================================================================== --- trunk/src/arch/i386/init/ldscript_apc.lb Tue Mar 30 23:48:23 2010 (r5334) +++ trunk/src/arch/i386/init/ldscript_apc.lb Tue Mar 30 23:52:05 2010 (r5335) @@ -1,9 +1,12 @@ -INPUT(coreboot_apc.rom) +/* INPUT(coreboot_ap.rom)*/ +INCLUDE "ldoptions" SECTIONS { .apcrom . : { _apcrom = .; - coreboot_apc.rom(*) + *(.text) + *(.rodata) + *(.rodata.*) _eapcrom = .; } _iseg_apc = CONFIG_DCACHE_RAM_BASE;
Modified: trunk/src/cpu/amd/car/copy_and_run.c ============================================================================== --- trunk/src/cpu/amd/car/copy_and_run.c Tue Mar 30 23:48:23 2010 (r5334) +++ trunk/src/cpu/amd/car/copy_and_run.c Tue Mar 30 23:52:05 2010 (r5335) @@ -14,6 +14,6 @@
static void copy_and_run_ap_code_in_car(unsigned ret_addr) { - cbfs_and_run_core(CONFIG_CBFS_PREFIX "/coreboot_apc", ret_addr); + cbfs_and_run_core(CONFIG_CBFS_PREFIX "/coreboot_ap", ret_addr); } #endif