1 ## SPDX-License-Identifier: GPL-2.0-only
7 ramstage-
$(CONFIG_SOC_AMD_COMMON_BLOCK_SVI2
) += svi2.c
8 ramstage-
$(CONFIG_SOC_AMD_COMMON_BLOCK_SVI3
) += svi3.c
9 ramstage-
$(CONFIG_SOC_AMD_COMMON_BLOCK_UCODE
) += update_microcode.c
11 ifeq ($(CONFIG_SOC_AMD_COMMON_BLOCK_UCODE
),y
)
12 define add-ucode-as-cbfs
13 $(if
$(value cpu_microcode_
$(2).bin-file
),$(info File1
: $(cpu_microcode_
$(2).bin-file
)) $(info File2
: $(1)) $(error Error
: The cbfs filename
"cpu_microcode_$(2).bin" is used for both above files. Check your microcode patches for duplicates.
))
14 cbfs-files-y
+= cpu_microcode_
$(2).bin
15 cpu_microcode_
$(2).bin-file
:= $(1)
16 cpu_microcode_
$(2).bin-type
:= microcode
18 ifeq ($(CONFIG_SOC_AMD_COMMON_BLOCK_LPC_SPI_DMA
),y
)
19 cpu_microcode_
$(2).bin-align
:= 64
21 cpu_microcode_
$(2).bin-align
:= 16
25 $(foreach ucode
,$(amd_microcode_bins
),$(eval
$(call add-ucode-as-cbfs
,$(ucode
),$(shell hexdump
-n
2 -s
0x18 -e
'"%x"' $(ucode
)))))