The check_bugs() Function

Check_bugs() is located somewhere in the host-specific portions of the kernel source tree. For some versions, it is declared in include/asm-<host>/bugs.h, so that it can be statically included in start_kernel().

The check_bugs() function is where host-specific code can check for known processor errata, and implement workarounds if possible. Some implementations of this function check for FPU bugs, opcodes that are not supported by the whole processor family, and buggy opcodes.

Check_bugs() also usually calls identify_cpu(), to detect which version of a processor family is in use. For example, the x86 kernel's identify_cpu() can identify and apply runtime fixes for Coppermine, Celeron, and Pentium Pro/II/III processors, as well as chips from non-Intel vendors like AMD and Transmeta.