Code: Select all
if (cpu_has_apic && c->x86 > 0x16) {
set_cpu_cap(c, X86_FEATURE_EXTD_APICID);
} else if (cpu_has_apic && c->x86 >= 0xf) {
/* check CPU config space for extended APIC ID */
unsigned int val;
val = read_pci_config(0, 24, 0, 0x68);
if ((val & ((1 << 17) | (1 << 18))) == ((1 << 17) | (1 << 18)))
set_cpu_cap(c, X86_FEATURE_EXTD_APICID);
}
to anyone not familiar this part of code, c->x86 is the family number of processor. so the code runs to 'else if' part when it is an AMD K8 family processor.
but I can't understand the function call:
read_pci_config(0, 24, 0, 0x68);
what is this device at bus 0, slot 24, function 0 ? According to the code, it seems it is accessing the APIC through pci bus, how is it possible ? I can't find any specification defined these magic numbers, I can't find it is defined in linux code neither.