Stefan Reinauer | 181b773 | 2015-03-15 19:23:50 +0100 | [diff] [blame] | 1 | ifeq ($(CONFIG_ARCH_ROMSTAGE_X86_32)$(CONFIG_ARCH_ROMSTAGE_X86_64),y) |
Kyösti Mälkki | 87acccc | 2014-12-19 09:19:29 +0200 | [diff] [blame] | 2 | romstage-$(CONFIG_CACHE_AS_RAM) += car.c |
Julius Werner | d84afd3e | 2013-11-13 16:06:34 -0800 | [diff] [blame] | 3 | endif |
Aaron Durbin | e0785c0 | 2013-10-21 12:15:29 -0500 | [diff] [blame] | 4 | |
| 5 | subdirs-$(CONFIG_PARALLEL_MP) += name |
| 6 | ramstage-$(CONFIG_PARALLEL_MP) += mp_init.c |
Aaron Durbin | c34713d | 2014-02-25 20:36:56 -0600 | [diff] [blame] | 7 | ramstage-$(CONFIG_MIRROR_PAYLOAD_TO_RAM_BEFORE_LOADING) += mirror_payload.c |
Aaron Durbin | e0785c0 | 2013-10-21 12:15:29 -0500 | [diff] [blame] | 8 | |
| 9 | SIPI_ELF=$(obj)/cpu/x86/sipi_vector.elf |
Aaron Durbin | 3eb8eb7 | 2014-03-10 16:13:58 -0500 | [diff] [blame] | 10 | SIPI_RMOD=$(SIPI_ELF).rmod |
Aaron Durbin | e0785c0 | 2013-10-21 12:15:29 -0500 | [diff] [blame] | 11 | SIPI_BIN=$(SIPI_ELF:.elf=) |
| 12 | SIPI_DOTO=$(SIPI_ELF:.elf=.o) |
| 13 | |
| 14 | ifeq ($(CONFIG_PARALLEL_MP),y) |
Patrick Georgi | f430546 | 2015-04-03 10:39:05 +0200 | [diff] [blame] | 15 | ramstage-srcs += $(SIPI_BIN).manual |
Aaron Durbin | e0785c0 | 2013-10-21 12:15:29 -0500 | [diff] [blame] | 16 | endif |
Furquan Shaikh | 133096b | 2014-07-31 09:28:55 -0700 | [diff] [blame] | 17 | rmodules_$(ARCH-ramstage-y)-$(CONFIG_PARALLEL_MP) += sipi_vector.S |
Aaron Durbin | e0785c0 | 2013-10-21 12:15:29 -0500 | [diff] [blame] | 18 | |
Furquan Shaikh | 133096b | 2014-07-31 09:28:55 -0700 | [diff] [blame] | 19 | $(SIPI_DOTO): $(dir $(SIPI_ELF))sipi_vector.rmodules_$(ARCH-ramstage-y).o |
| 20 | $(CC_rmodules_$(ARCH-ramstage-y)) $(CFLAGS_rmodules_$(ARCH-ramstage-y)) -nostdlib -r -o $@ $^ |
Aaron Durbin | e0785c0 | 2013-10-21 12:15:29 -0500 | [diff] [blame] | 21 | |
Stefan Reinauer | 181b773 | 2015-03-15 19:23:50 +0100 | [diff] [blame] | 22 | ifeq ($(CONFIG_ARCH_RAMSTAGE_X86_32),y) |
Aaron Durbin | dde7629 | 2015-09-05 12:59:26 -0500 | [diff] [blame] | 23 | $(eval $(call rmodule_link,$(SIPI_ELF), $(SIPI_DOTO), 0,x86_32)) |
Stefan Reinauer | 181b773 | 2015-03-15 19:23:50 +0100 | [diff] [blame] | 24 | else |
Aaron Durbin | dde7629 | 2015-09-05 12:59:26 -0500 | [diff] [blame] | 25 | $(eval $(call rmodule_link,$(SIPI_ELF), $(SIPI_DOTO), 0,x86_64)) |
Stefan Reinauer | 181b773 | 2015-03-15 19:23:50 +0100 | [diff] [blame] | 26 | endif |
Aaron Durbin | e0785c0 | 2013-10-21 12:15:29 -0500 | [diff] [blame] | 27 | |
Aaron Durbin | 3eb8eb7 | 2014-03-10 16:13:58 -0500 | [diff] [blame] | 28 | $(SIPI_BIN): $(SIPI_RMOD) |
Furquan Shaikh | 99ac98f | 2014-04-23 10:18:48 -0700 | [diff] [blame] | 29 | $(OBJCOPY_ramstage) -O binary $< $@ |
Aaron Durbin | e0785c0 | 2013-10-21 12:15:29 -0500 | [diff] [blame] | 30 | |
Patrick Georgi | f430546 | 2015-04-03 10:39:05 +0200 | [diff] [blame] | 31 | $(SIPI_BIN).ramstage.manual: $(SIPI_BIN) |
Aaron Durbin | e0785c0 | 2013-10-21 12:15:29 -0500 | [diff] [blame] | 32 | @printf " OBJCOPY $(subst $(obj)/,,$(@))\n" |
Stefan Reinauer | 593f5c8 | 2015-07-30 18:03:18 -0700 | [diff] [blame] | 33 | cd $(dir $@); $(OBJCOPY_rmodules_$(ARCH-ramstage-y)) -I binary $(notdir $<) $(target-objcopy) $(notdir $@) |