blob: 7541a9bd5b6bb7c3c5794454a1113d46c5f3afdf [file] [log] [blame]
Felix Held0a93f7a2020-12-05 00:35:24 +01001subdirs-y += ./*
Raul E Rangel394c6b02021-02-12 14:37:43 -07002ramstage-$(CONFIG_SOC_AMD_COMMON_BLOCK_UCODE) += update_microcode.c
Arthur Heymans44807ac2022-09-13 12:43:37 +02003romstage-y += cpu.c
4ramstage-y += cpu.c
Fred Reitberger96f7b962022-04-12 13:44:34 -04005
6ifeq ($(CONFIG_SOC_AMD_COMMON_BLOCK_UCODE),y)
7define add-ucode-as-cbfs
8cbfs-files-y += cpu_microcode_$(2).bin
9cpu_microcode_$(2).bin-file := $(1)
10cpu_microcode_$(2).bin-type := microcode
11
12ifeq ($(CONFIG_SOC_AMD_COMMON_BLOCK_LPC_SPI_DMA),y)
13cpu_microcode_$(2).bin-align := 64
14else
15cpu_microcode_$(2).bin-align := 16
16endif
17endef
18
19$(foreach ucode,$(amd_microcode_bins),$(eval $(call add-ucode-as-cbfs,$(ucode),$(shell hexdump -n 2 -s 0x18 -e '"%x"' $(ucode)))))
20endif