Felix Held | 0a93f7a | 2020-12-05 00:35:24 +0100 | [diff] [blame] | 1 | subdirs-y += ./* |
Raul E Rangel | 394c6b0 | 2021-02-12 14:37:43 -0700 | [diff] [blame] | 2 | ramstage-$(CONFIG_SOC_AMD_COMMON_BLOCK_UCODE) += update_microcode.c |
Arthur Heymans | 44807ac | 2022-09-13 12:43:37 +0200 | [diff] [blame^] | 3 | romstage-y += cpu.c |
| 4 | ramstage-y += cpu.c |
Fred Reitberger | 96f7b96 | 2022-04-12 13:44:34 -0400 | [diff] [blame] | 5 | |
| 6 | ifeq ($(CONFIG_SOC_AMD_COMMON_BLOCK_UCODE),y) |
| 7 | define add-ucode-as-cbfs |
| 8 | cbfs-files-y += cpu_microcode_$(2).bin |
| 9 | cpu_microcode_$(2).bin-file := $(1) |
| 10 | cpu_microcode_$(2).bin-type := microcode |
| 11 | |
| 12 | ifeq ($(CONFIG_SOC_AMD_COMMON_BLOCK_LPC_SPI_DMA),y) |
| 13 | cpu_microcode_$(2).bin-align := 64 |
| 14 | else |
| 15 | cpu_microcode_$(2).bin-align := 16 |
| 16 | endif |
| 17 | endef |
| 18 | |
| 19 | $(foreach ucode,$(amd_microcode_bins),$(eval $(call add-ucode-as-cbfs,$(ucode),$(shell hexdump -n 2 -s 0x18 -e '"%x"' $(ucode))))) |
| 20 | endif |