diff options
author | Angel Pons <th3fanbus@gmail.com> | 2020-12-07 15:25:36 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-01-25 09:07:30 +0000 |
commit | 64b88623cb7115bb064f9c847d88021e30c82499 (patch) | |
tree | 71bed95310f914cc31858d41f69541d2694c1ca3 /src/northbridge/intel | |
parent | 77516ca79225f91fdcb4fc837f141a320de5371a (diff) |
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>
Diffstat (limited to 'src/northbridge/intel')
-rw-r--r-- | src/northbridge/intel/sandybridge/early_dmi.c | 15 |
1 files changed, 14 insertions, 1 deletions
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 <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 @@ void early_init_dmi(void) DMIBAR32(DMIL0SLAT); // !!! = 0x00c26460 DMIBAR32(DMIL0SLAT) = 0x00c2403c; +} + +void early_init_dmi(void) +{ + dmi_recipe(); early_pch_init_native_dmi_pre(); |