This seems to be a more official, common, simple way to check if the CPU is dual...
authorZheng Bao <zheng.bao@amd.com>
Fri, 10 Jul 2009 03:42:13 +0000 (03:42 +0000)
committerZheng Bao <Zheng.Bao@amd.com>
Fri, 10 Jul 2009 03:42:13 +0000 (03:42 +0000)
single core.

Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4415 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

src/southbridge/amd/sb600/sb600_early_setup.c

index b605b5e3bf4b45b7cf544ceee6f7d7145a77ae7f..df3c5589226cba9e8a59b2dbb04be0d6960d420e 100644 (file)
@@ -125,11 +125,7 @@ static u32 get_sbdn(u32 bus)
 
 static u8 dual_core()
 {
-       if(((cpuid_eax(0x80000000) & ~0xff) >= 8)) {
-               if(cpuid_ecx(0x80000008) & 1)
-                       return 1;
-       }
-       return 0;
+       return (pci_read_config32(PCI_DEV(0, 0x18, 3), 0xE8) & (0x3<<12)) != 0;
 }
 
 /*