next up previous contents index
Next: 10.6.7 base_stack.h: default kernel Up: (X86) Base Environment Previous: 10.6.5 base_cpu_load: activate the

10.6.6 base_cpuid: global variable describing the processor

   

SYNOPSIS

#include <oskit/machine/base_cpu.h>

extern struct cpu_info base_cpuid ;

DESCRIPTION

This is a global variable that is filled in by base_cpu_init with information about the processor on which base_cpu_init was called. (Alternatively, it can also be initialized manually by the OS simply by calling cpuid(&base_cpuid)). This structure is used by other parts of the kernel support library to determine whether or not certain processor features are available, such as 4MB superpages. See 10.5.1 for details on the contents of this structure.

Note that in a multiprocessor system, this variable will reflect the boot processor. This is generally not a problem, since most SMPs use identical processors, or at least processors in the same generation, so that they appear equivalent to OS software. (For example, it is very unlikely that you'd find an SMP that mixes 486 and Pentium processors), However, if this ever turns out to be a problem, the OS can always override the cpuid or base_cpu_init function, or just modify the contents of the base_cpuid variable after calling base_cpu_init so that it reflects the least common denominator of all the processors.



University of Utah Flux Research Group