#ifdef CONFIG_ACPI_BOOT
extern int __initdata acpi_ht;
extern acpi_interrupt_flags acpi_sci_flags;
-/* int __initdata acpi_force = 0; */
+int __initdata acpi_force = 0;
#endif
/* For PCI or other memory-mapped resources */
unsigned long saved_video_mode;
+#ifdef CONFIG_SWIOTLB
int swiotlb;
EXPORT_SYMBOL(swiotlb);
+#endif
/*
* Setup options
struct resource standard_io_resources[] = {
{ "dma1", 0x00, 0x1f, IORESOURCE_BUSY | IORESOURCE_IO },
{ "pic1", 0x20, 0x21, IORESOURCE_BUSY | IORESOURCE_IO },
- { "timer", 0x40, 0x5f, IORESOURCE_BUSY | IORESOURCE_IO },
+ { "timer0", 0x40, 0x43, IORESOURCE_BUSY | IORESOURCE_IO },
+ { "timer1", 0x50, 0x53, IORESOURCE_BUSY | IORESOURCE_IO },
{ "keyboard", 0x60, 0x6f, IORESOURCE_BUSY | IORESOURCE_IO },
{ "dma page reg", 0x80, 0x8f, IORESOURCE_BUSY | IORESOURCE_IO },
{ "pic2", 0xa0, 0xa1, IORESOURCE_BUSY | IORESOURCE_IO },
if (!memcmp(from, "acpi=force", 10)) {
/* add later when we do DMI horrors: */
- /* acpi_force = 1; */
+ acpi_force = 1;
acpi_disabled = 0;
}
/* acpi=ht just means: do ACPI MADT parsing
at bootup, but don't enable the full ACPI interpreter */
if (!memcmp(from, "acpi=ht", 7)) {
- /* if (!acpi_force) */
+ if (!acpi_force)
disable_acpi();
acpi_ht = 1;
}
}
#endif
+#define EBDA_ADDR_POINTER 0x40E
+static void __init reserve_ebda_region(void)
+{
+ unsigned int addr;
+ /**
+ * there is a real-mode segmented pointer pointing to the
+ * 4K EBDA area at 0x40E
+ */
+ addr = *(unsigned short *)phys_to_virt(EBDA_ADDR_POINTER);
+ addr <<= 4;
+ if (addr)
+ reserve_bootmem_generic(addr, PAGE_SIZE);
+}
+
void __init setup_arch(char **cmdline_p)
{
unsigned long low_mem_size;
*/
reserve_bootmem_generic(0, PAGE_SIZE);
+ /* reserve ebda region */
+ reserve_ebda_region();
+
#ifdef CONFIG_SMP
/*
* But first pinch a few for the stack/trampoline stuff
}
}
display_cacheinfo(c);
+
+ if (c->cpuid_level >= 0x80000008) {
+ c->x86_num_cores = (cpuid_ecx(0x80000008) & 0xff) + 1;
+ if (c->x86_num_cores & (c->x86_num_cores - 1))
+ c->x86_num_cores = 1;
+
+#ifdef CONFIG_NUMA
+ /* On a dual core setup the lower bits of apic id
+ distingush the cores. Fix up the CPU<->node mappings
+ here based on that.
+ Assumes number of cores is a power of two. */
+ if (c->x86_num_cores > 1) {
+ int cpu = c->x86_apicid;
+ cpu_to_node[cpu] = cpu >> hweight32(c->x86_num_cores - 1);
+ printk(KERN_INFO "CPU %d -> Node %d\n",
+ cpu, cpu_to_node[cpu]);
+ }
+#endif
+ }
+
return r;
}
}
if (index_lsb != index_msb )
index_msb++;
- initial_apic_id = ebx >> 24 & 0xff;
+ initial_apic_id = hard_smp_processor_id();
phys_proc_id[cpu] = initial_apic_id >> index_msb;
printk(KERN_INFO "CPU: Physical Processor ID: %d\n",
{ 0x43, LVL_2, 512 },
{ 0x44, LVL_2, 1024 },
{ 0x45, LVL_2, 2048 },
+ { 0x60, LVL_1_DATA, 16 },
{ 0x66, LVL_1_DATA, 8 },
{ 0x67, LVL_1_DATA, 16 },
{ 0x68, LVL_1_DATA, 32 },
c->x86_model_id[0] = '\0'; /* Unset */
c->x86_clflush_size = 64;
c->x86_cache_alignment = c->x86_clflush_size;
+ c->x86_num_cores = 1;
+ c->x86_apicid = c == &boot_cpu_data ? 0 : c - cpu_data;
memset(&c->x86_capability, 0, sizeof c->x86_capability);
/* Get vendor name */
}
if (c->x86_capability[0] & (1<<19))
c->x86_clflush_size = ((misc >> 8) & 0xff) * 8;
+ c->x86_apicid = misc >> 24;
} else {
/* Have CPUID level 0 only - unheard of */
c->x86 = 4;
/* AMD-defined flags: level 0x80000001 */
xlvl = cpuid_eax(0x80000000);
if ( (xlvl & 0xffff0000) == 0x80000000 ) {
- if ( xlvl >= 0x80000001 )
+ if ( xlvl >= 0x80000001 ) {
c->x86_capability[1] = cpuid_edx(0x80000001);
+ c->x86_capability[5] = cpuid_ecx(0x80000001);
+ }
if ( xlvl >= 0x80000004 )
get_model_name(c); /* Default name */
}
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
/* Intel-defined (#2) */
- "pni", NULL, NULL, "monitor", "ds_cpl", NULL, NULL, "tm2",
- "est", NULL, "cid", NULL, NULL, "cmpxchg16b", NULL, NULL,
+ "pni", NULL, NULL, "monitor", "ds_cpl", NULL, NULL, "est",
+ "tm2", NULL, "cid", NULL, NULL, "cx16", "xtpr", NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
};
}
}
+ if (c->x86_num_cores > 1)
+ seq_printf(m, "cpu cores\t: %d\n", c->x86_num_cores);
+
seq_printf(m, "\n\n");
return 0;