[coreboot-gerrit] New patch to review for coreboot: cpu/amd/model_10xxx: Install AMD-provided microcode files in CBFS
Timothy Pearson (tpearson@raptorengineeringinc.com)
gerrit at coreboot.org
Thu Oct 8 22:06:29 CET 2015
Timothy Pearson (tpearson at raptorengineeringinc.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11832
-gerrit
commit 86c03eb2a3e8d9514722df3c2c3e5220657c5687
Author: Timothy Pearson <tpearson at raptorengineeringinc.com>
Date: Thu Oct 8 16:58:58 2015 -0500
cpu/amd/model_10xxx: Install AMD-provided microcode files in CBFS
Change-Id: I208b012c6b612a94b3bbc8235d5a005028be8bcc
Signed-off-by: Timothy Pearson <tpearson at raptorengineeringinc.com>
---
3rdparty/blobs | 2 +-
src/cpu/Kconfig | 4 ++++
src/cpu/Makefile.inc | 20 +++++++++++++-------
src/cpu/amd/model_10xxx/Kconfig | 1 +
src/cpu/amd/model_10xxx/Makefile.inc | 11 ++++++++++-
5 files changed, 29 insertions(+), 9 deletions(-)
diff --git a/3rdparty/blobs b/3rdparty/blobs
index 230923c..2357373 160000
--- a/3rdparty/blobs
+++ b/3rdparty/blobs
@@ -1 +1 @@
-Subproject commit 230923c2b028f8048b0023754d1c73f4760f4b8d
+Subproject commit 23573739099aa71b573f45cdc086c6ba095c94d6
diff --git a/src/cpu/Kconfig b/src/cpu/Kconfig
index bfe00fe..109b83f 100644
--- a/src/cpu/Kconfig
+++ b/src/cpu/Kconfig
@@ -67,6 +67,10 @@ config SUPPORT_CPU_UCODE_IN_CBFS
bool
default n
+config CPU_MICROCODE_MULTIPLE_CONTAINERS
+ bool
+ default n
+
# This variable is used to determine if we add CPU microcode to CBFS during the
# build. Microcode can be added manually afterwards, or removed. As a result,
# code should not rely on this to tell if a microcode update is present or not,
diff --git a/src/cpu/Makefile.inc b/src/cpu/Makefile.inc
index 9220a8a..ccfb3e0 100644
--- a/src/cpu/Makefile.inc
+++ b/src/cpu/Makefile.inc
@@ -24,25 +24,31 @@ cbfs_include_ucode = y
endif
ifeq ($(CONFIG_CPU_MICROCODE_CBFS_GENERATE), y)
+ifeq ($(CONFIG_CPU_MICROCODE_MULTIPLE_CONTAINERS), n)
cpu_ucode_cbfs_file = $(obj)/cpu_microcode_blob.bin
+endif
cbfs_include_ucode = y
endif
-# We just mash all microcode binaries together into one binary to rule them all.
-# This approach assumes that the microcode binaries are properly padded, and
-# their headers specify the correct size. This works fairly well on isolatied
-# updates, such as Intel and some AMD microcode, but won't work very well if the
-# updates are wrapped in a container, like AMD's microcode update container. If
-# there is only one microcode binary (i.e. one container), then we don't have
-# this issue, and this rule will continue to work.
$(obj)/cpu_microcode_blob.bin: $$(cpu_microcode_bins)
+ # We just mash all microcode binaries together into one binary to rule them all.
+ # This approach assumes that the microcode binaries are properly padded, and
+ # their headers specify the correct size. This works fairly well on isolatied
+ # updates, such as Intel and some AMD microcode, but won't work very well if the
+ # updates are wrapped in a container, like AMD's microcode update container. If
+ # there is only one microcode binary (i.e. one container), then we don't have
+ # this issue, and this rule will continue to work.
+ # Note that even if separate microcode files are being added to cbfs we generate
+ # the combined microcode file anyway.
@printf " MICROCODE $(subst $(obj)/,,$(@))\n"
@echo $(cpu_microcode_bins)
cat $+ > $@
+ifeq ($(CONFIG_CPU_MICROCODE_MULTIPLE_CONTAINERS), n)
cbfs-files-$(cbfs_include_ucode) += cpu_microcode_blob.bin
cpu_microcode_blob.bin-file := $(cpu_ucode_cbfs_file)
cpu_microcode_blob.bin-type := microcode
+endif
ifneq ($(CONFIG_CPU_MICROCODE_CBFS_LOC),)
cpu_microcode_blob.bin-position := $(CONFIG_CPU_MICROCODE_CBFS_LOC)
diff --git a/src/cpu/amd/model_10xxx/Kconfig b/src/cpu/amd/model_10xxx/Kconfig
index ebd282a..e2c7c88 100644
--- a/src/cpu/amd/model_10xxx/Kconfig
+++ b/src/cpu/amd/model_10xxx/Kconfig
@@ -11,6 +11,7 @@ config CPU_AMD_MODEL_10XXX
select UDELAY_LAPIC
select HAVE_MONOTONIC_TIMER
select SUPPORT_CPU_UCODE_IN_CBFS
+ select CPU_MICROCODE_MULTIPLE_CONTAINERS
if CPU_AMD_MODEL_10XXX
diff --git a/src/cpu/amd/model_10xxx/Makefile.inc b/src/cpu/amd/model_10xxx/Makefile.inc
index 122e474..aa1a777 100644
--- a/src/cpu/amd/model_10xxx/Makefile.inc
+++ b/src/cpu/amd/model_10xxx/Makefile.inc
@@ -8,4 +8,13 @@ ramstage-y += ram_calc.c
ramstage-y += monotonic_timer.c
ramstage-$(CONFIG_HAVE_ACPI_TABLES) += powernow_acpi.c
-cpu_microcode_bins += 3rdparty/blobs/cpu/amd/model_10xxx/microcode.bin
+ifeq ($(CONFIG_CPU_MICROCODE_MULTIPLE_CONTAINERS), y)
+# Family 10h and below
+cbfs-files-$(cbfs_include_ucode) += microcode_amd.bin
+microcode_amd.bin-file := 3rdparty/blobs/cpu/amd/model_10xxx/microcode_amd.bin
+microcode_amd.bin-type := microcode
+# Family 15h
+cbfs-files-$(cbfs_include_ucode) += microcode_amd_fam15h.bin
+microcode_amd_fam15h.bin-file := 3rdparty/blobs/cpu/amd/model_10xxx/microcode_amd_fam15h.bin
+microcode_amd_fam15h.bin-type := microcode
+endif
More information about the coreboot-gerrit
mailing list