Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/48413 )
Change subject: nb/intel/sandybridge: Only run DMI recipe on Ivy Bridge ......................................................................
nb/intel/sandybridge: Only run DMI recipe on Ivy Bridge
Reference code does not run any DMI recipe for Sandy Bridge. Create a helper function and exit early for Sandy Bridge. The CPUID value will be used in a follow-up, since DMI setup has stepping-specific steps.
Change-Id: I5d7afb1ef516f447b4988dd5c2f0295771d5888e Signed-off-by: Angel Pons th3fanbus@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/48413 Reviewed-by: Patrick Rudolph siro@das-labor.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/northbridge/intel/sandybridge/early_dmi.c 1 file changed, 14 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Patrick Rudolph: Looks good to me, approved
diff --git a/src/northbridge/intel/sandybridge/early_dmi.c b/src/northbridge/intel/sandybridge/early_dmi.c index bcf3e4c..6f17cc1 100644 --- a/src/northbridge/intel/sandybridge/early_dmi.c +++ b/src/northbridge/intel/sandybridge/early_dmi.c @@ -1,13 +1,21 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <arch/cpu.h> #include <console/console.h> +#include <cpu/intel/model_206ax/model_206ax.h> #include <northbridge/intel/sandybridge/sandybridge.h> #include <southbridge/intel/bd82x6x/pch.h>
-void early_init_dmi(void) +static void dmi_recipe(void) { + const u32 cpuid = cpu_get_cpuid(); + int i;
+ /* The DMI recipe is only needed on Ivy Bridge */ + if (!IS_IVY_CPU(cpuid)) + return; + for (i = 0; i < 2; i++) { DMIBAR32(0x0914 + (i << 5)) |= (1 << 31); } @@ -158,6 +166,11 @@
DMIBAR32(DMIL0SLAT); // !!! = 0x00c26460 DMIBAR32(DMIL0SLAT) = 0x00c2403c; +} + +void early_init_dmi(void) +{ + dmi_recipe();
early_pch_init_native_dmi_pre();