From b028636d02f63881e4663ff0f1ae435c00865615 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Thu, 18 Jan 2024 10:48:28 -0700 Subject: cpu: Rename Makefiles from .inc to .mk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The .inc suffix is confusing to various tools as it's not specific to Makefiles. This means that editors don't recognize the files, and don't open them with highlighting and any other specific editor functionality. This issue is also seen in the release notes generation script where Makefiles get renamed before running cloc. Signed-off-by: Martin Roth Change-Id: I552d487978906f5ea74c3d0d85373fe5b2de3f38 Reviewed-on: https://review.coreboot.org/c/coreboot/+/80068 Reviewed-by: Michael Niewöhner Tested-by: build bot (Jenkins) Reviewed-by: Felix Singer Reviewed-by: Maximilian Brune --- src/cpu/Makefile.inc | 71 --------------------------- src/cpu/Makefile.mk | 71 +++++++++++++++++++++++++++ src/cpu/amd/Makefile.inc | 3 -- src/cpu/amd/Makefile.mk | 3 ++ src/cpu/amd/mtrr/Makefile.inc | 3 -- src/cpu/amd/mtrr/Makefile.mk | 3 ++ src/cpu/amd/pi/00730F01/Makefile.inc | 10 ---- src/cpu/amd/pi/00730F01/Makefile.mk | 10 ++++ src/cpu/amd/pi/Makefile.inc | 8 ---- src/cpu/amd/pi/Makefile.mk | 8 ++++ src/cpu/armltd/Makefile.inc | 3 -- src/cpu/armltd/Makefile.mk | 3 ++ src/cpu/intel/Makefile.inc | 21 -------- src/cpu/intel/Makefile.mk | 21 ++++++++ src/cpu/intel/common/Makefile.inc | 17 ------- src/cpu/intel/common/Makefile.mk | 17 +++++++ src/cpu/intel/fit/Makefile.inc | 53 -------------------- src/cpu/intel/fit/Makefile.mk | 53 ++++++++++++++++++++ src/cpu/intel/haswell/Makefile.inc | 37 -------------- src/cpu/intel/haswell/Makefile.mk | 37 ++++++++++++++ src/cpu/intel/microcode/Makefile.inc | 27 ----------- src/cpu/intel/microcode/Makefile.mk | 27 +++++++++++ src/cpu/intel/model_1067x/Makefile.inc | 8 ---- src/cpu/intel/model_1067x/Makefile.mk | 8 ++++ src/cpu/intel/model_106cx/Makefile.inc | 8 ---- src/cpu/intel/model_106cx/Makefile.mk | 8 ++++ src/cpu/intel/model_2065x/Makefile.inc | 21 -------- src/cpu/intel/model_2065x/Makefile.mk | 21 ++++++++ src/cpu/intel/model_206ax/Makefile.inc | 24 ---------- src/cpu/intel/model_206ax/Makefile.mk | 24 ++++++++++ src/cpu/intel/model_65x/Makefile.inc | 5 -- src/cpu/intel/model_65x/Makefile.mk | 5 ++ src/cpu/intel/model_67x/Makefile.inc | 5 -- src/cpu/intel/model_67x/Makefile.mk | 5 ++ src/cpu/intel/model_68x/Makefile.inc | 6 --- src/cpu/intel/model_68x/Makefile.mk | 6 +++ src/cpu/intel/model_6bx/Makefile.inc | 6 --- src/cpu/intel/model_6bx/Makefile.mk | 6 +++ src/cpu/intel/model_6ex/Makefile.inc | 9 ---- src/cpu/intel/model_6ex/Makefile.mk | 9 ++++ src/cpu/intel/model_6fx/Makefile.inc | 10 ---- src/cpu/intel/model_6fx/Makefile.mk | 10 ++++ src/cpu/intel/model_6xx/Makefile.inc | 5 -- src/cpu/intel/model_6xx/Makefile.mk | 5 ++ src/cpu/intel/model_f2x/Makefile.inc | 8 ---- src/cpu/intel/model_f2x/Makefile.mk | 8 ++++ src/cpu/intel/model_f3x/Makefile.inc | 9 ---- src/cpu/intel/model_f3x/Makefile.mk | 9 ++++ src/cpu/intel/model_f4x/Makefile.inc | 7 --- src/cpu/intel/model_f4x/Makefile.mk | 7 +++ src/cpu/intel/slot_1/Makefile.inc | 15 ------ src/cpu/intel/slot_1/Makefile.mk | 15 ++++++ src/cpu/intel/smm/Makefile.inc | 3 -- src/cpu/intel/smm/Makefile.mk | 3 ++ src/cpu/intel/smm/gen1/Makefile.inc | 3 -- src/cpu/intel/smm/gen1/Makefile.mk | 3 ++ src/cpu/intel/socket_441/Makefile.inc | 11 ----- src/cpu/intel/socket_441/Makefile.mk | 11 +++++ src/cpu/intel/socket_BGA956/Makefile.inc | 11 ----- src/cpu/intel/socket_BGA956/Makefile.mk | 11 +++++ src/cpu/intel/socket_FCBGA559/Makefile.inc | 12 ----- src/cpu/intel/socket_FCBGA559/Makefile.mk | 12 +++++ src/cpu/intel/socket_LGA775/Makefile.inc | 16 ------- src/cpu/intel/socket_LGA775/Makefile.mk | 16 +++++++ src/cpu/intel/socket_m/Makefile.inc | 13 ----- src/cpu/intel/socket_m/Makefile.mk | 13 +++++ src/cpu/intel/socket_mPGA604/Makefile.inc | 11 ----- src/cpu/intel/socket_mPGA604/Makefile.mk | 11 +++++ src/cpu/intel/socket_p/Makefile.inc | 13 ----- src/cpu/intel/socket_p/Makefile.mk | 13 +++++ src/cpu/intel/speedstep/Makefile.inc | 3 -- src/cpu/intel/speedstep/Makefile.mk | 3 ++ src/cpu/intel/turbo/Makefile.inc | 3 -- src/cpu/intel/turbo/Makefile.mk | 3 ++ src/cpu/power9/Makefile.inc | 6 --- src/cpu/power9/Makefile.mk | 6 +++ src/cpu/qemu-power8/Makefile.inc | 3 -- src/cpu/qemu-power8/Makefile.mk | 3 ++ src/cpu/qemu-x86/Makefile.inc | 8 ---- src/cpu/qemu-x86/Makefile.mk | 8 ++++ src/cpu/x86/64bit/Makefile.inc | 16 ------- src/cpu/x86/64bit/Makefile.mk | 16 +++++++ src/cpu/x86/Makefile.inc | 71 --------------------------- src/cpu/x86/Makefile.mk | 71 +++++++++++++++++++++++++++ src/cpu/x86/cache/Makefile.inc | 4 -- src/cpu/x86/cache/Makefile.mk | 4 ++ src/cpu/x86/lapic/Makefile.inc | 11 ----- src/cpu/x86/lapic/Makefile.mk | 11 +++++ src/cpu/x86/mtrr/Makefile.inc | 16 ------- src/cpu/x86/mtrr/Makefile.mk | 16 +++++++ src/cpu/x86/name/Makefile.inc | 5 -- src/cpu/x86/name/Makefile.mk | 5 ++ src/cpu/x86/pae/Makefile.inc | 4 -- src/cpu/x86/pae/Makefile.mk | 4 ++ src/cpu/x86/smm/Makefile.inc | 77 ------------------------------ src/cpu/x86/smm/Makefile.mk | 77 ++++++++++++++++++++++++++++++ src/cpu/x86/tsc/Makefile.inc | 4 -- src/cpu/x86/tsc/Makefile.mk | 4 ++ 98 files changed, 723 insertions(+), 723 deletions(-) delete mode 100644 src/cpu/Makefile.inc create mode 100644 src/cpu/Makefile.mk delete mode 100644 src/cpu/amd/Makefile.inc create mode 100644 src/cpu/amd/Makefile.mk delete mode 100644 src/cpu/amd/mtrr/Makefile.inc create mode 100644 src/cpu/amd/mtrr/Makefile.mk delete mode 100644 src/cpu/amd/pi/00730F01/Makefile.inc create mode 100644 src/cpu/amd/pi/00730F01/Makefile.mk delete mode 100644 src/cpu/amd/pi/Makefile.inc create mode 100644 src/cpu/amd/pi/Makefile.mk delete mode 100644 src/cpu/armltd/Makefile.inc create mode 100644 src/cpu/armltd/Makefile.mk delete mode 100644 src/cpu/intel/Makefile.inc create mode 100644 src/cpu/intel/Makefile.mk delete mode 100644 src/cpu/intel/common/Makefile.inc create mode 100644 src/cpu/intel/common/Makefile.mk delete mode 100644 src/cpu/intel/fit/Makefile.inc create mode 100644 src/cpu/intel/fit/Makefile.mk delete mode 100644 src/cpu/intel/haswell/Makefile.inc create mode 100644 src/cpu/intel/haswell/Makefile.mk delete mode 100644 src/cpu/intel/microcode/Makefile.inc create mode 100644 src/cpu/intel/microcode/Makefile.mk delete mode 100644 src/cpu/intel/model_1067x/Makefile.inc create mode 100644 src/cpu/intel/model_1067x/Makefile.mk delete mode 100644 src/cpu/intel/model_106cx/Makefile.inc create mode 100644 src/cpu/intel/model_106cx/Makefile.mk delete mode 100644 src/cpu/intel/model_2065x/Makefile.inc create mode 100644 src/cpu/intel/model_2065x/Makefile.mk delete mode 100644 src/cpu/intel/model_206ax/Makefile.inc create mode 100644 src/cpu/intel/model_206ax/Makefile.mk delete mode 100644 src/cpu/intel/model_65x/Makefile.inc create mode 100644 src/cpu/intel/model_65x/Makefile.mk delete mode 100644 src/cpu/intel/model_67x/Makefile.inc create mode 100644 src/cpu/intel/model_67x/Makefile.mk delete mode 100644 src/cpu/intel/model_68x/Makefile.inc create mode 100644 src/cpu/intel/model_68x/Makefile.mk delete mode 100644 src/cpu/intel/model_6bx/Makefile.inc create mode 100644 src/cpu/intel/model_6bx/Makefile.mk delete mode 100644 src/cpu/intel/model_6ex/Makefile.inc create mode 100644 src/cpu/intel/model_6ex/Makefile.mk delete mode 100644 src/cpu/intel/model_6fx/Makefile.inc create mode 100644 src/cpu/intel/model_6fx/Makefile.mk delete mode 100644 src/cpu/intel/model_6xx/Makefile.inc create mode 100644 src/cpu/intel/model_6xx/Makefile.mk delete mode 100644 src/cpu/intel/model_f2x/Makefile.inc create mode 100644 src/cpu/intel/model_f2x/Makefile.mk delete mode 100644 src/cpu/intel/model_f3x/Makefile.inc create mode 100644 src/cpu/intel/model_f3x/Makefile.mk delete mode 100644 src/cpu/intel/model_f4x/Makefile.inc create mode 100644 src/cpu/intel/model_f4x/Makefile.mk delete mode 100644 src/cpu/intel/slot_1/Makefile.inc create mode 100644 src/cpu/intel/slot_1/Makefile.mk delete mode 100644 src/cpu/intel/smm/Makefile.inc create mode 100644 src/cpu/intel/smm/Makefile.mk delete mode 100644 src/cpu/intel/smm/gen1/Makefile.inc create mode 100644 src/cpu/intel/smm/gen1/Makefile.mk delete mode 100644 src/cpu/intel/socket_441/Makefile.inc create mode 100644 src/cpu/intel/socket_441/Makefile.mk delete mode 100644 src/cpu/intel/socket_BGA956/Makefile.inc create mode 100644 src/cpu/intel/socket_BGA956/Makefile.mk delete mode 100644 src/cpu/intel/socket_FCBGA559/Makefile.inc create mode 100644 src/cpu/intel/socket_FCBGA559/Makefile.mk delete mode 100644 src/cpu/intel/socket_LGA775/Makefile.inc create mode 100644 src/cpu/intel/socket_LGA775/Makefile.mk delete mode 100644 src/cpu/intel/socket_m/Makefile.inc create mode 100644 src/cpu/intel/socket_m/Makefile.mk delete mode 100644 src/cpu/intel/socket_mPGA604/Makefile.inc create mode 100644 src/cpu/intel/socket_mPGA604/Makefile.mk delete mode 100644 src/cpu/intel/socket_p/Makefile.inc create mode 100644 src/cpu/intel/socket_p/Makefile.mk delete mode 100644 src/cpu/intel/speedstep/Makefile.inc create mode 100644 src/cpu/intel/speedstep/Makefile.mk delete mode 100644 src/cpu/intel/turbo/Makefile.inc create mode 100644 src/cpu/intel/turbo/Makefile.mk delete mode 100644 src/cpu/power9/Makefile.inc create mode 100644 src/cpu/power9/Makefile.mk delete mode 100644 src/cpu/qemu-power8/Makefile.inc create mode 100644 src/cpu/qemu-power8/Makefile.mk delete mode 100644 src/cpu/qemu-x86/Makefile.inc create mode 100644 src/cpu/qemu-x86/Makefile.mk delete mode 100644 src/cpu/x86/64bit/Makefile.inc create mode 100644 src/cpu/x86/64bit/Makefile.mk delete mode 100644 src/cpu/x86/Makefile.inc create mode 100644 src/cpu/x86/Makefile.mk delete mode 100644 src/cpu/x86/cache/Makefile.inc create mode 100644 src/cpu/x86/cache/Makefile.mk delete mode 100644 src/cpu/x86/lapic/Makefile.inc create mode 100644 src/cpu/x86/lapic/Makefile.mk delete mode 100644 src/cpu/x86/mtrr/Makefile.inc create mode 100644 src/cpu/x86/mtrr/Makefile.mk delete mode 100644 src/cpu/x86/name/Makefile.inc create mode 100644 src/cpu/x86/name/Makefile.mk delete mode 100644 src/cpu/x86/pae/Makefile.inc create mode 100644 src/cpu/x86/pae/Makefile.mk delete mode 100644 src/cpu/x86/smm/Makefile.inc create mode 100644 src/cpu/x86/smm/Makefile.mk delete mode 100644 src/cpu/x86/tsc/Makefile.inc create mode 100644 src/cpu/x86/tsc/Makefile.mk diff --git a/src/cpu/Makefile.inc b/src/cpu/Makefile.inc deleted file mode 100644 index b1c1b1bb3e67..000000000000 --- a/src/cpu/Makefile.inc +++ /dev/null @@ -1,71 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -################################################################################ -## Subdirectories -################################################################################ -subdirs-y += amd -subdirs-y += armltd -subdirs-y += intel -subdirs-y += ti -subdirs-$(CONFIG_ARCH_X86) += x86 -subdirs-$(CONFIG_CPU_QEMU_X86) += qemu-x86 -subdirs-$(CONFIG_CPU_POWER9) += power9 - -$(eval $(call create_class_compiler,cpu_microcode,x86_32)) -################################################################################ -## Rules for building the microcode blob in CBFS -################################################################################ - -cbfs-files-$(CONFIG_USE_CPU_MICROCODE_CBFS_BINS) += cpu_microcode_blob.bin - -ifeq ($(CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_HEADER),y) -cbfs-files-y += cpu_microcode_blob.bin -cpu_microcode_blob.bin-file = $(objgenerated)/microcode.bin - -$(objgenerated)/microcode.bin: $(call strip_quotes,$(CONFIG_CPU_MICROCODE_HEADER_FILES)) - echo " util/scripts/ucode_h_to_bin.sh $(objgenerated)/microcode.bin \"$(CONFIG_CPU_MICROCODE_HEADER_FILES)\"" - util/scripts/ucode_h_to_bin.sh $(objgenerated)/microcode.bin $(CONFIG_CPU_MICROCODE_HEADER_FILES) -endif - -ifeq ($(CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_BINS),y) -$(obj)/cpu_microcode_blob.bin: cpu_microcode_bins := $(call strip_quotes,$(CONFIG_CPU_UCODE_BINARIES)) -endif -# otherwise `cpu_microcode_bins` should be filled by platform makefiles - -# We just mash all microcode binaries together into one binary to rule them all. -# This approach assumes that the microcode binaries are properly padded, and -# their headers specify the correct size. This works fairly well on isolatied -# updates, such as Intel and some AMD microcode, but won't work very well if the -# updates are wrapped in a container, like AMD's microcode update container. If -# there is only one microcode binary (i.e. one container), then we don't have -# this issue, and this rule will continue to work. -$(obj)/cpu_microcode_blob.bin: $$(wildcard $$(cpu_microcode_bins)) $(DOTCONFIG) - for bin in $(cpu_microcode_bins); do \ - if [ ! -f "$$bin" ]; then \ - echo "Microcode error: $$bin does not exist"; \ - NO_MICROCODE_FILE=1; \ - fi; \ - done; \ - if [ -n "$$NO_MICROCODE_FILE" ]; then \ - if [ -z "$(CONFIG_USE_BLOBS)" ] && [ -n "$(CONFIG_CPU_MICROCODE_CBFS_DEFAULT_BINS)" ]; then \ - echo "Try enabling binary-only repository in Kconfig 'General setup' menu."; \ - fi; \ - false; \ - fi - $(if $(cpu_microcode_bins),,false) # fail if no file is given at all - @printf " MICROCODE $(subst $(obj)/,,$(@))\n" - @echo $(cpu_microcode_bins) - cat $(cpu_microcode_bins) > $@ - -cpu_microcode_blob.bin-file ?= $(obj)/cpu_microcode_blob.bin -cpu_microcode_blob.bin-type := microcode -# The AMD LPC SPI DMA controller requires source files to be 64 byte aligned. -ifeq ($(CONFIG_SOC_AMD_COMMON_BLOCK_LPC_SPI_DMA),y) -cpu_microcode_blob.bin-align := 64 -else -cpu_microcode_blob.bin-align := 16 -endif - -ifneq ($(CONFIG_CPU_MICROCODE_CBFS_LOC),) -cpu_microcode_blob.bin-COREBOOT-position := $(CONFIG_CPU_MICROCODE_CBFS_LOC) -endif diff --git a/src/cpu/Makefile.mk b/src/cpu/Makefile.mk new file mode 100644 index 000000000000..b1c1b1bb3e67 --- /dev/null +++ b/src/cpu/Makefile.mk @@ -0,0 +1,71 @@ +## SPDX-License-Identifier: GPL-2.0-only + +################################################################################ +## Subdirectories +################################################################################ +subdirs-y += amd +subdirs-y += armltd +subdirs-y += intel +subdirs-y += ti +subdirs-$(CONFIG_ARCH_X86) += x86 +subdirs-$(CONFIG_CPU_QEMU_X86) += qemu-x86 +subdirs-$(CONFIG_CPU_POWER9) += power9 + +$(eval $(call create_class_compiler,cpu_microcode,x86_32)) +################################################################################ +## Rules for building the microcode blob in CBFS +################################################################################ + +cbfs-files-$(CONFIG_USE_CPU_MICROCODE_CBFS_BINS) += cpu_microcode_blob.bin + +ifeq ($(CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_HEADER),y) +cbfs-files-y += cpu_microcode_blob.bin +cpu_microcode_blob.bin-file = $(objgenerated)/microcode.bin + +$(objgenerated)/microcode.bin: $(call strip_quotes,$(CONFIG_CPU_MICROCODE_HEADER_FILES)) + echo " util/scripts/ucode_h_to_bin.sh $(objgenerated)/microcode.bin \"$(CONFIG_CPU_MICROCODE_HEADER_FILES)\"" + util/scripts/ucode_h_to_bin.sh $(objgenerated)/microcode.bin $(CONFIG_CPU_MICROCODE_HEADER_FILES) +endif + +ifeq ($(CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_BINS),y) +$(obj)/cpu_microcode_blob.bin: cpu_microcode_bins := $(call strip_quotes,$(CONFIG_CPU_UCODE_BINARIES)) +endif +# otherwise `cpu_microcode_bins` should be filled by platform makefiles + +# We just mash all microcode binaries together into one binary to rule them all. +# This approach assumes that the microcode binaries are properly padded, and +# their headers specify the correct size. This works fairly well on isolatied +# updates, such as Intel and some AMD microcode, but won't work very well if the +# updates are wrapped in a container, like AMD's microcode update container. If +# there is only one microcode binary (i.e. one container), then we don't have +# this issue, and this rule will continue to work. +$(obj)/cpu_microcode_blob.bin: $$(wildcard $$(cpu_microcode_bins)) $(DOTCONFIG) + for bin in $(cpu_microcode_bins); do \ + if [ ! -f "$$bin" ]; then \ + echo "Microcode error: $$bin does not exist"; \ + NO_MICROCODE_FILE=1; \ + fi; \ + done; \ + if [ -n "$$NO_MICROCODE_FILE" ]; then \ + if [ -z "$(CONFIG_USE_BLOBS)" ] && [ -n "$(CONFIG_CPU_MICROCODE_CBFS_DEFAULT_BINS)" ]; then \ + echo "Try enabling binary-only repository in Kconfig 'General setup' menu."; \ + fi; \ + false; \ + fi + $(if $(cpu_microcode_bins),,false) # fail if no file is given at all + @printf " MICROCODE $(subst $(obj)/,,$(@))\n" + @echo $(cpu_microcode_bins) + cat $(cpu_microcode_bins) > $@ + +cpu_microcode_blob.bin-file ?= $(obj)/cpu_microcode_blob.bin +cpu_microcode_blob.bin-type := microcode +# The AMD LPC SPI DMA controller requires source files to be 64 byte aligned. +ifeq ($(CONFIG_SOC_AMD_COMMON_BLOCK_LPC_SPI_DMA),y) +cpu_microcode_blob.bin-align := 64 +else +cpu_microcode_blob.bin-align := 16 +endif + +ifneq ($(CONFIG_CPU_MICROCODE_CBFS_LOC),) +cpu_microcode_blob.bin-COREBOOT-position := $(CONFIG_CPU_MICROCODE_CBFS_LOC) +endif diff --git a/src/cpu/amd/Makefile.inc b/src/cpu/amd/Makefile.inc deleted file mode 100644 index 3e408992ecbc..000000000000 --- a/src/cpu/amd/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -subdirs-$(CONFIG_CPU_AMD_PI) += pi diff --git a/src/cpu/amd/Makefile.mk b/src/cpu/amd/Makefile.mk new file mode 100644 index 000000000000..3e408992ecbc --- /dev/null +++ b/src/cpu/amd/Makefile.mk @@ -0,0 +1,3 @@ +## SPDX-License-Identifier: GPL-2.0-only + +subdirs-$(CONFIG_CPU_AMD_PI) += pi diff --git a/src/cpu/amd/mtrr/Makefile.inc b/src/cpu/amd/mtrr/Makefile.inc deleted file mode 100644 index e51265bca8bf..000000000000 --- a/src/cpu/amd/mtrr/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -ramstage-y += amd_mtrr.c diff --git a/src/cpu/amd/mtrr/Makefile.mk b/src/cpu/amd/mtrr/Makefile.mk new file mode 100644 index 000000000000..e51265bca8bf --- /dev/null +++ b/src/cpu/amd/mtrr/Makefile.mk @@ -0,0 +1,3 @@ +## SPDX-License-Identifier: GPL-2.0-only + +ramstage-y += amd_mtrr.c diff --git a/src/cpu/amd/pi/00730F01/Makefile.inc b/src/cpu/amd/pi/00730F01/Makefile.inc deleted file mode 100644 index ae5a20bbf41c..000000000000 --- a/src/cpu/amd/pi/00730F01/Makefile.inc +++ /dev/null @@ -1,10 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -romstage-y += cpu_io_init.c - -ramstage-y += chip_name.c -ramstage-y += cpu_io_init.c -ramstage-y += model_16_init.c -ramstage-y += update_microcode.c - -subdirs-y += ../../mtrr diff --git a/src/cpu/amd/pi/00730F01/Makefile.mk b/src/cpu/amd/pi/00730F01/Makefile.mk new file mode 100644 index 000000000000..ae5a20bbf41c --- /dev/null +++ b/src/cpu/amd/pi/00730F01/Makefile.mk @@ -0,0 +1,10 @@ +# SPDX-License-Identifier: GPL-2.0-only + +romstage-y += cpu_io_init.c + +ramstage-y += chip_name.c +ramstage-y += cpu_io_init.c +ramstage-y += model_16_init.c +ramstage-y += update_microcode.c + +subdirs-y += ../../mtrr diff --git a/src/cpu/amd/pi/Makefile.inc b/src/cpu/amd/pi/Makefile.inc deleted file mode 100644 index c84fd768177c..000000000000 --- a/src/cpu/amd/pi/Makefile.inc +++ /dev/null @@ -1,8 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -subdirs-$(CONFIG_CPU_AMD_PI_00730F01) += 00730F01 - -romstage-y += ../../../soc/amd/common/block/cpu/smm/smm_helper.c -postcar-y += ../../../soc/amd/common/block/cpu/smm/smm_helper.c -ramstage-y += ../../../soc/amd/common/block/cpu/smm/smm_helper.c -ramstage-y += ../../../soc/amd/common/block/cpu/smm/smm_relocate.c diff --git a/src/cpu/amd/pi/Makefile.mk b/src/cpu/amd/pi/Makefile.mk new file mode 100644 index 000000000000..c84fd768177c --- /dev/null +++ b/src/cpu/amd/pi/Makefile.mk @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0-only + +subdirs-$(CONFIG_CPU_AMD_PI_00730F01) += 00730F01 + +romstage-y += ../../../soc/amd/common/block/cpu/smm/smm_helper.c +postcar-y += ../../../soc/amd/common/block/cpu/smm/smm_helper.c +ramstage-y += ../../../soc/amd/common/block/cpu/smm/smm_helper.c +ramstage-y += ../../../soc/amd/common/block/cpu/smm/smm_relocate.c diff --git a/src/cpu/armltd/Makefile.inc b/src/cpu/armltd/Makefile.inc deleted file mode 100644 index e0b2323dc9da..000000000000 --- a/src/cpu/armltd/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -subdirs-$(CONFIG_CPU_ARMLTD_CORTEX_A9) += cortex-a9 diff --git a/src/cpu/armltd/Makefile.mk b/src/cpu/armltd/Makefile.mk new file mode 100644 index 000000000000..e0b2323dc9da --- /dev/null +++ b/src/cpu/armltd/Makefile.mk @@ -0,0 +1,3 @@ +## SPDX-License-Identifier: GPL-2.0-only + +subdirs-$(CONFIG_CPU_ARMLTD_CORTEX_A9) += cortex-a9 diff --git a/src/cpu/intel/Makefile.inc b/src/cpu/intel/Makefile.inc deleted file mode 100644 index dc0bc53773f5..000000000000 --- a/src/cpu/intel/Makefile.inc +++ /dev/null @@ -1,21 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -# Note: From here on down, we are socket-centric. Socket choice determines -# what other CPU files are included. -# -# Therefore: ONLY include Makefile.inc from socket directories! - -subdirs-$(CONFIG_CPU_INTEL_FIRMWARE_INTERFACE_TABLE) += fit -subdirs-$(CONFIG_CPU_INTEL_SOCKET_441) += socket_441 -subdirs-$(CONFIG_CPU_INTEL_SOCKET_BGA956) += socket_BGA956 -subdirs-$(CONFIG_CPU_INTEL_SOCKET_FCBGA559) += socket_FCBGA559 -subdirs-$(CONFIG_CPU_INTEL_SOCKET_M) += socket_m -subdirs-$(CONFIG_CPU_INTEL_SOCKET_P) += socket_p -subdirs-$(CONFIG_CPU_INTEL_SOCKET_MPGA604) += socket_mPGA604 -subdirs-$(CONFIG_CPU_INTEL_MODEL_2065X) += model_2065x -subdirs-$(CONFIG_CPU_INTEL_MODEL_206AX) += model_206ax -subdirs-$(CONFIG_CPU_INTEL_HASWELL) += haswell -subdirs-$(CONFIG_CPU_INTEL_SLOT_1) += slot_1 -subdirs-$(CONFIG_CPU_INTEL_SOCKET_LGA775) += socket_LGA775 - -subdirs-y += common diff --git a/src/cpu/intel/Makefile.mk b/src/cpu/intel/Makefile.mk new file mode 100644 index 000000000000..bc8f5375c15f --- /dev/null +++ b/src/cpu/intel/Makefile.mk @@ -0,0 +1,21 @@ +## SPDX-License-Identifier: GPL-2.0-only + +# Note: From here on down, we are socket-centric. Socket choice determines +# what other CPU files are included. +# +# Therefore: ONLY include Makefiles from socket directories! + +subdirs-$(CONFIG_CPU_INTEL_FIRMWARE_INTERFACE_TABLE) += fit +subdirs-$(CONFIG_CPU_INTEL_SOCKET_441) += socket_441 +subdirs-$(CONFIG_CPU_INTEL_SOCKET_BGA956) += socket_BGA956 +subdirs-$(CONFIG_CPU_INTEL_SOCKET_FCBGA559) += socket_FCBGA559 +subdirs-$(CONFIG_CPU_INTEL_SOCKET_M) += socket_m +subdirs-$(CONFIG_CPU_INTEL_SOCKET_P) += socket_p +subdirs-$(CONFIG_CPU_INTEL_SOCKET_MPGA604) += socket_mPGA604 +subdirs-$(CONFIG_CPU_INTEL_MODEL_2065X) += model_2065x +subdirs-$(CONFIG_CPU_INTEL_MODEL_206AX) += model_206ax +subdirs-$(CONFIG_CPU_INTEL_HASWELL) += haswell +subdirs-$(CONFIG_CPU_INTEL_SLOT_1) += slot_1 +subdirs-$(CONFIG_CPU_INTEL_SOCKET_LGA775) += socket_LGA775 + +subdirs-y += common diff --git a/src/cpu/intel/common/Makefile.inc b/src/cpu/intel/common/Makefile.inc deleted file mode 100644 index 8b247abe179c..000000000000 --- a/src/cpu/intel/common/Makefile.inc +++ /dev/null @@ -1,17 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -bootblock-$(CONFIG_CPU_INTEL_COMMON) += common_init.c -romstage-$(CONFIG_CPU_INTEL_COMMON) += common_init.c -postcar-$(CONFIG_CPU_INTEL_COMMON) += common_init.c -ramstage-$(CONFIG_CPU_INTEL_COMMON) += common_init.c -ramstage-$(CONFIG_CPU_INTEL_COMMON) += hyperthreading.c -ramstage-$(CONFIG_CPU_INTEL_COMMON_VOLTAGE) += voltage.c - -ifeq ($(CONFIG_CPU_INTEL_COMMON_TIMEBASE),y) -bootblock-y += fsb.c -verstage-y += fsb.c -romstage-y += fsb.c -postcar-y += fsb.c -ramstage-y += fsb.c -smm-y += fsb.c -endif diff --git a/src/cpu/intel/common/Makefile.mk b/src/cpu/intel/common/Makefile.mk new file mode 100644 index 000000000000..8b247abe179c --- /dev/null +++ b/src/cpu/intel/common/Makefile.mk @@ -0,0 +1,17 @@ +## SPDX-License-Identifier: GPL-2.0-only + +bootblock-$(CONFIG_CPU_INTEL_COMMON) += common_init.c +romstage-$(CONFIG_CPU_INTEL_COMMON) += common_init.c +postcar-$(CONFIG_CPU_INTEL_COMMON) += common_init.c +ramstage-$(CONFIG_CPU_INTEL_COMMON) += common_init.c +ramstage-$(CONFIG_CPU_INTEL_COMMON) += hyperthreading.c +ramstage-$(CONFIG_CPU_INTEL_COMMON_VOLTAGE) += voltage.c + +ifeq ($(CONFIG_CPU_INTEL_COMMON_TIMEBASE),y) +bootblock-y += fsb.c +verstage-y += fsb.c +romstage-y += fsb.c +postcar-y += fsb.c +ramstage-y += fsb.c +smm-y += fsb.c +endif diff --git a/src/cpu/intel/fit/Makefile.inc b/src/cpu/intel/fit/Makefile.inc deleted file mode 100644 index a86a22e6d63f..000000000000 --- a/src/cpu/intel/fit/Makefile.inc +++ /dev/null @@ -1,53 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -bootblock-y += fit.c - -# The FIT table is generated as a separate CBFS file. -# The FIT pointer is reserved in fit.c and updated to point to the 'intel_fit' -# CBFS file using 'ifittool -F'. -# With a TOP_SWAP enabled bootblock the FIT pointer at the top swap offset -# will point to the 'intel_fit_ts' CBFS file. - -cbfs-files-y += intel_fit -intel_fit-file := fit_table.c:struct -intel_fit-type := intel_fit -intel_fit-align := 16 - -$(call add_intermediate, set_fit_ptr, $(IFITTOOL)) - @printf " UPDATE-FIT set FIT pointer to table\n" - $(IFITTOOL) -f $< -F -n intel_fit -r COREBOOT -c - -FIT_ENTRY=$(call strip_quotes, $(CONFIG_INTEL_TOP_SWAP_FIT_ENTRY_FMAP_REG)) - -ifneq ($(CONFIG_UPDATE_IMAGE),y) # never update the bootblock - -ifneq ($(CONFIG_CPU_MICROCODE_CBFS_NONE)$(CONFIG_CPU_INTEL_MICROCODE_CBFS_SPLIT_BINS),y) - -$(call add_intermediate, add_mcu_fit, set_fit_ptr $(IFITTOOL)) - @printf " UPDATE-FIT Microcode\n" - $(IFITTOOL) -f $< -a -n cpu_microcode_blob.bin -t 1 -s $(CONFIG_CPU_INTEL_NUM_FIT_ENTRIES) -r COREBOOT - -# Second FIT in TOP_SWAP bootblock -ifeq ($(CONFIG_INTEL_ADD_TOP_SWAP_BOOTBLOCK),y) - -$(call add_intermediate, set_ts_fit_ptr, $(IFITTOOL)) - @printf " UPDATE-FIT Top Swap: set FIT pointer to table\n" - $(IFITTOOL) -f $< -F -n intel_fit_ts -r COREBOOT $(TS_OPTIONS) - -$(call add_intermediate, add_ts_mcu_fit, set_ts_fit_ptr $(IFITTOOL)) - @printf " UPDATE-FIT Top Swap: Microcode\n" -ifneq ($(FIT_ENTRY),) - $(IFITTOOL) -f $< -A -n $(FIT_ENTRY) -t 1 -s $(CONFIG_CPU_INTEL_NUM_FIT_ENTRIES) $(TS_OPTIONS) -r COREBOOT -endif # FIT_ENTRY - $(IFITTOOL) -f $< -a -n cpu_microcode_blob.bin -t 1 -s $(CONFIG_CPU_INTEL_NUM_FIT_ENTRIES) $(TS_OPTIONS) -r COREBOOT - -cbfs-files-y += intel_fit_ts -intel_fit_ts-file := fit_table.c:struct -intel_fit_ts-type := intel_fit -intel_fit_ts-align := 16 - -endif # CONFIG_INTEL_ADD_TOP_SWAP_BOOTBLOCK - -endif # CONFIG_CPU_MICROCODE_CBFS_NONE - -endif # CONFIG_UPDATE_IMAGE diff --git a/src/cpu/intel/fit/Makefile.mk b/src/cpu/intel/fit/Makefile.mk new file mode 100644 index 000000000000..a86a22e6d63f --- /dev/null +++ b/src/cpu/intel/fit/Makefile.mk @@ -0,0 +1,53 @@ +## SPDX-License-Identifier: GPL-2.0-only + +bootblock-y += fit.c + +# The FIT table is generated as a separate CBFS file. +# The FIT pointer is reserved in fit.c and updated to point to the 'intel_fit' +# CBFS file using 'ifittool -F'. +# With a TOP_SWAP enabled bootblock the FIT pointer at the top swap offset +# will point to the 'intel_fit_ts' CBFS file. + +cbfs-files-y += intel_fit +intel_fit-file := fit_table.c:struct +intel_fit-type := intel_fit +intel_fit-align := 16 + +$(call add_intermediate, set_fit_ptr, $(IFITTOOL)) + @printf " UPDATE-FIT set FIT pointer to table\n" + $(IFITTOOL) -f $< -F -n intel_fit -r COREBOOT -c + +FIT_ENTRY=$(call strip_quotes, $(CONFIG_INTEL_TOP_SWAP_FIT_ENTRY_FMAP_REG)) + +ifneq ($(CONFIG_UPDATE_IMAGE),y) # never update the bootblock + +ifneq ($(CONFIG_CPU_MICROCODE_CBFS_NONE)$(CONFIG_CPU_INTEL_MICROCODE_CBFS_SPLIT_BINS),y) + +$(call add_intermediate, add_mcu_fit, set_fit_ptr $(IFITTOOL)) + @printf " UPDATE-FIT Microcode\n" + $(IFITTOOL) -f $< -a -n cpu_microcode_blob.bin -t 1 -s $(CONFIG_CPU_INTEL_NUM_FIT_ENTRIES) -r COREBOOT + +# Second FIT in TOP_SWAP bootblock +ifeq ($(CONFIG_INTEL_ADD_TOP_SWAP_BOOTBLOCK),y) + +$(call add_intermediate, set_ts_fit_ptr, $(IFITTOOL)) + @printf " UPDATE-FIT Top Swap: set FIT pointer to table\n" + $(IFITTOOL) -f $< -F -n intel_fit_ts -r COREBOOT $(TS_OPTIONS) + +$(call add_intermediate, add_ts_mcu_fit, set_ts_fit_ptr $(IFITTOOL)) + @printf " UPDATE-FIT Top Swap: Microcode\n" +ifneq ($(FIT_ENTRY),) + $(IFITTOOL) -f $< -A -n $(FIT_ENTRY) -t 1 -s $(CONFIG_CPU_INTEL_NUM_FIT_ENTRIES) $(TS_OPTIONS) -r COREBOOT +endif # FIT_ENTRY + $(IFITTOOL) -f $< -a -n cpu_microcode_blob.bin -t 1 -s $(CONFIG_CPU_INTEL_NUM_FIT_ENTRIES) $(TS_OPTIONS) -r COREBOOT + +cbfs-files-y += intel_fit_ts +intel_fit_ts-file := fit_table.c:struct +intel_fit_ts-type := intel_fit +intel_fit_ts-align := 16 + +endif # CONFIG_INTEL_ADD_TOP_SWAP_BOOTBLOCK + +endif # CONFIG_CPU_MICROCODE_CBFS_NONE + +endif # CONFIG_UPDATE_IMAGE diff --git a/src/cpu/intel/haswell/Makefile.inc b/src/cpu/intel/haswell/Makefile.inc deleted file mode 100644 index 7323ed97f081..000000000000 --- a/src/cpu/intel/haswell/Makefile.inc +++ /dev/null @@ -1,37 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -ramstage-y += haswell_init.c - -romstage-y += romstage.c -romstage-y += ../car/romstage.c - -ramstage-y += acpi.c -ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smmrelocate.c - -smm-y += finalize.c - -bootblock-y += ../car/non-evict/cache_as_ram.S -bootblock-y += ../car/bootblock.c -bootblock-y += ../../x86/early_reset.S -bootblock-y += bootblock.c - -postcar-y += ../car/non-evict/exit_car.S - -subdirs-y += ../microcode -subdirs-y += ../turbo - -ifeq ($(CONFIG_INTEL_LYNXPOINT_LP),y) -# Haswell ULT/ULX -cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-45-*) -ifeq ($(CONFIG_SOC_INTEL_BROADWELL),y) -# Broadwell ULT/ULX -cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-3d-*) -endif -else -# Haswell Trad -cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-3c-*) -# Crystal Well (Trad) -cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-46-*) -# Broadwell Trad -cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-47-*) -endif diff --git a/src/cpu/intel/haswell/Makefile.mk b/src/cpu/intel/haswell/Makefile.mk new file mode 100644 index 000000000000..7323ed97f081 --- /dev/null +++ b/src/cpu/intel/haswell/Makefile.mk @@ -0,0 +1,37 @@ +## SPDX-License-Identifier: GPL-2.0-only + +ramstage-y += haswell_init.c + +romstage-y += romstage.c +romstage-y += ../car/romstage.c + +ramstage-y += acpi.c +ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smmrelocate.c + +smm-y += finalize.c + +bootblock-y += ../car/non-evict/cache_as_ram.S +bootblock-y += ../car/bootblock.c +bootblock-y += ../../x86/early_reset.S +bootblock-y += bootblock.c + +postcar-y += ../car/non-evict/exit_car.S + +subdirs-y += ../microcode +subdirs-y += ../turbo + +ifeq ($(CONFIG_INTEL_LYNXPOINT_LP),y) +# Haswell ULT/ULX +cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-45-*) +ifeq ($(CONFIG_SOC_INTEL_BROADWELL),y) +# Broadwell ULT/ULX +cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-3d-*) +endif +else +# Haswell Trad +cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-3c-*) +# Crystal Well (Trad) +cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-46-*) +# Broadwell Trad +cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-47-*) +endif diff --git a/src/cpu/intel/microcode/Makefile.inc b/src/cpu/intel/microcode/Makefile.inc deleted file mode 100644 index 4e10a4b15f1c..000000000000 --- a/src/cpu/intel/microcode/Makefile.inc +++ /dev/null @@ -1,27 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -bootblock-$(CONFIG_MICROCODE_UPDATE_PRE_RAM) += microcode_asm.S - -bootblock-$(CONFIG_SUPPORT_CPU_UCODE_IN_CBFS) += microcode.c -ramstage-$(CONFIG_SUPPORT_CPU_UCODE_IN_CBFS) += microcode.c -romstage-$(CONFIG_SUPPORT_CPU_UCODE_IN_CBFS) += microcode.c - -# Pack individual microcodes per CPUID from CONFIG_CPU_INTEL_UCODE_SPLIT_BINARIES directory into the CBFS. -ifeq ($(CONFIG_CPU_INTEL_MICROCODE_CBFS_SPLIT_BINS),y) -microcode-params-dir := $(call strip_quotes,$(CONFIG_CPU_INTEL_UCODE_SPLIT_BINARIES))/ -microcode-params := $(shell find "$(microcode-params-dir)" -type f -exec basename {} \;) - -# Make "cpu_microcode_$(CPUID).bin" file entry into the FIT table -$(call add_intermediate, add_mcu_fit, set_fit_ptr $(IFITTOOL)) - $(foreach params, $(microcode-params), $(shell $(IFITTOOL) -f $< -a -n $(params) -t 1 \ - -s $(CONFIG_CPU_INTEL_NUM_FIT_ENTRIES) -r COREBOOT)) true - -# Add "cpu_microcode_$(CPUID).bin" file into the CBFS -$(foreach params,$(microcode-params), \ - $(eval cbfs-files-y += $(params)) \ - $(eval $(params)-file := $(microcode-params-dir)/$(params)) \ - $(eval $(params)-type := microcode) \ - $(eval $(params)-align := 16) \ -) - -endif diff --git a/src/cpu/intel/microcode/Makefile.mk b/src/cpu/intel/microcode/Makefile.mk new file mode 100644 index 000000000000..4e10a4b15f1c --- /dev/null +++ b/src/cpu/intel/microcode/Makefile.mk @@ -0,0 +1,27 @@ +## SPDX-License-Identifier: GPL-2.0-only + +bootblock-$(CONFIG_MICROCODE_UPDATE_PRE_RAM) += microcode_asm.S + +bootblock-$(CONFIG_SUPPORT_CPU_UCODE_IN_CBFS) += microcode.c +ramstage-$(CONFIG_SUPPORT_CPU_UCODE_IN_CBFS) += microcode.c +romstage-$(CONFIG_SUPPORT_CPU_UCODE_IN_CBFS) += microcode.c + +# Pack individual microcodes per CPUID from CONFIG_CPU_INTEL_UCODE_SPLIT_BINARIES directory into the CBFS. +ifeq ($(CONFIG_CPU_INTEL_MICROCODE_CBFS_SPLIT_BINS),y) +microcode-params-dir := $(call strip_quotes,$(CONFIG_CPU_INTEL_UCODE_SPLIT_BINARIES))/ +microcode-params := $(shell find "$(microcode-params-dir)" -type f -exec basename {} \;) + +# Make "cpu_microcode_$(CPUID).bin" file entry into the FIT table +$(call add_intermediate, add_mcu_fit, set_fit_ptr $(IFITTOOL)) + $(foreach params, $(microcode-params), $(shell $(IFITTOOL) -f $< -a -n $(params) -t 1 \ + -s $(CONFIG_CPU_INTEL_NUM_FIT_ENTRIES) -r COREBOOT)) true + +# Add "cpu_microcode_$(CPUID).bin" file into the CBFS +$(foreach params,$(microcode-params), \ + $(eval cbfs-files-y += $(params)) \ + $(eval $(params)-file := $(microcode-params-dir)/$(params)) \ + $(eval $(params)-type := microcode) \ + $(eval $(params)-align := 16) \ +) + +endif diff --git a/src/cpu/intel/model_1067x/Makefile.inc b/src/cpu/intel/model_1067x/Makefile.inc deleted file mode 100644 index 685176cbe437..000000000000 --- a/src/cpu/intel/model_1067x/Makefile.inc +++ /dev/null @@ -1,8 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -ramstage-y += model_1067x_init.c -ramstage-$(CONFIG_PARALLEL_MP) += mp_init.c -subdirs-y += ../../x86/name -subdirs-y += ../smm/gen1 - -cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-17-*) diff --git a/src/cpu/intel/model_1067x/Makefile.mk b/src/cpu/intel/model_1067x/Makefile.mk new file mode 100644 index 000000000000..685176cbe437 --- /dev/null +++ b/src/cpu/intel/model_1067x/Makefile.mk @@ -0,0 +1,8 @@ +## SPDX-License-Identifier: GPL-2.0-only + +ramstage-y += model_1067x_init.c +ramstage-$(CONFIG_PARALLEL_MP) += mp_init.c +subdirs-y += ../../x86/name +subdirs-y += ../smm/gen1 + +cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-17-*) diff --git a/src/cpu/intel/model_106cx/Makefile.inc b/src/cpu/intel/model_106cx/Makefile.inc deleted file mode 100644 index e8ab63f3b50c..000000000000 --- a/src/cpu/intel/model_106cx/Makefile.inc +++ /dev/null @@ -1,8 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -ramstage-y += model_106cx_init.c -subdirs-y += ../../x86/name -subdirs-y += ../smm/gen1 -ramstage-$(CONFIG_PARALLEL_MP) += ../model_1067x/mp_init.c - -cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-1c-*) diff --git a/src/cpu/intel/model_106cx/Makefile.mk b/src/cpu/intel/model_106cx/Makefile.mk new file mode 100644 index 000000000000..e8ab63f3b50c --- /dev/null +++ b/src/cpu/intel/model_106cx/Makefile.mk @@ -0,0 +1,8 @@ +## SPDX-License-Identifier: GPL-2.0-only + +ramstage-y += model_106cx_init.c +subdirs-y += ../../x86/name +subdirs-y += ../smm/gen1 +ramstage-$(CONFIG_PARALLEL_MP) += ../model_1067x/mp_init.c + +cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-1c-*) diff --git a/src/cpu/intel/model_2065x/Makefile.inc b/src/cpu/intel/model_2065x/Makefile.inc deleted file mode 100644 index 4a0fe4293391..000000000000 --- a/src/cpu/intel/model_2065x/Makefile.inc +++ /dev/null @@ -1,21 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -ramstage-y += model_2065x_init.c -subdirs-y += ../../x86/name -subdirs-y += ../../intel/turbo -subdirs-y += ../../intel/microcode -subdirs-y += ../smm/gen1 - -ramstage-y += acpi.c - -smm-y += finalize.c - -cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-25-*) - -bootblock-y += ../car/non-evict/cache_as_ram.S -bootblock-y += ../car/bootblock.c -bootblock-y += ../../x86/early_reset.S - -postcar-y += ../car/non-evict/exit_car.S - -romstage-y += ../car/romstage.c diff --git a/src/cpu/intel/model_2065x/Makefile.mk b/src/cpu/intel/model_2065x/Makefile.mk new file mode 100644 index 000000000000..4a0fe4293391 --- /dev/null +++ b/src/cpu/intel/model_2065x/Makefile.mk @@ -0,0 +1,21 @@ +## SPDX-License-Identifier: GPL-2.0-only + +ramstage-y += model_2065x_init.c +subdirs-y += ../../x86/name +subdirs-y += ../../intel/turbo +subdirs-y += ../../intel/microcode +subdirs-y += ../smm/gen1 + +ramstage-y += acpi.c + +smm-y += finalize.c + +cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-25-*) + +bootblock-y += ../car/non-evict/cache_as_ram.S +bootblock-y += ../car/bootblock.c +bootblock-y += ../../x86/early_reset.S + +postcar-y += ../car/non-evict/exit_car.S + +romstage-y += ../car/romstage.c diff --git a/src/cpu/intel/model_206ax/Makefile.inc b/src/cpu/intel/model_206ax/Makefile.inc deleted file mode 100644 index e6e6e37fd252..000000000000 --- a/src/cpu/intel/model_206ax/Makefile.inc +++ /dev/null @@ -1,24 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -ramstage-y += model_206ax_init.c -subdirs-y += ../../x86/name -subdirs-y += ../smm/gen1 - -subdirs-y += ../microcode -subdirs-y += ../turbo - -ramstage-y += acpi.c - -smm-y += finalize.c - -cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-2a-*) -cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-3a-*) - -bootblock-y += bootblock.c -bootblock-y += ../car/non-evict/cache_as_ram.S -bootblock-y += ../../x86/early_reset.S -bootblock-y += ../car/bootblock.c - -postcar-y += ../car/non-evict/exit_car.S - -romstage-y += ../car/romstage.c diff --git a/src/cpu/intel/model_206ax/Makefile.mk b/src/cpu/intel/model_206ax/Makefile.mk new file mode 100644 index 000000000000..e6e6e37fd252 --- /dev/null +++ b/src/cpu/intel/model_206ax/Makefile.mk @@ -0,0 +1,24 @@ +## SPDX-License-Identifier: GPL-2.0-only + +ramstage-y += model_206ax_init.c +subdirs-y += ../../x86/name +subdirs-y += ../smm/gen1 + +subdirs-y += ../microcode +subdirs-y += ../turbo + +ramstage-y += acpi.c + +smm-y += finalize.c + +cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-2a-*) +cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-3a-*) + +bootblock-y += bootblock.c +bootblock-y += ../car/non-evict/cache_as_ram.S +bootblock-y += ../../x86/early_reset.S +bootblock-y += ../car/bootblock.c + +postcar-y += ../car/non-evict/exit_car.S + +romstage-y += ../car/romstage.c diff --git a/src/cpu/intel/model_65x/Makefile.inc b/src/cpu/intel/model_65x/Makefile.inc deleted file mode 100644 index 16ca90298213..000000000000 --- a/src/cpu/intel/model_65x/Makefile.inc +++ /dev/null @@ -1,5 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-or-later - -ramstage-y += model_65x_init.c - -cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-05-*) diff --git a/src/cpu/intel/model_65x/Makefile.mk b/src/cpu/intel/model_65x/Makefile.mk new file mode 100644 index 000000000000..16ca90298213 --- /dev/null +++ b/src/cpu/intel/model_65x/Makefile.mk @@ -0,0 +1,5 @@ +## SPDX-License-Identifier: GPL-2.0-or-later + +ramstage-y += model_65x_init.c + +cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-05-*) diff --git a/src/cpu/intel/model_67x/Makefile.inc b/src/cpu/intel/model_67x/Makefile.inc deleted file mode 100644 index d9b07374e648..000000000000 --- a/src/cpu/intel/model_67x/Makefile.inc +++ /dev/null @@ -1,5 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-or-later - -ramstage-y += model_67x_init.c - -cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-07-*) diff --git a/src/cpu/intel/model_67x/Makefile.mk b/src/cpu/intel/model_67x/Makefile.mk new file mode 100644 index 000000000000..d9b07374e648 --- /dev/null +++ b/src/cpu/intel/model_67x/Makefile.mk @@ -0,0 +1,5 @@ +## SPDX-License-Identifier: GPL-2.0-or-later + +ramstage-y += model_67x_init.c + +cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-07-*) diff --git a/src/cpu/intel/model_68x/Makefile.inc b/src/cpu/intel/model_68x/Makefile.inc deleted file mode 100644 index e9344b4d366a..000000000000 --- a/src/cpu/intel/model_68x/Makefile.inc +++ /dev/null @@ -1,6 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-or-later - -ramstage-y += model_68x_init.c -subdirs-y += ../../x86/name - -cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-08-*) diff --git a/src/cpu/intel/model_68x/Makefile.mk b/src/cpu/intel/model_68x/Makefile.mk new file mode 100644 index 000000000000..e9344b4d366a --- /dev/null +++ b/src/cpu/intel/model_68x/Makefile.mk @@ -0,0 +1,6 @@ +## SPDX-License-Identifier: GPL-2.0-or-later + +ramstage-y += model_68x_init.c +subdirs-y += ../../x86/name + +cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-08-*) diff --git a/src/cpu/intel/model_6bx/Makefile.inc b/src/cpu/intel/model_6bx/Makefile.inc deleted file mode 100644 index 5ec5d980c5fa..000000000000 --- a/src/cpu/intel/model_6bx/Makefile.inc +++ /dev/null @@ -1,6 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -ramstage-y += model_6bx_init.c -subdirs-y += ../../x86/name - -cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-0b-*) diff --git a/src/cpu/intel/model_6bx/Makefile.mk b/src/cpu/intel/model_6bx/Makefile.mk new file mode 100644 index 000000000000..5ec5d980c5fa --- /dev/null +++ b/src/cpu/intel/model_6bx/Makefile.mk @@ -0,0 +1,6 @@ +## SPDX-License-Identifier: GPL-2.0-only + +ramstage-y += model_6bx_init.c +subdirs-y += ../../x86/name + +cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-0b-*) diff --git a/src/cpu/intel/model_6ex/Makefile.inc b/src/cpu/intel/model_6ex/Makefile.inc deleted file mode 100644 index 4f54f84f6971..000000000000 --- a/src/cpu/intel/model_6ex/Makefile.inc +++ /dev/null @@ -1,9 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -ramstage-y += model_6ex_init.c -subdirs-y += ../../x86/name -subdirs-y += ../common -subdirs-y += ../smm/gen1 -ramstage-y += ../model_1067x/mp_init.c - -cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-0e-*) diff --git a/src/cpu/intel/model_6ex/Makefile.mk b/src/cpu/intel/model_6ex/Makefile.mk new file mode 100644 index 000000000000..4f54f84f6971 --- /dev/null +++ b/src/cpu/intel/model_6ex/Makefile.mk @@ -0,0 +1,9 @@ +## SPDX-License-Identifier: GPL-2.0-only + +ramstage-y += model_6ex_init.c +subdirs-y += ../../x86/name +subdirs-y += ../common +subdirs-y += ../smm/gen1 +ramstage-y += ../model_1067x/mp_init.c + +cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-0e-*) diff --git a/src/cpu/intel/model_6fx/Makefile.inc b/src/cpu/intel/model_6fx/Makefile.inc deleted file mode 100644 index bf5cafabb235..000000000000 --- a/src/cpu/intel/model_6fx/Makefile.inc +++ /dev/null @@ -1,10 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -ramstage-y += model_6fx_init.c -subdirs-y += ../../x86/name -subdirs-y += ../common -ramstage-$(CONFIG_PARALLEL_MP) += ../model_1067x/mp_init.c -subdirs-y += ../smm/gen1 - -cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-0f-*) \ - 3rdparty/intel-microcode/intel-ucode/06-16-01 diff --git a/src/cpu/intel/model_6fx/Makefile.mk b/src/cpu/intel/model_6fx/Makefile.mk new file mode 100644 index 000000000000..bf5cafabb235 --- /dev/null +++ b/src/cpu/intel/model_6fx/Makefile.mk @@ -0,0 +1,10 @@ +## SPDX-License-Identifier: GPL-2.0-only + +ramstage-y += model_6fx_init.c +subdirs-y += ../../x86/name +subdirs-y += ../common +ramstage-$(CONFIG_PARALLEL_MP) += ../model_1067x/mp_init.c +subdirs-y += ../smm/gen1 + +cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-0f-*) \ + 3rdparty/intel-microcode/intel-ucode/06-16-01 diff --git a/src/cpu/intel/model_6xx/Makefile.inc b/src/cpu/intel/model_6xx/Makefile.inc deleted file mode 100644 index 7ae20e13632c..000000000000 --- a/src/cpu/intel/model_6xx/Makefile.inc +++ /dev/null @@ -1,5 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -ramstage-y += model_6xx_init.c - -cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-06-*) diff --git a/src/cpu/intel/model_6xx/Makefile.mk b/src/cpu/intel/model_6xx/Makefile.mk new file mode 100644 index 000000000000..7ae20e13632c --- /dev/null +++ b/src/cpu/intel/model_6xx/Makefile.mk @@ -0,0 +1,5 @@ +## SPDX-License-Identifier: GPL-2.0-only + +ramstage-y += model_6xx_init.c + +cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-06-*) diff --git a/src/cpu/intel/model_f2x/Makefile.inc b/src/cpu/intel/model_f2x/Makefile.inc deleted file mode 100644 index 97e5d54bc4c8..000000000000 --- a/src/cpu/intel/model_f2x/Makefile.inc +++ /dev/null @@ -1,8 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -subdirs-y += ../common - -ramstage-y += model_f2x_init.c -ramstage-y += mp_init.c - -cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/0f-02-*) diff --git a/src/cpu/intel/model_f2x/Makefile.mk b/src/cpu/intel/model_f2x/Makefile.mk new file mode 100644 index 000000000000..97e5d54bc4c8 --- /dev/null +++ b/src/cpu/intel/model_f2x/Makefile.mk @@ -0,0 +1,8 @@ +## SPDX-License-Identifier: GPL-2.0-only + +subdirs-y += ../common + +ramstage-y += model_f2x_init.c +ramstage-y += mp_init.c + +cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/0f-02-*) diff --git a/src/cpu/intel/model_f3x/Makefile.inc b/src/cpu/intel/model_f3x/Makefile.inc deleted file mode 100644 index 4621fe77087e..000000000000 --- a/src/cpu/intel/model_f3x/Makefile.inc +++ /dev/null @@ -1,9 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -ramstage-y += model_f3x_init.c - -subdirs-y += ../smm/gen1 - -ramstage-$(CONFIG_PARALLEL_MP) += ../model_1067x/mp_init.c - -cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/0f-03-*) diff --git a/src/cpu/intel/model_f3x/Makefile.mk b/src/cpu/intel/model_f3x/Makefile.mk new file mode 100644 index 000000000000..4621fe77087e --- /dev/null +++ b/src/cpu/intel/model_f3x/Makefile.mk @@ -0,0 +1,9 @@ +## SPDX-License-Identifier: GPL-2.0-only + +ramstage-y += model_f3x_init.c + +subdirs-y += ../smm/gen1 + +ramstage-$(CONFIG_PARALLEL_MP) += ../model_1067x/mp_init.c + +cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/0f-03-*) diff --git a/src/cpu/intel/model_f4x/Makefile.inc b/src/cpu/intel/model_f4x/Makefile.inc deleted file mode 100644 index 871fc092272a..000000000000 --- a/src/cpu/intel/model_f4x/Makefile.inc +++ /dev/null @@ -1,7 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -ramstage-y += model_f4x_init.c -subdirs-y += ../smm/gen1 -ramstage-$(CONFIG_PARALLEL_MP) += ../model_1067x/mp_init.c - -cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/0f-04-*) diff --git a/src/cpu/intel/model_f4x/Makefile.mk b/src/cpu/intel/model_f4x/Makefile.mk new file mode 100644 index 000000000000..871fc092272a --- /dev/null +++ b/src/cpu/intel/model_f4x/Makefile.mk @@ -0,0 +1,7 @@ +## SPDX-License-Identifier: GPL-2.0-only + +ramstage-y += model_f4x_init.c +subdirs-y += ../smm/gen1 +ramstage-$(CONFIG_PARALLEL_MP) += ../model_1067x/mp_init.c + +cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/0f-04-*) diff --git a/src/cpu/intel/slot_1/Makefile.inc b/src/cpu/intel/slot_1/Makefile.inc deleted file mode 100644 index 856ecf66976a..000000000000 --- a/src/cpu/intel/slot_1/Makefile.inc +++ /dev/null @@ -1,15 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-or-later - -ramstage-y += slot_1.c -ramstage-y += l2_cache.c -subdirs-y += ../model_6xx -subdirs-y += ../model_65x -subdirs-y += ../model_67x -subdirs-y += ../model_68x -subdirs-y += ../model_6bx -subdirs-y += ../microcode - -bootblock-y += ../car/p3/cache_as_ram.S -bootblock-y += ../car/bootblock.c -postcar-y += ../car/p4-netburst/exit_car.S -romstage-y += ../car/romstage.c diff --git a/src/cpu/intel/slot_1/Makefile.mk b/src/cpu/intel/slot_1/Makefile.mk new file mode 100644 index 000000000000..856ecf66976a --- /dev/null +++ b/src/cpu/intel/slot_1/Makefile.mk @@ -0,0 +1,15 @@ +## SPDX-License-Identifier: GPL-2.0-or-later + +ramstage-y += slot_1.c +ramstage-y += l2_cache.c +subdirs-y += ../model_6xx +subdirs-y += ../model_65x +subdirs-y += ../model_67x +subdirs-y += ../model_68x +subdirs-y += ../model_6bx +subdirs-y += ../microcode + +bootblock-y += ../car/p3/cache_as_ram.S +bootblock-y += ../car/bootblock.c +postcar-y += ../car/p4-netburst/exit_car.S +romstage-y += ../car/romstage.c diff --git a/src/cpu/intel/smm/Makefile.inc b/src/cpu/intel/smm/Makefile.inc deleted file mode 100644 index b8e81b82cef1..000000000000 --- a/src/cpu/intel/smm/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smm_reloc.c diff --git a/src/cpu/intel/smm/Makefile.mk b/src/cpu/intel/smm/Makefile.mk new file mode 100644 index 000000000000..b8e81b82cef1 --- /dev/null +++ b/src/cpu/intel/smm/Makefile.mk @@ -0,0 +1,3 @@ +## SPDX-License-Identifier: GPL-2.0-only + +ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smm_reloc.c diff --git a/src/cpu/intel/smm/gen1/Makefile.inc b/src/cpu/intel/smm/gen1/Makefile.inc deleted file mode 100644 index 0eb8e33d489e..000000000000 --- a/src/cpu/intel/smm/gen1/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smmrelocate.c diff --git a/src/cpu/intel/smm/gen1/Makefile.mk b/src/cpu/intel/smm/gen1/Makefile.mk new file mode 100644 index 000000000000..0eb8e33d489e --- /dev/null +++ b/src/cpu/intel/smm/gen1/Makefile.mk @@ -0,0 +1,3 @@ +## SPDX-License-Identifier: GPL-2.0-only + +ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smmrelocate.c diff --git a/src/cpu/intel/socket_441/Makefile.inc b/src/cpu/intel/socket_441/Makefile.inc deleted file mode 100644 index bc000e8b9ac6..000000000000 --- a/src/cpu/intel/socket_441/Makefile.inc +++ /dev/null @@ -1,11 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -subdirs-y += ../model_106cx -subdirs-y += ../microcode -subdirs-y += ../speedstep - -bootblock-y += ../car/p4-netburst/cache_as_ram.S -bootblock-y += ../car/bootblock.c -postcar-y += ../car/p4-netburst/exit_car.S - -romstage-y += ../car/romstage.c diff --git a/src/cpu/intel/socket_441/Makefile.mk b/src/cpu/intel/socket_441/Makefile.mk new file mode 100644 index 000000000000..bc000e8b9ac6 --- /dev/null +++ b/src/cpu/intel/socket_441/Makefile.mk @@ -0,0 +1,11 @@ +## SPDX-License-Identifier: GPL-2.0-only + +subdirs-y += ../model_106cx +subdirs-y += ../microcode +subdirs-y += ../speedstep + +bootblock-y += ../car/p4-netburst/cache_as_ram.S +bootblock-y += ../car/bootblock.c +postcar-y += ../car/p4-netburst/exit_car.S + +romstage-y += ../car/romstage.c diff --git a/src/cpu/intel/socket_BGA956/Makefile.inc b/src/cpu/intel/socket_BGA956/Makefile.inc deleted file mode 100644 index c2abbfbdb646..000000000000 --- a/src/cpu/intel/socket_BGA956/Makefile.inc +++ /dev/null @@ -1,11 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -subdirs-y += ../model_1067x -subdirs-y += ../microcode -subdirs-y += ../speedstep - -bootblock-y += ../car/core2/cache_as_ram.S -bootblock-y += ../car/bootblock.c -postcar-y += ../car/p4-netburst/exit_car.S - -romstage-y += ../car/romstage.c diff --git a/src/cpu/intel/socket_BGA956/Makefile.mk b/src/cpu/intel/socket_BGA956/Makefile.mk new file mode 100644 index 000000000000..c2abbfbdb646 --- /dev/null +++ b/src/cpu/intel/socket_BGA956/Makefile.mk @@ -0,0 +1,11 @@ +## SPDX-License-Identifier: GPL-2.0-only + +subdirs-y += ../model_1067x +subdirs-y += ../microcode +subdirs-y += ../speedstep + +bootblock-y += ../car/core2/cache_as_ram.S +bootblock-y += ../car/bootblock.c +postcar-y += ../car/p4-netburst/exit_car.S + +romstage-y += ../car/romstage.c diff --git a/src/cpu/intel/socket_FCBGA559/Makefile.inc b/src/cpu/intel/socket_FCBGA559/Makefile.inc deleted file mode 100644 index 98eaf2444084..000000000000 --- a/src/cpu/intel/socket_FCBGA559/Makefile.inc +++ /dev/null @@ -1,12 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -subdirs-y += ../model_106cx -subdirs-y += ../microcode -subdirs-y += ../speedstep - -bootblock-y += ../car/bootblock.c -bootblock-y += ../car/non-evict/cache_as_ram.S - -postcar-y += ../car/non-evict/exit_car.S - -romstage-y += ../car/romstage.c diff --git a/src/cpu/intel/socket_FCBGA559/Makefile.mk b/src/cpu/intel/socket_FCBGA559/Makefile.mk new file mode 100644 index 000000000000..98eaf2444084 --- /dev/null +++ b/src/cpu/intel/socket_FCBGA559/Makefile.mk @@ -0,0 +1,12 @@ +## SPDX-License-Identifier: GPL-2.0-only + +subdirs-y += ../model_106cx +subdirs-y += ../microcode +subdirs-y += ../speedstep + +bootblock-y += ../car/bootblock.c +bootblock-y += ../car/non-evict/cache_as_ram.S + +postcar-y += ../car/non-evict/exit_car.S + +romstage-y += ../car/romstage.c diff --git a/src/cpu/intel/socket_LGA775/Makefile.inc b/src/cpu/intel/socket_LGA775/Makefile.inc deleted file mode 100644 index eb42dea16ba5..000000000000 --- a/src/cpu/intel/socket_LGA775/Makefile.inc +++ /dev/null @@ -1,16 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -subdirs-y += ../model_6fx -subdirs-y += ../model_f3x -subdirs-y += ../model_f4x -subdirs-y += ../model_1067x -subdirs-y += ../microcode -subdirs-y += ../speedstep - -bootblock-y += ../car/p4-netburst/cache_as_ram.S -bootblock-y += ../car/bootblock.c -bootblock-y += ../../x86/early_reset.S - -postcar-y += ../car/p4-netburst/exit_car.S - -romstage-y += ../car/romstage.c diff --git a/src/cpu/intel/socket_LGA775/Makefile.mk b/src/cpu/intel/socket_LGA775/Makefile.mk new file mode 100644 index 000000000000..eb42dea16ba5 --- /dev/null +++ b/src/cpu/intel/socket_LGA775/Makefile.mk @@ -0,0 +1,16 @@ +## SPDX-License-Identifier: GPL-2.0-only + +subdirs-y += ../model_6fx +subdirs-y += ../model_f3x +subdirs-y += ../model_f4x +subdirs-y += ../model_1067x +subdirs-y += ../microcode +subdirs-y += ../speedstep + +bootblock-y += ../car/p4-netburst/cache_as_ram.S +bootblock-y += ../car/bootblock.c +bootblock-y += ../../x86/early_reset.S + +postcar-y += ../car/p4-netburst/exit_car.S + +romstage-y += ../car/romstage.c diff --git a/src/cpu/intel/socket_m/Makefile.inc b/src/cpu/intel/socket_m/Makefile.inc deleted file mode 100644 index 2919ace33394..000000000000 --- a/src/cpu/intel/socket_m/Makefile.inc +++ /dev/null @@ -1,13 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -subdirs-y += ../model_6ex -subdirs-y += ../model_6fx -subdirs-y += ../../x86/lapic -subdirs-y += ../microcode -subdirs-y += ../speedstep - -bootblock-y += ../car/core2/cache_as_ram.S -bootblock-y += ../car/bootblock.c -postcar-y += ../car/p4-netburst/exit_car.S - -romstage-y += ../car/romstage.c diff --git a/src/cpu/intel/socket_m/Makefile.mk b/src/cpu/intel/socket_m/Makefile.mk new file mode 100644 index 000000000000..2919ace33394 --- /dev/null +++ b/src/cpu/intel/socket_m/Makefile.mk @@ -0,0 +1,13 @@ +## SPDX-License-Identifier: GPL-2.0-only + +subdirs-y += ../model_6ex +subdirs-y += ../model_6fx +subdirs-y += ../../x86/lapic +subdirs-y += ../microcode +subdirs-y += ../speedstep + +bootblock-y += ../car/core2/cache_as_ram.S +bootblock-y += ../car/bootblock.c +postcar-y += ../car/p4-netburst/exit_car.S + +romstage-y += ../car/romstage.c diff --git a/src/cpu/intel/socket_mPGA604/Makefile.inc b/src/cpu/intel/socket_mPGA604/Makefile.inc deleted file mode 100644 index 94b8eb00870e..000000000000 --- a/src/cpu/intel/socket_mPGA604/Makefile.inc +++ /dev/null @@ -1,11 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -subdirs-y += ../model_f2x -subdirs-y += ../../x86/lapic -subdirs-y += ../microcode - -bootblock-y += ../car/p4-netburst/cache_as_ram.S -bootblock-y += ../car/bootblock.c - -postcar-y += ../car/p4-netburst/exit_car.S -romstage-y += ../car/romstage.c diff --git a/src/cpu/intel/socket_mPGA604/Makefile.mk b/src/cpu/intel/socket_mPGA604/Makefile.mk new file mode 100644 index 000000000000..94b8eb00870e --- /dev/null +++ b/src/cpu/intel/socket_mPGA604/Makefile.mk @@ -0,0 +1,11 @@ +## SPDX-License-Identifier: GPL-2.0-only + +subdirs-y += ../model_f2x +subdirs-y += ../../x86/lapic +subdirs-y += ../microcode + +bootblock-y += ../car/p4-netburst/cache_as_ram.S +bootblock-y += ../car/bootblock.c + +postcar-y += ../car/p4-netburst/exit_car.S +romstage-y += ../car/romstage.c diff --git a/src/cpu/intel/socket_p/Makefile.inc b/src/cpu/intel/socket_p/Makefile.inc deleted file mode 100644 index ca5e5c081ab1..000000000000 --- a/src/cpu/intel/socket_p/Makefile.inc +++ /dev/null @@ -1,13 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -subdirs-y += ../model_6fx -subdirs-y += ../model_1067x -subdirs-y += ../../x86/lapic -subdirs-y += ../microcode -subdirs-y += ../speedstep - -bootblock-y += ../car/core2/cache_as_ram.S -bootblock-y += ../car/bootblock.c -postcar-y += ../car/p4-netburst/exit_car.S - -romstage-y += ../car/romstage.c diff --git a/src/cpu/intel/socket_p/Makefile.mk b/src/cpu/intel/socket_p/Makefile.mk new file mode 100644 index 000000000000..ca5e5c081ab1 --- /dev/null +++ b/src/cpu/intel/socket_p/Makefile.mk @@ -0,0 +1,13 @@ +## SPDX-License-Identifier: GPL-2.0-only + +subdirs-y += ../model_6fx +subdirs-y += ../model_1067x +subdirs-y += ../../x86/lapic +subdirs-y += ../microcode +subdirs-y += ../speedstep + +bootblock-y += ../car/core2/cache_as_ram.S +bootblock-y += ../car/bootblock.c +postcar-y += ../car/p4-netburst/exit_car.S + +romstage-y += ../car/romstage.c diff --git a/src/cpu/intel/speedstep/Makefile.inc b/src/cpu/intel/speedstep/Makefile.inc deleted file mode 100644 index 7fb90da8d364..000000000000 --- a/src/cpu/intel/speedstep/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -ramstage-y += acpi.c speedstep.c diff --git a/src/cpu/intel/speedstep/Makefile.mk b/src/cpu/intel/speedstep/Makefile.mk new file mode 100644 index 000000000000..7fb90da8d364 --- /dev/null +++ b/src/cpu/intel/speedstep/Makefile.mk @@ -0,0 +1,3 @@ +## SPDX-License-Identifier: GPL-2.0-only + +ramstage-y += acpi.c speedstep.c diff --git a/src/cpu/intel/turbo/Makefile.inc b/src/cpu/intel/turbo/Makefile.inc deleted file mode 100644 index d5c124b2c415..000000000000 --- a/src/cpu/intel/turbo/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -ramstage-y += turbo.c diff --git a/src/cpu/intel/turbo/Makefile.mk b/src/cpu/intel/turbo/Makefile.mk new file mode 100644 index 000000000000..d5c124b2c415 --- /dev/null +++ b/src/cpu/intel/turbo/Makefile.mk @@ -0,0 +1,3 @@ +## SPDX-License-Identifier: GPL-2.0-only + +ramstage-y += turbo.c diff --git a/src/cpu/power9/Makefile.inc b/src/cpu/power9/Makefile.inc deleted file mode 100644 index 2fe9e57a96df..000000000000 --- a/src/cpu/power9/Makefile.inc +++ /dev/null @@ -1,6 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-or-later - -ramstage-y += power9.c - -bootblock-y += scom.c -romstage-y += scom.c diff --git a/src/cpu/power9/Makefile.mk b/src/cpu/power9/Makefile.mk new file mode 100644 index 000000000000..2fe9e57a96df --- /dev/null +++ b/src/cpu/power9/Makefile.mk @@ -0,0 +1,6 @@ +## SPDX-License-Identifier: GPL-2.0-or-later + +ramstage-y += power9.c + +bootblock-y += scom.c +romstage-y += scom.c diff --git a/src/cpu/qemu-power8/Makefile.inc b/src/cpu/qemu-power8/Makefile.inc deleted file mode 100644 index 79e623f30364..000000000000 --- a/src/cpu/qemu-power8/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-or-later - -ramstage-y += qemu.c diff --git a/src/cpu/qemu-power8/Makefile.mk b/src/cpu/qemu-power8/Makefile.mk new file mode 100644 index 000000000000..79e623f30364 --- /dev/null +++ b/src/cpu/qemu-power8/Makefile.mk @@ -0,0 +1,3 @@ +## SPDX-License-Identifier: GPL-2.0-or-later + +ramstage-y += qemu.c diff --git a/src/cpu/qemu-x86/Makefile.inc b/src/cpu/qemu-x86/Makefile.inc deleted file mode 100644 index b50dee5ccc36..000000000000 --- a/src/cpu/qemu-x86/Makefile.inc +++ /dev/null @@ -1,8 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-or-later - -bootblock-y += cache_as_ram_bootblock.S -bootblock-y += bootblock.c - -romstage-y += ../intel/car/romstage.c - -ramstage-y += qemu.c diff --git a/src/cpu/qemu-x86/Makefile.mk b/src/cpu/qemu-x86/Makefile.mk new file mode 100644 index 000000000000..b50dee5ccc36 --- /dev/null +++ b/src/cpu/qemu-x86/Makefile.mk @@ -0,0 +1,8 @@ +## SPDX-License-Identifier: GPL-2.0-or-later + +bootblock-y += cache_as_ram_bootblock.S +bootblock-y += bootblock.c + +romstage-y += ../intel/car/romstage.c + +ramstage-y += qemu.c diff --git a/src/cpu/x86/64bit/Makefile.inc b/src/cpu/x86/64bit/Makefile.inc deleted file mode 100644 index 24a5a966fb90..000000000000 --- a/src/cpu/x86/64bit/Makefile.inc +++ /dev/null @@ -1,16 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -all_x86-y += mode_switch.S -all_x86-y += mode_switch2.S - -# Add --defsym=_start=0 to suppress a linker warning. -$(objcbfs)/pt: $(dir)/pt.S $(obj)/config.h - $(CC_bootblock) $(CFLAGS_bootblock) $(CPPFLAGS_bootblock) -o $@.tmp $< -Wl,--section-start=.rodata=$(CONFIG_ARCH_X86_64_PGTBL_LOC),--defsym=_start=0 - $(OBJCOPY_ramstage) -Obinary -j .rodata $@.tmp $@ - rm $@.tmp - -cbfs-files-y += pagetables -pagetables-file := $(objcbfs)/pt -pagetables-type := raw -pagetables-compression := none -pagetables-COREBOOT-position := $(CONFIG_ARCH_X86_64_PGTBL_LOC) diff --git a/src/cpu/x86/64bit/Makefile.mk b/src/cpu/x86/64bit/Makefile.mk new file mode 100644 index 000000000000..24a5a966fb90 --- /dev/null +++ b/src/cpu/x86/64bit/Makefile.mk @@ -0,0 +1,16 @@ +## SPDX-License-Identifier: GPL-2.0-only + +all_x86-y += mode_switch.S +all_x86-y += mode_switch2.S + +# Add --defsym=_start=0 to suppress a linker warning. +$(objcbfs)/pt: $(dir)/pt.S $(obj)/config.h + $(CC_bootblock) $(CFLAGS_bootblock) $(CPPFLAGS_bootblock) -o $@.tmp $< -Wl,--section-start=.rodata=$(CONFIG_ARCH_X86_64_PGTBL_LOC),--defsym=_start=0 + $(OBJCOPY_ramstage) -Obinary -j .rodata $@.tmp $@ + rm $@.tmp + +cbfs-files-y += pagetables +pagetables-file := $(objcbfs)/pt +pagetables-type := raw +pagetables-compression := none +pagetables-COREBOOT-position := $(CONFIG_ARCH_X86_64_PGTBL_LOC) diff --git a/src/cpu/x86/Makefile.inc b/src/cpu/x86/Makefile.inc deleted file mode 100644 index 9e9b837417eb..000000000000 --- a/src/cpu/x86/Makefile.inc +++ /dev/null @@ -1,71 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -subdirs-y += lapic -subdirs-y += mtrr -subdirs-y += pae -subdirs-$(CONFIG_HAVE_SMI_HANDLER) += smm -subdirs-$(CONFIG_UDELAY_TSC) += tsc -# Use ARCH_BOOTBLOCK_X86_64 as a proxy for knowing if 64bit is going to be used -subdirs-$(CONFIG_ARCH_BOOTBLOCK_X86_64) += 64bit -subdirs-y += cache - -subdirs-$(CONFIG_PARALLEL_MP) += name - -ifeq ($(CONFIG_HAVE_SMI_HANDLER),y) -$(obj)/ramstage/cpu/x86/smm_start32_offset.h: $(dir)/smm_start32_offset.h.template $(obj)/smmstub/smmstub.elf - cp $< $@.temp - sed -i 's/##START32_OFFSET##/0x'$$($(NM_smmstub) -an $(obj)/smmstub/smmstub.elf | grep smm_trampolin | cut -d' ' -f1)'/' $@.temp - mv $@.temp $@ -else -$(obj)/ramstage/cpu/x86/smm_start32_offset.h: $(dir)/smm_start32_offset.h.template - cp $< $@.temp - sed -i 's/##START32_OFFSET##/0x0/' $@.temp - mv $@.temp $@ -endif - -$(call src-to-obj,ramstage,$(dir)/mp_init.c): $(obj)/ramstage/cpu/x86/smm_start32_offset.h -ramstage-$(CONFIG_PARALLEL_MP) += mp_init.c - -ramstage-y += backup_default_smm.c -ramstage-y += smi_trigger.c -smm-y += smi_trigger.c - -subdirs-$(CONFIG_CPU_INTEL_COMMON_SMM) += ../intel/smm - -bootblock-y += entry32.S -bootblock-y += entry16.S -bootblock-y += reset16.S - -additional-dirs += $(obj)/cpu/x86 - -SIPI_ELF=$(obj)/cpu/x86/sipi_vector.elf -SIPI_RMOD=$(SIPI_ELF).rmod -SIPI_BIN=$(SIPI_ELF:.elf=) -SIPI_DOTO=$(SIPI_ELF:.elf=.o) - -ifeq ($(CONFIG_HAVE_RAMSTAGE),y) -TARGET_STAGE=ramstage -else ifeq ($(CONFIG_RAMPAYLOAD),y) -TARGET_STAGE=postcar -else -$(error Halting the build due to unknown TARGET_STAGE select) -endif - -ifeq ($(CONFIG_PARALLEL_MP),y) -$(TARGET_STAGE)-srcs += $(SIPI_BIN).manual -endif -rmodules_$(ARCH-$(TARGET_STAGE)-y)-$(CONFIG_PARALLEL_MP) += sipi_vector.S - -$(SIPI_DOTO): $(call src-to-obj,rmodules_$(ARCH-$(TARGET_STAGE)-y),src/cpu/x86/sipi_vector.S) - $(LD_rmodules_$(ARCH-$(TARGET_STAGE)-y)) -nostdlib -r -o $@ $^ - -$(eval $(call rmodule_link,$(SIPI_ELF), $(SIPI_DOTO), 0,$(ARCH-$(TARGET_STAGE)-y))) - -$(SIPI_BIN): $(SIPI_RMOD) - $(OBJCOPY_$(TARGET_STAGE)) -O binary $< $@ - -$(call src-to-obj,$(TARGET_STAGE),$(SIPI_BIN).manual): $(SIPI_BIN) - @printf " OBJCOPY $(subst $(obj)/,,$(@))\n" - cd $(dir $<); $(OBJCOPY_rmodules_$(ARCH-$(TARGET_STAGE)-y)) -I binary $(notdir $<) $(target-objcopy) $(abspath $@) - -ramstage-y += topology.c diff --git a/src/cpu/x86/Makefile.mk b/src/cpu/x86/Makefile.mk new file mode 100644 index 000000000000..9e9b837417eb --- /dev/null +++ b/src/cpu/x86/Makefile.mk @@ -0,0 +1,71 @@ +## SPDX-License-Identifier: GPL-2.0-only + +subdirs-y += lapic +subdirs-y += mtrr +subdirs-y += pae +subdirs-$(CONFIG_HAVE_SMI_HANDLER) += smm +subdirs-$(CONFIG_UDELAY_TSC) += tsc +# Use ARCH_BOOTBLOCK_X86_64 as a proxy for knowing if 64bit is going to be used +subdirs-$(CONFIG_ARCH_BOOTBLOCK_X86_64) += 64bit +subdirs-y += cache + +subdirs-$(CONFIG_PARALLEL_MP) += name + +ifeq ($(CONFIG_HAVE_SMI_HANDLER),y) +$(obj)/ramstage/cpu/x86/smm_start32_offset.h: $(dir)/smm_start32_offset.h.template $(obj)/smmstub/smmstub.elf + cp $< $@.temp + sed -i 's/##START32_OFFSET##/0x'$$($(NM_smmstub) -an $(obj)/smmstub/smmstub.elf | grep smm_trampolin | cut -d' ' -f1)'/' $@.temp + mv $@.temp $@ +else +$(obj)/ramstage/cpu/x86/smm_start32_offset.h: $(dir)/smm_start32_offset.h.template + cp $< $@.temp + sed -i 's/##START32_OFFSET##/0x0/' $@.temp + mv $@.temp $@ +endif + +$(call src-to-obj,ramstage,$(dir)/mp_init.c): $(obj)/ramstage/cpu/x86/smm_start32_offset.h +ramstage-$(CONFIG_PARALLEL_MP) += mp_init.c + +ramstage-y += backup_default_smm.c +ramstage-y += smi_trigger.c +smm-y += smi_trigger.c + +subdirs-$(CONFIG_CPU_INTEL_COMMON_SMM) += ../intel/smm + +bootblock-y += entry32.S +bootblock-y += entry16.S +bootblock-y += reset16.S + +additional-dirs += $(obj)/cpu/x86 + +SIPI_ELF=$(obj)/cpu/x86/sipi_vector.elf +SIPI_RMOD=$(SIPI_ELF).rmod +SIPI_BIN=$(SIPI_ELF:.elf=) +SIPI_DOTO=$(SIPI_ELF:.elf=.o) + +ifeq ($(CONFIG_HAVE_RAMSTAGE),y) +TARGET_STAGE=ramstage +else ifeq ($(CONFIG_RAMPAYLOAD),y) +TARGET_STAGE=postcar +else +$(error Halting the build due to unknown TARGET_STAGE select) +endif + +ifeq ($(CONFIG_PARALLEL_MP),y) +$(TARGET_STAGE)-srcs += $(SIPI_BIN).manual +endif +rmodules_$(ARCH-$(TARGET_STAGE)-y)-$(CONFIG_PARALLEL_MP) += sipi_vector.S + +$(SIPI_DOTO): $(call src-to-obj,rmodules_$(ARCH-$(TARGET_STAGE)-y),src/cpu/x86/sipi_vector.S) + $(LD_rmodules_$(ARCH-$(TARGET_STAGE)-y)) -nostdlib -r -o $@ $^ + +$(eval $(call rmodule_link,$(SIPI_ELF), $(SIPI_DOTO), 0,$(ARCH-$(TARGET_STAGE)-y))) + +$(SIPI_BIN): $(SIPI_RMOD) + $(OBJCOPY_$(TARGET_STAGE)) -O binary $< $@ + +$(call src-to-obj,$(TARGET_STAGE),$(SIPI_BIN).manual): $(SIPI_BIN) + @printf " OBJCOPY $(subst $(obj)/,,$(@))\n" + cd $(dir $<); $(OBJCOPY_rmodules_$(ARCH-$(TARGET_STAGE)-y)) -I binary $(notdir $<) $(target-objcopy) $(abspath $@) + +ramstage-y += topology.c diff --git a/src/cpu/x86/cache/Makefile.inc b/src/cpu/x86/cache/Makefile.inc deleted file mode 100644 index aaaa5fee377e..000000000000 --- a/src/cpu/x86/cache/Makefile.inc +++ /dev/null @@ -1,4 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -romstage-y += cache.c -ramstage-y += cache.c diff --git a/src/cpu/x86/cache/Makefile.mk b/src/cpu/x86/cache/Makefile.mk new file mode 100644 index 000000000000..aaaa5fee377e --- /dev/null +++ b/src/cpu/x86/cache/Makefile.mk @@ -0,0 +1,4 @@ +## SPDX-License-Identifier: GPL-2.0-only + +romstage-y += cache.c +ramstage-y += cache.c diff --git a/src/cpu/x86/lapic/Makefile.inc b/src/cpu/x86/lapic/Makefile.inc deleted file mode 100644 index dd484ee6f660..000000000000 --- a/src/cpu/x86/lapic/Makefile.inc +++ /dev/null @@ -1,11 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -ramstage-$(CONFIG_AP_IN_SIPI_WAIT) += lapic_cpu_stop.c - -bootblock-$(CONFIG_UDELAY_LAPIC) += apic_timer.c -romstage-$(CONFIG_UDELAY_LAPIC) += apic_timer.c -ramstage-$(CONFIG_UDELAY_LAPIC) += apic_timer.c -postcar-$(CONFIG_UDELAY_LAPIC) += apic_timer.c - -all_x86-y += boot_cpu.c -all_x86-y += lapic.c diff --git a/src/cpu/x86/lapic/Makefile.mk b/src/cpu/x86/lapic/Makefile.mk new file mode 100644 index 000000000000..dd484ee6f660 --- /dev/null +++ b/src/cpu/x86/lapic/Makefile.mk @@ -0,0 +1,11 @@ +## SPDX-License-Identifier: GPL-2.0-only + +ramstage-$(CONFIG_AP_IN_SIPI_WAIT) += lapic_cpu_stop.c + +bootblock-$(CONFIG_UDELAY_LAPIC) += apic_timer.c +romstage-$(CONFIG_UDELAY_LAPIC) += apic_timer.c +ramstage-$(CONFIG_UDELAY_LAPIC) += apic_timer.c +postcar-$(CONFIG_UDELAY_LAPIC) += apic_timer.c + +all_x86-y += boot_cpu.c +all_x86-y += lapic.c diff --git a/src/cpu/x86/mtrr/Makefile.inc b/src/cpu/x86/mtrr/Makefile.inc deleted file mode 100644 index c74f014531d5..000000000000 --- a/src/cpu/x86/mtrr/Makefile.inc +++ /dev/null @@ -1,16 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -ramstage-y += mtrr.c - -romstage-y += earlymtrr.c -bootblock-y += earlymtrr.c -verstage_x86-y += earlymtrr.c -postcar-y += earlymtrr.c - -bootblock-y += debug.c -romstage-y += debug.c -postcar-y += debug.c -ramstage-y += debug.c - -bootblock-$(CONFIG_SETUP_XIP_CACHE) += xip_cache.c -verstage_x86-$(CONFIG_SETUP_XIP_CACHE) += xip_cache.c diff --git a/src/cpu/x86/mtrr/Makefile.mk b/src/cpu/x86/mtrr/Makefile.mk new file mode 100644 index 000000000000..c74f014531d5 --- /dev/null +++ b/src/cpu/x86/mtrr/Makefile.mk @@ -0,0 +1,16 @@ +## SPDX-License-Identifier: GPL-2.0-only + +ramstage-y += mtrr.c + +romstage-y += earlymtrr.c +bootblock-y += earlymtrr.c +verstage_x86-y += earlymtrr.c +postcar-y += earlymtrr.c + +bootblock-y += debug.c +romstage-y += debug.c +postcar-y += debug.c +ramstage-y += debug.c + +bootblock-$(CONFIG_SETUP_XIP_CACHE) += xip_cache.c +verstage_x86-$(CONFIG_SETUP_XIP_CACHE) += xip_cache.c diff --git a/src/cpu/x86/name/Makefile.inc b/src/cpu/x86/name/Makefile.inc deleted file mode 100644 index f76927094b3e..000000000000 --- a/src/cpu/x86/name/Makefile.inc +++ /dev/null @@ -1,5 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -bootblock-y += name.c -romstage-y += name.c -ramstage-y += name.c diff --git a/src/cpu/x86/name/Makefile.mk b/src/cpu/x86/name/Makefile.mk new file mode 100644 index 000000000000..f76927094b3e --- /dev/null +++ b/src/cpu/x86/name/Makefile.mk @@ -0,0 +1,5 @@ +## SPDX-License-Identifier: GPL-2.0-only + +bootblock-y += name.c +romstage-y += name.c +ramstage-y += name.c diff --git a/src/cpu/x86/pae/Makefile.inc b/src/cpu/x86/pae/Makefile.inc deleted file mode 100644 index 728a3e4fa40e..000000000000 --- a/src/cpu/x86/pae/Makefile.inc +++ /dev/null @@ -1,4 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -all_x86-y += pgtbl.c -smm-y += pgtbl.c diff --git a/src/cpu/x86/pae/Makefile.mk b/src/cpu/x86/pae/Makefile.mk new file mode 100644 index 000000000000..728a3e4fa40e --- /dev/null +++ b/src/cpu/x86/pae/Makefile.mk @@ -0,0 +1,4 @@ +## SPDX-License-Identifier: GPL-2.0-only + +all_x86-y += pgtbl.c +smm-y += pgtbl.c diff --git a/src/cpu/x86/smm/Makefile.inc b/src/cpu/x86/smm/Makefile.inc deleted file mode 100644 index dbe9c7526200..000000000000 --- a/src/cpu/x86/smm/Makefile.inc +++ /dev/null @@ -1,77 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -ramstage-y += smm_module_loader.c -ramstage-$(CONFIG_SMM_PCI_RESOURCE_STORE) += pci_resource_store.c - -smm-$(CONFIG_SMM_PCI_RESOURCE_STORE) += pci_resource_store.c - -ifeq ($(CONFIG_ARCH_RAMSTAGE_X86_32),y) -$(eval $(call create_class_compiler,smm,x86_32)) -$(eval $(call create_class_compiler,smmstub,x86_32)) -else -$(eval $(call create_class_compiler,smm,x86_64)) -$(eval $(call create_class_compiler,smmstub,x86_64)) -endif - -smmstub-generic-ccopts += -D__SMM__ -smm-generic-ccopts += -D__SMM__ -smm-c-deps+=$$(OPTION_TABLE_H) - -$(obj)/smm/smm.o: $$(smm-objs) $(COMPILER_RT_smm) - $(LD_smm) -nostdlib -r -o $@ $(COMPILER_RT_FLAGS_smm) --whole-archive --start-group $(filter-out %.ld, $(smm-objs)) --no-whole-archive $(COMPILER_RT_smm) --end-group - -# change to the target path because objcopy will use the path name in its -# ELF symbol names. -$(call src-to-obj,ramstage,$(obj)/cpu/x86/smm/smm.manual): $(obj)/smm/smm - @printf " OBJCOPY $(subst $(obj)/,,$(@))\n" - cd $(dir $<); $(OBJCOPY_smm) -I binary $(notdir $<) $(target-objcopy) $(abspath $@) - -ifeq ($(CONFIG_HAVE_SMI_HANDLER),y) -ramstage-srcs += $(obj)/cpu/x86/smm/smm.manual -endif - -smm-y += save_state.c - -ramstage-y += tseg_region.c -romstage-y += tseg_region.c -postcar-y += tseg_region.c - -ifeq ($(CONFIG_PARALLEL_MP),y) - -smmstub-y += smm_stub.S - -smm-y += smm_module_handler.c - -ramstage-srcs += $(obj)/cpu/x86/smm/smmstub.manual - -# SMM Stub Module. The stub is used as a trampoline for relocation and normal -# SMM handling. -$(obj)/smmstub/smmstub.o: $$(smmstub-objs) $(COMPILER_RT_smmstub) - $(LD_smmstub) -nostdlib -r -o $@ $(COMPILER_RT_FLAGS_smmstub) --whole-archive --start-group $(smmstub-objs) --no-whole-archive $(COMPILER_RT_smmstub) --end-group - -# Link the SMM stub module with a 0-byte heap. -ifeq ($(CONFIG_ARCH_RAMSTAGE_X86_32),y) -$(eval $(call rmodule_link,$(obj)/smmstub/smmstub.elf, $(obj)/smmstub/smmstub.o, 0,x86_32)) -else -$(eval $(call rmodule_link,$(obj)/smmstub/smmstub.elf, $(obj)/smmstub/smmstub.o, 0,x86_64)) -endif - -$(obj)/smmstub/smmstub: $(obj)/smmstub/smmstub.elf.rmod - $(OBJCOPY_smmstub) -O binary $< $@ - -$(call src-to-obj,ramstage,$(obj)/cpu/x86/smm/smmstub.manual): $(obj)/smmstub/smmstub - @printf " OBJCOPY $(subst $(obj)/,,$(@))\n" - cd $(dir $<); $(OBJCOPY_smmstub) -I binary $(notdir $<) $(target-objcopy) $(abspath $@) - -# C-based SMM handler. - -ifeq ($(CONFIG_ARCH_RAMSTAGE_X86_32),y) -$(eval $(call rmodule_link,$(obj)/smm/smm.elf, $(obj)/smm/smm.o, 0,x86_32)) -else -$(eval $(call rmodule_link,$(obj)/smm/smm.elf, $(obj)/smm/smm.o, 0,x86_64)) -endif - -$(obj)/smm/smm: $(obj)/smm/smm.elf.rmod - $(OBJCOPY_smm) -O binary $< $@ - -endif diff --git a/src/cpu/x86/smm/Makefile.mk b/src/cpu/x86/smm/Makefile.mk new file mode 100644 index 000000000000..dbe9c7526200 --- /dev/null +++ b/src/cpu/x86/smm/Makefile.mk @@ -0,0 +1,77 @@ +## SPDX-License-Identifier: GPL-2.0-only + +ramstage-y += smm_module_loader.c +ramstage-$(CONFIG_SMM_PCI_RESOURCE_STORE) += pci_resource_store.c + +smm-$(CONFIG_SMM_PCI_RESOURCE_STORE) += pci_resource_store.c + +ifeq ($(CONFIG_ARCH_RAMSTAGE_X86_32),y) +$(eval $(call create_class_compiler,smm,x86_32)) +$(eval $(call create_class_compiler,smmstub,x86_32)) +else +$(eval $(call create_class_compiler,smm,x86_64)) +$(eval $(call create_class_compiler,smmstub,x86_64)) +endif + +smmstub-generic-ccopts += -D__SMM__ +smm-generic-ccopts += -D__SMM__ +smm-c-deps+=$$(OPTION_TABLE_H) + +$(obj)/smm/smm.o: $$(smm-objs) $(COMPILER_RT_smm) + $(LD_smm) -nostdlib -r -o $@ $(COMPILER_RT_FLAGS_smm) --whole-archive --start-group $(filter-out %.ld, $(smm-objs)) --no-whole-archive $(COMPILER_RT_smm) --end-group + +# change to the target path because objcopy will use the path name in its +# ELF symbol names. +$(call src-to-obj,ramstage,$(obj)/cpu/x86/smm/smm.manual): $(obj)/smm/smm + @printf " OBJCOPY $(subst $(obj)/,,$(@))\n" + cd $(dir $<); $(OBJCOPY_smm) -I binary $(notdir $<) $(target-objcopy) $(abspath $@) + +ifeq ($(CONFIG_HAVE_SMI_HANDLER),y) +ramstage-srcs += $(obj)/cpu/x86/smm/smm.manual +endif + +smm-y += save_state.c + +ramstage-y += tseg_region.c +romstage-y += tseg_region.c +postcar-y += tseg_region.c + +ifeq ($(CONFIG_PARALLEL_MP),y) + +smmstub-y += smm_stub.S + +smm-y += smm_module_handler.c + +ramstage-srcs += $(obj)/cpu/x86/smm/smmstub.manual + +# SMM Stub Module. The stub is used as a trampoline for relocation and normal +# SMM handling. +$(obj)/smmstub/smmstub.o: $$(smmstub-objs) $(COMPILER_RT_smmstub) + $(LD_smmstub) -nostdlib -r -o $@ $(COMPILER_RT_FLAGS_smmstub) --whole-archive --start-group $(smmstub-objs) --no-whole-archive $(COMPILER_RT_smmstub) --end-group + +# Link the SMM stub module with a 0-byte heap. +ifeq ($(CONFIG_ARCH_RAMSTAGE_X86_32),y) +$(eval $(call rmodule_link,$(obj)/smmstub/smmstub.elf, $(obj)/smmstub/smmstub.o, 0,x86_32)) +else +$(eval $(call rmodule_link,$(obj)/smmstub/smmstub.elf, $(obj)/smmstub/smmstub.o, 0,x86_64)) +endif + +$(obj)/smmstub/smmstub: $(obj)/smmstub/smmstub.elf.rmod + $(OBJCOPY_smmstub) -O binary $< $@ + +$(call src-to-obj,ramstage,$(obj)/cpu/x86/smm/smmstub.manual): $(obj)/smmstub/smmstub + @printf " OBJCOPY $(subst $(obj)/,,$(@))\n" + cd $(dir $<); $(OBJCOPY_smmstub) -I binary $(notdir $<) $(target-objcopy) $(abspath $@) + +# C-based SMM handler. + +ifeq ($(CONFIG_ARCH_RAMSTAGE_X86_32),y) +$(eval $(call rmodule_link,$(obj)/smm/smm.elf, $(obj)/smm/smm.o, 0,x86_32)) +else +$(eval $(call rmodule_link,$(obj)/smm/smm.elf, $(obj)/smm/smm.o, 0,x86_64)) +endif + +$(obj)/smm/smm: $(obj)/smm/smm.elf.rmod + $(OBJCOPY_smm) -O binary $< $@ + +endif diff --git a/src/cpu/x86/tsc/Makefile.inc b/src/cpu/x86/tsc/Makefile.inc deleted file mode 100644 index 654c139a5a67..000000000000 --- a/src/cpu/x86/tsc/Makefile.inc +++ /dev/null @@ -1,4 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -all_x86-y += delay_tsc.c -smm-y += delay_tsc.c diff --git a/src/cpu/x86/tsc/Makefile.mk b/src/cpu/x86/tsc/Makefile.mk new file mode 100644 index 000000000000..654c139a5a67 --- /dev/null +++ b/src/cpu/x86/tsc/Makefile.mk @@ -0,0 +1,4 @@ +## SPDX-License-Identifier: GPL-2.0-only + +all_x86-y += delay_tsc.c +smm-y += delay_tsc.c -- cgit v1.2.3