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 <rsalsamendi@hotmail.com>
Reviewed-on: https://review.coreboot.org/15346
Tested-by: build bot (Jenkins)
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
This commit is contained in:
Ryan Salsamendi 2016-06-24 12:01:11 -07:00 committed by Martin Roth
parent 6507e6f056
commit e4da9aa897
1 changed files with 2 additions and 2 deletions

View File

@ -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;