diff options
author | Martin Roth <gaumless@gmail.com> | 2023-07-13 13:21:28 -0600 |
---|---|---|
committer | Martin Roth <martin.roth@amd.corp-partner.google.com> | 2023-07-14 21:42:43 +0000 |
commit | c987d7b7d31770962ba0437c4144568e2b98b91c (patch) | |
tree | 5bca1d50a4121283a2aab5a08ec3047b42339328 /src/soc | |
parent | e3bbd72857c246731c8627c043c0f38735dcefc3 (diff) |
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>
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/amd/common/block/cpu/Makefile.inc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/soc/amd/common/block/cpu/Makefile.inc b/src/soc/amd/common/block/cpu/Makefile.inc index f198af2e30..1c4331cb91 100644 --- a/src/soc/amd/common/block/cpu/Makefile.inc +++ b/src/soc/amd/common/block/cpu/Makefile.inc @@ -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 |