From e4da9aa8974578eb35eea00bff0490d9a9f1b8e2 Mon Sep 17 00:00:00 2001 From: Ryan Salsamendi Date: Fri, 24 Jun 2016 12:01:11 -0700 Subject: intel/sandybridge: read correct leaf for cpu family Reading cpuid leaf 0 is incorrect for testing cpu family. Use leaf 1 instead. See Intel SDM 2a Table 3-17. Change-Id: Ib2c95cdd1fb93db06a08ecd7266f6b88700caf83 Signed-off-by: Ryan Salsamendi Reviewed-on: https://review.coreboot.org/15346 Tested-by: build bot (Jenkins) Reviewed-by: Marshall Dawson Reviewed-by: Patrick Rudolph --- src/northbridge/intel/sandybridge/raminit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/northbridge/intel') diff --git a/src/northbridge/intel/sandybridge/raminit.c b/src/northbridge/intel/sandybridge/raminit.c index cf66a0d54c..4ac7f3d6de 100644 --- a/src/northbridge/intel/sandybridge/raminit.c +++ b/src/northbridge/intel/sandybridge/raminit.c @@ -913,7 +913,7 @@ static void dram_timing_regs(ramctr_timing * ctrl) // ODT stretch reg = 0; - cpures = cpuid(0); + cpures = cpuid(1); cpu = cpures.eax; if (IS_IVY_CPU(cpu) || (IS_SANDY_CPU(cpu) && IS_SANDY_CPU_D2(cpu))) { @@ -3779,7 +3779,7 @@ static void set_4f8c(void) struct cpuid_result cpures; u32 cpu; - cpures = cpuid(0); + cpures = cpuid(1); cpu = (cpures.eax); if (IS_SANDY_CPU(cpu) && (IS_SANDY_CPU_D0(cpu) || IS_SANDY_CPU_D1(cpu))) { MCHBAR32(0x4f8c) = 0x141D1519; -- cgit v1.2.3