2 #include <linux/init.h>
11 /* Have we found an MP table */
14 extern unsigned int __cpuinitdata maxcpus;
17 * The Visual Workstation is Intel MP compliant in the hardware
18 * sense, but it doesn't have a BIOS(-configuration table).
19 * No problem for Linux.
22 static void __init MP_processor_info (struct mpc_config_processor *m)
24 int ver, logical_apicid;
25 physid_mask_t apic_cpus;
27 if (!(m->mpc_cpuflag & CPU_ENABLED))
30 logical_apicid = m->mpc_apicid;
31 printk(KERN_INFO "%sCPU #%d %u:%u APIC version %d\n",
32 m->mpc_cpuflag & CPU_BOOTPROCESSOR ? "Bootup " : "",
34 (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8,
35 (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4,
38 if (m->mpc_cpuflag & CPU_BOOTPROCESSOR)
39 boot_cpu_physical_apicid = m->mpc_apicid;
42 if ((ver >= 0x14 && m->mpc_apicid >= 0xff) || m->mpc_apicid >= 0xf) {
43 printk(KERN_ERR "Processor #%d INVALID. (Max ID: %d).\n",
44 m->mpc_apicid, MAX_APICS);
48 apic_cpus = apicid_to_cpu_present(m->mpc_apicid);
49 physids_or(phys_cpu_present_map, phys_cpu_present_map, apic_cpus);
54 printk(KERN_ERR "BIOS bug, APIC version is 0 for CPU#%d! "
55 "fixing up to 0x10. (tell your hw vendor)\n",
59 apic_version[m->mpc_apicid] = ver;
62 void __init find_smp_config(void)
64 struct mpc_config_processor *mp = phys_to_virt(CO_CPU_TAB_PHYS);
65 unsigned short ncpus = readw(phys_to_virt(CO_CPU_NUM_PHYS));
67 if (ncpus > CO_CPU_MAX) {
68 printk(KERN_WARNING "find_visws_smp: got cpu count of %d at %p\n",
79 MP_processor_info(mp++);
81 mp_lapic_addr = APIC_DEFAULT_PHYS_BASE;
84 void __init get_smp_config (void)