soc/amd/common: Add warning if microcode CBFS filename is in use
Because of the way that the CBFS filename is generated from the contents of the microcode patch, if a duplicate microcode patch is included in the build, the makefile would create a second copy of the name, which doesn't work. This led to "odd" results where the other attributes of the first copy were erased, causing cbfstool to fail. The cause of the failure is not immediately obvious, and is a little difficult to track down. This patch causes an immediate failure and gives a reason as to the cause of the issue. When a failure is seen, this is the result: File1: 3rdparty/amd_blobs/phoenix/psp/TypeId0x66_UcodePatch_PHXn4_A0.bin File2: 3rdparty/amd_blobs/phoenix/psp/TypeId0x66_UcodePatch_PHX4_A0.bin src/soc/amd/common/block/cpu/Makefile.inc:25: *** Error: The cbfs filename "cpu_microcode_a740.bin" is used for both above files. Check your microcode patches for duplicates.. Stop. TEST=Now checked for both positive and negative failures. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I3d34dc5585182545bdcbfa6370ebc34aa767cae2 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76423 Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
e3bbd72857
commit
c987d7b7d3
|
@ -10,6 +10,7 @@ ramstage-$(CONFIG_SOC_AMD_COMMON_BLOCK_UCODE) += update_microcode.c
|
|||
|
||||
ifeq ($(CONFIG_SOC_AMD_COMMON_BLOCK_UCODE),y)
|
||||
define add-ucode-as-cbfs
|
||||
$(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.))
|
||||
cbfs-files-y += cpu_microcode_$(2).bin
|
||||
cpu_microcode_$(2).bin-file := $(1)
|
||||
cpu_microcode_$(2).bin-type := microcode
|
||||
|
|
Loading…
Reference in New Issue