[coreboot] generic cpu detection proposal

Holger Hesselbarth popkonserve at gmx.de
Mon Jan 26 18:57:09 CET 2009


i'm back after quite some time of silence but i've never lost track of the 
coreboot development though.

the time has come to contribute some real code. i decided to start with a 
generic cpu detection routine that at a later point should be able to detect all 
cpus from the original Pentium upwards. my next step is to write configuration 
functions for all models depending on the manufacturer. the first goal is to 
make L2 cache available for all Slot1/Socket370 processors. i already took a 
look at the L2 init code from coreboot v1 and i guess i got it. some official 
intel document on L2 cache init would help though.
the benefit of a generic would be that exchanging the cpu wouldn't rise the need 
to compile a new bios first. even if changing from one manufacturer to another. 
the drawback of a generic init routine would be that all init routines would be 
included in the final bios. so the routines should be kept as short as possible. 
to make some things user-configurable i propose a new section in the options 
file: cpu settings. mttr configuration could be called from the configuration 
routines or included in them. any thoughts on that? i also propose to enforce 
maximum performance settings on VIA/Cyrix, Centaur and older AMD processors as 
they have feature control registers which where meant to disable some advanced 
functions to maintain Intel Pentium compatibility. talking about Cyrix: i'll use 
the famous 5/2 division to identify the 6x86 with switched off cpuid and enable 
it by writing its internal configuration registers.

i attached the files with the detection routines and the modified header files. 
the cpu_data structure in the cpu.h is losely based on the sources of x86info by 
Dave Jones. i also took the check_cpuid from his code. the copyright headers are 
not set in any of the files yet, but i didn't commit anything anyway ;) i didn't 
try to compile it, i just wanted to make sure i'm heading in the right direction.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: check_cpuid.c
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20090126/3335d72b/attachment.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: identify_cpu.c
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20090126/3335d72b/attachment-0001.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: identify_cpu.h
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20090126/3335d72b/attachment.h>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cpu.h
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20090126/3335d72b/attachment-0001.h>


More information about the coreboot mailing list