Martin Roth | f6ca89c | 2023-08-04 12:06:21 -0600 | [diff] [blame] | 1 | ## SPDX-License-Identifier: GPL-2.0-only |
| 2 | |
Arthur Heymans | c6bf74e | 2019-01-05 17:18:11 +0100 | [diff] [blame] | 3 | bootblock-$(CONFIG_MICROCODE_UPDATE_PRE_RAM) += microcode_asm.S |
Arthur Heymans | c6bf74e | 2019-01-05 17:18:11 +0100 | [diff] [blame] | 4 | |
Rizwan Qureshi | 279d8b5 | 2019-09-05 20:06:20 +0530 | [diff] [blame] | 5 | bootblock-$(CONFIG_SUPPORT_CPU_UCODE_IN_CBFS) += microcode.c |
Alexandru Gagniuc | 2c38f50 | 2013-12-06 23:14:54 -0600 | [diff] [blame] | 6 | ramstage-$(CONFIG_SUPPORT_CPU_UCODE_IN_CBFS) += microcode.c |
Aaron Durbin | a02bb65 | 2016-02-05 14:58:06 -0600 | [diff] [blame] | 7 | romstage-$(CONFIG_SUPPORT_CPU_UCODE_IN_CBFS) += microcode.c |
Subrata Banik | 3c1b7b4 | 2023-05-20 16:28:18 +0530 | [diff] [blame] | 8 | |
| 9 | # Pack individual microcodes per CPUID from CONFIG_CPU_INTEL_UCODE_SPLIT_BINARIES directory into the CBFS. |
| 10 | ifeq ($(CONFIG_CPU_INTEL_MICROCODE_CBFS_SPLIT_BINS),y) |
| 11 | microcode-params-dir := $(call strip_quotes,$(CONFIG_CPU_INTEL_UCODE_SPLIT_BINARIES))/ |
| 12 | microcode-params := $(shell find "$(microcode-params-dir)" -type f -exec basename {} \;) |
| 13 | |
| 14 | # Make "cpu_microcode_$(CPUID).bin" file entry into the FIT table |
| 15 | $(call add_intermediate, add_mcu_fit, set_fit_ptr $(IFITTOOL)) |
| 16 | $(foreach params, $(microcode-params), $(shell $(IFITTOOL) -f $< -a -n $(params) -t 1 \ |
| 17 | -s $(CONFIG_CPU_INTEL_NUM_FIT_ENTRIES) -r COREBOOT)) true |
| 18 | |
| 19 | # Add "cpu_microcode_$(CPUID).bin" file into the CBFS |
| 20 | $(foreach params,$(microcode-params), \ |
| 21 | $(eval cbfs-files-y += $(params)) \ |
| 22 | $(eval $(params)-file := $(microcode-params-dir)/$(params)) \ |
| 23 | $(eval $(params)-type := microcode) \ |
Subrata Banik | 0fb2e66 | 2023-07-10 22:14:32 +0530 | [diff] [blame] | 24 | $(eval $(params)-align := 16) \ |
Subrata Banik | 3c1b7b4 | 2023-05-20 16:28:18 +0530 | [diff] [blame] | 25 | ) |
| 26 | |
| 27 | endif |