static void __cpuinit MP_processor_info(struct mpc_config_processor *m)
{
int apicid;
+ char *bootup_cpu = "";
if (!(m->mpc_cpuflag & CPU_ENABLED)) {
disabled_cpus++;
#ifdef CONFIG_X86_NUMAQ
apicid = mpc_apic_id(m, translation_table[mpc_record]);
#else
- Dprintk("Processor #%d %u:%u APIC version %d\n",
- m->mpc_apicid,
- (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8,
- (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4, m->mpc_apicver);
apicid = m->mpc_apicid;
#endif
-
- if (m->mpc_featureflag & (1 << 0))
- Dprintk(" Floating point unit present.\n");
- if (m->mpc_featureflag & (1 << 7))
- Dprintk(" Machine Exception supported.\n");
- if (m->mpc_featureflag & (1 << 8))
- Dprintk(" 64 bit compare & exchange supported.\n");
- if (m->mpc_featureflag & (1 << 9))
- Dprintk(" Internal APIC present.\n");
- if (m->mpc_featureflag & (1 << 11))
- Dprintk(" SEP present.\n");
- if (m->mpc_featureflag & (1 << 12))
- Dprintk(" MTRR present.\n");
- if (m->mpc_featureflag & (1 << 13))
- Dprintk(" PGE present.\n");
- if (m->mpc_featureflag & (1 << 14))
- Dprintk(" MCA present.\n");
- if (m->mpc_featureflag & (1 << 15))
- Dprintk(" CMOV present.\n");
- if (m->mpc_featureflag & (1 << 16))
- Dprintk(" PAT present.\n");
- if (m->mpc_featureflag & (1 << 17))
- Dprintk(" PSE present.\n");
- if (m->mpc_featureflag & (1 << 18))
- Dprintk(" PSN present.\n");
- if (m->mpc_featureflag & (1 << 19))
- Dprintk(" Cache Line Flush Instruction present.\n");
- /* 20 Reserved */
- if (m->mpc_featureflag & (1 << 21))
- Dprintk(" Debug Trace and EMON Store present.\n");
- if (m->mpc_featureflag & (1 << 22))
- Dprintk(" ACPI Thermal Throttle Registers present.\n");
- if (m->mpc_featureflag & (1 << 23))
- Dprintk(" MMX present.\n");
- if (m->mpc_featureflag & (1 << 24))
- Dprintk(" FXSR present.\n");
- if (m->mpc_featureflag & (1 << 25))
- Dprintk(" XMM present.\n");
- if (m->mpc_featureflag & (1 << 26))
- Dprintk(" Willamette New Instructions present.\n");
- if (m->mpc_featureflag & (1 << 27))
- Dprintk(" Self Snoop present.\n");
- if (m->mpc_featureflag & (1 << 28))
- Dprintk(" HT present.\n");
- if (m->mpc_featureflag & (1 << 29))
- Dprintk(" Thermal Monitor present.\n");
- /* 30, 31 Reserved */
-
if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) {
- Dprintk(" Bootup CPU\n");
+ bootup_cpu = " (Bootup-CPU)";
boot_cpu_physical_apicid = m->mpc_apicid;
}
+ printk(KERN_INFO "Processor #%d%s\n", m->mpc_apicid, bootup_cpu);
generic_processor_info(apicid, m->mpc_apicver);
}
}
#endif
- set_bit(m->mpc_busid, mp_bus_not_pci);
- if (strncmp(str, BUSTYPE_PCI, sizeof(BUSTYPE_PCI) - 1) == 0) {
+ if (strncmp(str, BUSTYPE_ISA, sizeof(BUSTYPE_ISA) - 1) == 0) {
+ set_bit(m->mpc_busid, mp_bus_not_pci);
+#if defined(CONFIG_EISA) || defined (CONFIG_MCA)
+ mp_bus_id_to_type[m->mpc_busid] = MP_BUS_ISA;
+#endif
+ } else if (strncmp(str, BUSTYPE_PCI, sizeof(BUSTYPE_PCI) - 1) == 0) {
#ifdef CONFIG_X86_NUMAQ
mpc_oem_pci_bus(m, translation_table[mpc_record]);
#endif
mp_current_pci_id++;
#if defined(CONFIG_EISA) || defined (CONFIG_MCA)
mp_bus_id_to_type[m->mpc_busid] = MP_BUS_PCI;
- } else if (strncmp(str, BUSTYPE_ISA, sizeof(BUSTYPE_ISA) - 1) == 0) {
- mp_bus_id_to_type[m->mpc_busid] = MP_BUS_ISA;
} else if (strncmp(str, BUSTYPE_EISA, sizeof(BUSTYPE_EISA) - 1) == 0) {
mp_bus_id_to_type[m->mpc_busid] = MP_BUS_EISA;
} else if (strncmp(str, BUSTYPE_MCA, sizeof(BUSTYPE_MCA) - 1) == 0) {
mp_bus_id_to_type[m->mpc_busid] = MP_BUS_MCA;
- } else {
- printk(KERN_WARNING "Unknown bustype %s - ignoring\n", str);
#endif
- }
+ } else
+ printk(KERN_WARNING "Unknown bustype %s - ignoring\n", str);
}
#ifdef CONFIG_X86_IO_APIC
* Read/parse the MPC
*/
-static int __init smp_read_mpc(struct mp_config_table *mpc)
+static int __init smp_read_mpc(struct mp_config_table *mpc, unsigned early)
{
char str[16];
char oem[10];
if (!acpi_lapic)
mp_lapic_addr = mpc->mpc_lapic;
+ if (early)
+ return 1;
+
/*
* Now process the configuration blocks.
*/
/*
* Scan the memory blocks for an SMP configuration block.
*/
-void __init get_smp_config(void)
+static void __init __get_smp_config(unsigned early)
{
struct intel_mp_floating *mpf = mpf_found;
+ if (acpi_lapic && early)
+ return;
+
/*
* ACPI supports both logical (e.g. Hyper-Threading) and physical
* processors, where MPS only supports physical.
* Now see if we need to read further.
*/
if (mpf->mpf_feature1 != 0) {
+ if (early) {
+ /*
+ * local APIC has default address
+ */
+ mp_lapic_addr = APIC_DEFAULT_PHYS_BASE;
+ return;
+ }
printk(KERN_INFO "Default MP configuration #%d\n",
mpf->mpf_feature1);
* Read the physical hardware table. Anything here will
* override the defaults.
*/
- if (!smp_read_mpc(phys_to_virt(mpf->mpf_physptr))) {
+ if (!smp_read_mpc(phys_to_virt(mpf->mpf_physptr), early)) {
smp_found_config = 0;
printk(KERN_ERR
"BIOS bug, MP table errors detected!...\n");
return;
}
+ if (early)
+ return;
#ifdef CONFIG_X86_IO_APIC
/*
* If there are no explicit MP IRQ entries, then we are
} else
BUG();
- printk(KERN_INFO "Processors: %d\n", num_processors);
+ if (!early)
+ printk(KERN_INFO "Processors: %d\n", num_processors);
/*
* Only use the first configuration found.
*/
}
-static int __init smp_scan_config(unsigned long base, unsigned long length)
+void __init early_get_smp_config(void)
+{
+ __get_smp_config(1);
+}
+
+void __init get_smp_config(void)
+{
+ __get_smp_config(0);
+}
+
+static int __init smp_scan_config(unsigned long base, unsigned long length,
+ unsigned reserve)
{
unsigned long *bp = phys_to_virt(base);
struct intel_mp_floating *mpf;
return 0;
}
-void __init find_smp_config(void)
+static void __init __find_smp_config(unsigned reserve)
{
unsigned int address;
* 2) Scan the top 1K of base RAM
* 3) Scan the 64K of bios
*/
- if (smp_scan_config(0x0, 0x400) ||
- smp_scan_config(639 * 0x400, 0x400) ||
- smp_scan_config(0xF0000, 0x10000))
+ if (smp_scan_config(0x0, 0x400, reserve) ||
+ smp_scan_config(639 * 0x400, 0x400, reserve) ||
+ smp_scan_config(0xF0000, 0x10000, reserve))
return;
/*
* If it is an SMP machine we should know now, unless the
address = get_bios_ebda();
if (address)
- smp_scan_config(address, 0x400);
+ smp_scan_config(address, 0x400, reserve);
+}
+
+void __init early_find_smp_config(void)
+{
+ __find_smp_config(0);
+}
+
+void __init find_smp_config(void)
+{
+ __find_smp_config(1);
}
/* --------------------------------------------------------------------------