X86: fix cpu_phys_address_size()
authorSven Schnelle <svens@stackframe.org>
Tue, 31 Jan 2012 21:10:28 +0000 (22:10 +0100)
committerSven Schnelle <svens@stackframe.org>
Tue, 31 Jan 2012 21:47:39 +0000 (22:47 +0100)
CPUs with CPUID level >= 0x80000008 can return
the number of physical address bits.

Change-Id: I1c0523b6a091c476af838d173ed9030280360d7f
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Reviewed-on: http://review.coreboot.org/599
Tested-by: build bot (Jenkins)
src/arch/x86/lib/cpu.c

index aaa0a161853f51a81aae13da66b7b0a24e7838d5..ada57e22fe3cffc9777e27c09571790f6795639d 100644 (file)
@@ -144,7 +144,7 @@ int cpu_phys_address_size(void)
        if (!(have_cpuid_p()))
                return 32;
 
-       if (cpu_cpuid_extended_level() > 0x80000008)
+       if (cpu_cpuid_extended_level() >= 0x80000008)
                return cpuid_eax(0x80000008) & 0xff;
 
        if (cpuid_eax(1) & (CPUID_FEATURE_PAE | CPUID_FEATURE_PSE36))