[coreboot] AMD Athlon(tm) dual core processor, (X2 AM2 ,,,,)

Chris Lingard chris at stockwith.co.uk
Wed Nov 12 17:52:24 CET 2008


Coreboot fails to identify this cpu correctly, so I hacked 
processer_name .c as follows

         u32  Test;

         Test    = cpuid_ebx(0x80000001);
         printk_debug("cpuid_ebx %x\n", Test);

         BrandId = Test & 0xffff;
         Test   =  cpuid_eax(0x80000001);
         printk_debug("cpuid_eax %x\n", Test);
         Socket = (Test & 0x00000030) >> 4; // 00b = S1g1, 01b = F 
(1207), 11b = AM2
         Test   = cpuid_ecx(0x80000008);
         printk_debug("cpuid_ecx %x\n", Test);
         CmpCap = Test & 0x03; // Number of CPU cores


Each core is tested and both return the following.

cpuid_ebx 9a3
cpuid_eax 40f33
cpuid_ecx 1

After a bit of desk checking, either a shift is wrong, or the lookup 
value in the following case statement is wrong.

The following hack fixes it

/*   Original code commented out,  the second shift is increaed by 1
         PwrLmt = ((BrandId >> 14) & 0x01) | ((BrandId >> 5) & 0x0e); // 
BrandId[8:6,14]   */
         PwrLmt = ((BrandId >> 14) & 0x01) | ((BrandId >> 6) & 0x0e); // 
BrandId[8:6,14]


On the other hand the value in the case statement

                case 0x31046:
                         processor_name_string =
                             "AMD Athlon(tm) 64 X2 Dual Core Processor 
TT00+";



should be 0x3104c

I do not know which

The above module tests each core for number of cores, so this will 
always be 1.  It treats it as a two CPU machine. Does this make any 
difference?  The calculation for number of cores could be dropped.

Chris Lingard





More information about the coreboot mailing list