2 #include <linux/init.h>
11 /* Have we found an MP table */
15 * Various Linux-internal data structures created from the
18 int apic_version
[MAX_APICS
];
21 unsigned long mp_lapic_addr
;
23 /* Processor that is doing the boot up */
24 unsigned int boot_cpu_physical_apicid
= -1U;
26 /* Bitmask of physically existing CPUs */
27 physid_mask_t phys_cpu_present_map
;
29 unsigned int __initdata maxcpus
= NR_CPUS
;
32 * The Visual Workstation is Intel MP compliant in the hardware
33 * sense, but it doesn't have a BIOS(-configuration table).
34 * No problem for Linux.
37 static void __init
MP_processor_info (struct mpc_config_processor
*m
)
39 int ver
, logical_apicid
;
40 physid_mask_t apic_cpus
;
42 if (!(m
->mpc_cpuflag
& CPU_ENABLED
))
45 logical_apicid
= m
->mpc_apicid
;
46 printk(KERN_INFO
"%sCPU #%d %ld:%ld APIC version %d\n",
47 m
->mpc_cpuflag
& CPU_BOOTPROCESSOR
? "Bootup " : "",
49 (m
->mpc_cpufeature
& CPU_FAMILY_MASK
) >> 8,
50 (m
->mpc_cpufeature
& CPU_MODEL_MASK
) >> 4,
53 if (m
->mpc_cpuflag
& CPU_BOOTPROCESSOR
)
54 boot_cpu_physical_apicid
= m
->mpc_apicid
;
57 if ((ver
>= 0x14 && m
->mpc_apicid
>= 0xff) || m
->mpc_apicid
>= 0xf) {
58 printk(KERN_ERR
"Processor #%d INVALID. (Max ID: %d).\n",
59 m
->mpc_apicid
, MAX_APICS
);
63 apic_cpus
= apicid_to_cpu_present(m
->mpc_apicid
);
64 physids_or(phys_cpu_present_map
, phys_cpu_present_map
, apic_cpus
);
69 printk(KERN_ERR
"BIOS bug, APIC version is 0 for CPU#%d! "
70 "fixing up to 0x10. (tell your hw vendor)\n",
74 apic_version
[m
->mpc_apicid
] = ver
;
77 void __init
find_smp_config(void)
79 struct mpc_config_processor
*mp
= phys_to_virt(CO_CPU_TAB_PHYS
);
80 unsigned short ncpus
= readw(phys_to_virt(CO_CPU_NUM_PHYS
));
82 if (ncpus
> CO_CPU_MAX
) {
83 printk(KERN_WARNING
"find_visws_smp: got cpu count of %d at %p\n",
94 MP_processor_info(mp
++);
96 mp_lapic_addr
= APIC_DEFAULT_PHYS_BASE
;
99 void __init
get_smp_config (void)