[coreboot-gerrit] New patch to review for coreboot: arch/x86: Move postcar stage commands into place

Lee Leahy (leroy.p.leahy@intel.com) gerrit at coreboot.org
Mon Jul 25 21:39:15 CEST 2016


Lee Leahy (leroy.p.leahy at intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15844

-gerrit

commit c3150174bf0cadfd16a26aa779b2483022f8ec91
Author: Lee Leahy <leroy.p.leahy at intel.com>
Date:   Sun Jul 24 07:43:23 2016 -0700

    arch/x86: Move postcar stage commands into place
    
    Move the postcar commands to in between romstage and ramstage.  Add the
    stage header.
    
    TEST=Build and run on Galileo Gen2
    
    Change-Id: I530da6afd8ccbcea217995ddd27066df6d45de22
    Signed-off-by: Lee Leahy <leroy.p.leahy at intel.com>
---
 src/arch/x86/Makefile.inc | 60 +++++++++++++++++++++++++++--------------------
 1 file changed, 34 insertions(+), 26 deletions(-)

diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index be50db1..aff4dd4 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -259,6 +259,40 @@ romstage-S-ccopts += -g0
 endif # CONFIG_ARCH_ROMSTAGE_X86_32 / CONFIG_ARCH_ROMSTAGE_X86_64
 
 ###############################################################################
+# postcar
+###############################################################################
+
+ifeq ($(CONFIG_ARCH_ROMSTAGE_X86_32)$(CONFIG_ARCH_ROMSTAGE_X86_64),y)
+romstage-$(CONFIG_POSTCAR_STAGE) += postcar_loader.c
+endif # CONFIG_ARCH_ROMSTAGE_X86_32 / CONFIG_ARCH_ROMSTAGE_X86_64
+
+$(eval $(call create_class_compiler,postcar,x86_32))
+postcar-generic-ccopts += -D__POSTCAR__
+
+postcar-y += boot.c
+postcar-y += cbfs_and_run.c
+postcar-y += exit_car.S
+postcar-y += memset.c
+postcar-y += memcpy.c
+postcar-y += memmove.c
+postcar-y += memlayout.ld
+postcar-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c
+postcar-$(CONFIG_X86_TOP4G_BOOTMEDIA_MAP) += mmap_boot.c
+
+$(objcbfs)/postcar.debug: $$(postcar-objs)
+	@printf "    LINK       $(subst $(obj)/,,$(@))\n"
+	$(LD_postcar) $(LDFLAGS_postcar) -o $@ -L$(obj) $(COMPILER_RT_FLAGS_postcar) --whole-archive --start-group $(filter-out %.ld,$^) --no-whole-archive $(COMPILER_RT_postcar) --end-group -T $(call src-to-obj,postcar,src/arch/x86/memlayout.ld)
+
+$(objcbfs)/postcar.elf: $(objcbfs)/postcar.debug.rmod
+	cp $< $@
+
+# Add postcar to CBFS
+cbfs-files-$(CONFIG_POSTCAR_STAGE)  += $(CONFIG_CBFS_PREFIX)/postcar
+$(CONFIG_CBFS_PREFIX)/postcar-file := $(objcbfs)/postcar.elf
+$(CONFIG_CBFS_PREFIX)/postcar-type := stage
+$(CONFIG_CBFS_PREFIX)/postcar-compression := none
+
+###############################################################################
 # ramstage
 ###############################################################################
 
@@ -328,7 +362,6 @@ endif # CONFIG_ARCH_RAMSTAGE_X86_32 / CONFIG_ARCH_RAMSTAGE_X86_64
 
 ifeq ($(CONFIG_ARCH_ROMSTAGE_X86_32)$(CONFIG_ARCH_ROMSTAGE_X86_64),y)
 
-romstage-$(CONFIG_POSTCAR_STAGE) += postcar_loader.c
 romstage-y += cbmem.c
 romstage-y += boot.c
 romstage-$(CONFIG_HAVE_ACPI_RESUME) += acpi_s3.c
@@ -391,28 +424,3 @@ rmodules_x86_64-y += memmove.c
 endif
 
 endif # CONFIG_ARCH_RAMSTAGE_X86_32 / CONFIG_ARCH_RAMSTAGE_X86_64
-
-$(eval $(call create_class_compiler,postcar,x86_32))
-postcar-generic-ccopts += -D__POSTCAR__
-
-postcar-y += boot.c
-postcar-y += cbfs_and_run.c
-postcar-y += exit_car.S
-postcar-y += memset.c
-postcar-y += memcpy.c
-postcar-y += memmove.c
-postcar-y += memlayout.ld
-postcar-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c
-postcar-$(CONFIG_X86_TOP4G_BOOTMEDIA_MAP) += mmap_boot.c
-
-$(objcbfs)/postcar.debug: $$(postcar-objs)
-	@printf "    LINK       $(subst $(obj)/,,$(@))\n"
-	$(LD_postcar) $(LDFLAGS_postcar) -o $@ -L$(obj) $(COMPILER_RT_FLAGS_postcar) --whole-archive --start-group $(filter-out %.ld,$^) --no-whole-archive $(COMPILER_RT_postcar) --end-group -T $(call src-to-obj,postcar,src/arch/x86/memlayout.ld)
-
-$(objcbfs)/postcar.elf: $(objcbfs)/postcar.debug.rmod
-	cp $< $@
-
-cbfs-files-$(CONFIG_POSTCAR_STAGE)  += $(CONFIG_CBFS_PREFIX)/postcar
-$(CONFIG_CBFS_PREFIX)/postcar-file := $(objcbfs)/postcar.elf
-$(CONFIG_CBFS_PREFIX)/postcar-type := stage
-$(CONFIG_CBFS_PREFIX)/postcar-compression := none



More information about the coreboot-gerrit mailing list