aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/x86/Makefile.inc
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2013-10-21 12:15:29 -0500
committerAaron Durbin <adurbin@google.com>2014-01-30 06:05:02 +0100
commite0785c03310574dcd96d5bbe878a1bae8c0f2a8c (patch)
treea4165248a68b0835d38cb4dd723fa39641aa8862 /src/cpu/x86/Makefile.inc
parent75e297428f6a88406fa3e1c0b54ab3d4f411db5c (diff)
x86: parallel MP initialization
Provide a common entry point for bringing up the APs in parallel. This work is based off of the Haswell one which can be moved over to this in the future. The APs are brought up and have the BSP's MTRRs duplicated in their own MTRRs. Additionally, Microcode is loaded before enabling caching. However, the current microcode loading support assumes Intel's mechanism. The infrastructure provides a notion of a flight plan for the BSP and APs. This allows for flexibility in the order of operations for a given architecture/chip without providing any specific policy. Therefore, the chipset caller can provide the order that is required. BUG=chrome-os-partner:22862 BRANCH=None TEST=Built and booted on rambi with baytrail specific patches. Change-Id: I0539047a1b24c13ef278695737cdba3b9344c820 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/173703 Reviewed-on: http://review.coreboot.org/4888 Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/cpu/x86/Makefile.inc')
-rw-r--r--src/cpu/x86/Makefile.inc25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/cpu/x86/Makefile.inc b/src/cpu/x86/Makefile.inc
index ca755dec5d..d5bc2fd219 100644
--- a/src/cpu/x86/Makefile.inc
+++ b/src/cpu/x86/Makefile.inc
@@ -1,2 +1,27 @@
romstage-$(CONFIG_EARLY_CBMEM_INIT) += car.c
romstage-$(CONFIG_HAVE_ACPI_RESUME) += car.c
+
+subdirs-$(CONFIG_PARALLEL_MP) += name
+ramstage-$(CONFIG_PARALLEL_MP) += mp_init.c
+
+SIPI_ELF=$(obj)/cpu/x86/sipi_vector.elf
+SIPI_BIN=$(SIPI_ELF:.elf=)
+SIPI_DOTO=$(SIPI_ELF:.elf=.o)
+
+ifeq ($(CONFIG_PARALLEL_MP),y)
+ramstage-srcs += $(SIPI_BIN)
+endif
+rmodules-$(CONFIG_PARALLEL_MP) += sipi_vector.S
+rmodules-$(CONFIG_PARALLEL_MP) += sipi_header.c
+
+$(SIPI_DOTO): $(dir $(SIPI_ELF))sipi_vector.rmodules.o $(dir $(SIPI_ELF))sipi_header.rmodules.o
+ $(CC) $(LDFLAGS) -nostdlib -r -o $@ $^
+
+$(eval $(call rmodule_link,$(SIPI_ELF), $(SIPI_ELF:.elf=.o), 0))
+
+$(SIPI_BIN): $(SIPI_ELF)
+ $(OBJCOPY) -O binary $< $@
+
+$(SIPI_BIN).ramstage.o: $(SIPI_BIN)
+ @printf " OBJCOPY $(subst $(obj)/,,$(@))\n"
+ cd $(dir $@); $(OBJCOPY) -I binary $(notdir $<) -O elf32-i386 -B i386 $(notdir $@)