From 64b88623cb7115bb064f9c847d88021e30c82499 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Mon, 7 Dec 2020 15:25:36 +0100 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/48413 Reviewed-by: Patrick Rudolph Tested-by: build bot (Jenkins) --- src/northbridge/intel/sandybridge/early_dmi.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/northbridge') diff --git a/src/northbridge/intel/sandybridge/early_dmi.c b/src/northbridge/intel/sandybridge/early_dmi.c index bcf3e4ce4d..6f17cc1687 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 #include +#include #include #include -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 @@ void early_init_dmi(void) DMIBAR32(DMIL0SLAT); // !!! = 0x00c26460 DMIBAR32(DMIL0SLAT) = 0x00c2403c; +} + +void early_init_dmi(void) +{ + dmi_recipe(); early_pch_init_native_dmi_pre(); -- cgit v1.2.3