2 * linux/arch/i386/kernel/setup.c
4 * Copyright (C) 1995 Linus Torvalds
6 * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999
8 * Memory region support
9 * David Parsons <orc@pell.chi.il.us>, July-August 1999
11 * Added E820 sanitization routine (removes overlapping memory regions);
12 * Brian Moyle <bmoyle@mvista.com>, February 2001
14 * Moved CPU detection code to cpu/${cpu}.c
15 * Patrick Mochel <mochel@osdl.org>, March 2002
17 * Provisions for empty E820 memory regions (reported by certain BIOSes).
18 * Alex Achenbach <xela@slit.de>, December 2002.
23 * This file handles the architecture-dependent parts of initialization
26 #include <linux/sched.h>
28 #include <linux/mmzone.h>
29 #include <linux/screen_info.h>
30 #include <linux/ioport.h>
31 #include <linux/acpi.h>
32 #include <linux/apm_bios.h>
33 #include <linux/initrd.h>
34 #include <linux/bootmem.h>
35 #include <linux/seq_file.h>
36 #include <linux/platform_device.h>
37 #include <linux/console.h>
38 #include <linux/mca.h>
39 #include <linux/root_dev.h>
40 #include <linux/highmem.h>
41 #include <linux/module.h>
42 #include <linux/efi.h>
43 #include <linux/init.h>
44 #include <linux/edd.h>
45 #include <linux/nodemask.h>
46 #include <linux/notifier.h>
47 #include <linux/kexec.h>
48 #include <linux/crash_dump.h>
49 #include <linux/dmi.h>
50 #include <linux/pfn.h>
52 #include <video/edid.h>
56 #include <asm/mpspec.h>
57 #include <asm/mmzone.h>
58 #include <asm/setup.h>
59 #include <asm/arch_hooks.h>
60 #include <asm/sections.h>
61 #include <asm/io_apic.h>
64 #include <setup_arch.h>
65 #include <bios_ebda.h>
67 #include <asm/hypervisor.h>
68 #include <xen/interface/physdev.h>
69 #include <xen/interface/memory.h>
70 #include <xen/features.h>
71 #include <xen/xencons.h>
73 static int xen_panic_event(struct notifier_block *, unsigned long, void *);
74 static struct notifier_block xen_panic_block = {
75 xen_panic_event, NULL, 0 /* try to go last */
78 extern char hypercall_page[PAGE_SIZE];
79 EXPORT_SYMBOL(hypercall_page);
81 int disable_pse __devinitdata = 0;
86 extern struct resource code_resource;
87 extern struct resource data_resource;
89 /* cpu data as detected by the assembly code in head.S */
90 struct cpuinfo_x86 new_cpu_data __cpuinitdata = { 0, 0, 0, 0, -1, 1, 0, 0, -1 };
91 /* common cpu data for all cpus */
92 struct cpuinfo_x86 boot_cpu_data __read_mostly = { 0, 0, 0, 0, -1, 1, 0, 0, -1 };
93 EXPORT_SYMBOL(boot_cpu_data);
95 unsigned long mmu_cr4_features;
97 /* for MCA, but anyone else can use it if they want */
98 unsigned int machine_id;
100 EXPORT_SYMBOL(machine_id);
102 unsigned int machine_submodel_id;
103 unsigned int BIOS_revision;
104 unsigned int mca_pentium_flag;
106 /* Boot loader ID as an integer, for the benefit of proc_dointvec */
109 /* user-defined highmem size */
110 static unsigned int highmem_pages = -1;
115 struct drive_info_struct { char dummy[32]; } drive_info;
116 #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || \
117 defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE)
118 EXPORT_SYMBOL(drive_info);
120 struct screen_info screen_info;
121 EXPORT_SYMBOL(screen_info);
122 struct apm_info apm_info;
123 EXPORT_SYMBOL(apm_info);
124 struct sys_desc_table_struct {
125 unsigned short length;
126 unsigned char table[0];
128 struct edid_info edid_info;
129 EXPORT_SYMBOL_GPL(edid_info);
130 struct ist_info ist_info;
131 #if defined(CONFIG_X86_SPEEDSTEP_SMI) || \
132 defined(CONFIG_X86_SPEEDSTEP_SMI_MODULE)
133 EXPORT_SYMBOL(ist_info);
136 extern void early_cpu_init(void);
137 extern int root_mountflags;
139 unsigned long saved_videomode;
141 #define RAMDISK_IMAGE_START_MASK 0x07FF
142 #define RAMDISK_PROMPT_FLAG 0x8000
143 #define RAMDISK_LOAD_FLAG 0x4000
145 static char command_line[COMMAND_LINE_SIZE];
147 unsigned char __initdata boot_params[PARAM_SIZE];
150 * Point at the empty zero page to start with. We map the real shared_info
151 * page as soon as fixmap is up and running.
153 shared_info_t *HYPERVISOR_shared_info = (shared_info_t *)empty_zero_page;
154 EXPORT_SYMBOL(HYPERVISOR_shared_info);
156 unsigned long *phys_to_machine_mapping;
157 unsigned long *pfn_to_mfn_frame_list_list, *pfn_to_mfn_frame_list[16];
158 EXPORT_SYMBOL(phys_to_machine_mapping);
160 /* Raw start-of-day parameters from the hypervisor. */
161 start_info_t *xen_start_info;
162 EXPORT_SYMBOL(xen_start_info);
165 #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
167 #ifdef CONFIG_EDD_MODULE
171 * copy_edd() - Copy the BIOS EDD information
172 * from boot_params into a safe place.
175 static inline void copy_edd(void)
177 memcpy(edd.mbr_signature, EDD_MBR_SIGNATURE, sizeof(edd.mbr_signature));
178 memcpy(edd.edd_info, EDD_BUF, sizeof(edd.edd_info));
179 edd.mbr_signature_nr = EDD_MBR_SIG_NR;
180 edd.edd_info_nr = EDD_NR;
183 static inline void copy_edd(void)
188 int __initdata user_defined_memmap = 0;
191 * "mem=nopentium" disables the 4MB page tables.
192 * "mem=XXX[kKmM]" defines a memory region from HIGH_MEM
193 * to <mem>, overriding the bios size.
194 * "memmap=XXX[KkmM]@XXX[KkmM]" defines a memory region from
195 * <start> to <start>+<mem>, overriding the bios size.
197 * HPA tells me bootloaders need to parse mem=, so no new
198 * option should be mem= [also see Documentation/i386/boot.txt]
200 static int __init parse_mem(char *arg)
205 if (strcmp(arg, "nopentium") == 0) {
206 clear_bit(X86_FEATURE_PSE, boot_cpu_data.x86_capability);
209 /* If the user specifies memory size, we
210 * limit the BIOS-provided memory map to
211 * that size. exactmap can be used to specify
212 * the exact map. mem=number can be used to
213 * trim the existing memory map.
215 unsigned long long mem_size;
217 mem_size = memparse(arg, &arg);
218 limit_regions(mem_size);
219 user_defined_memmap = 1;
223 early_param("mem", parse_mem);
225 #ifdef CONFIG_PROC_VMCORE
226 /* elfcorehdr= specifies the location of elf core header
227 * stored by the crashed kernel.
229 static int __init parse_elfcorehdr(char *arg)
234 elfcorehdr_addr = memparse(arg, &arg);
237 early_param("elfcorehdr", parse_elfcorehdr);
238 #endif /* CONFIG_PROC_VMCORE */
241 * highmem=size forces highmem to be exactly 'size' bytes.
242 * This works even on boxes that have no highmem otherwise.
243 * This also works to reduce highmem size on bigger boxes.
245 static int __init parse_highmem(char *arg)
250 highmem_pages = memparse(arg, &arg) >> PAGE_SHIFT;
253 early_param("highmem", parse_highmem);
256 * vmalloc=size forces the vmalloc area to be exactly 'size'
257 * bytes. This can be used to increase (or decrease) the
258 * vmalloc area - the default is 128m.
260 static int __init parse_vmalloc(char *arg)
265 __VMALLOC_RESERVE = memparse(arg, &arg);
268 early_param("vmalloc", parse_vmalloc);
271 * reservetop=size reserves a hole at the top of the kernel address space which
272 * a hypervisor can load into later. Needed for dynamically loaded hypervisors,
273 * so relocating the fixmap can be done before paging initialization.
275 static int __init parse_reservetop(char *arg)
277 unsigned long address;
282 address = memparse(arg, &arg);
283 reserve_top_address(address);
286 early_param("reservetop", parse_reservetop);
289 * Determine low and high memory ranges:
291 unsigned long __init find_max_low_pfn(void)
293 unsigned long max_low_pfn;
295 max_low_pfn = max_pfn;
296 if (max_low_pfn > MAXMEM_PFN) {
297 if (highmem_pages == -1)
298 highmem_pages = max_pfn - MAXMEM_PFN;
299 if (highmem_pages + MAXMEM_PFN < max_pfn)
300 max_pfn = MAXMEM_PFN + highmem_pages;
301 if (highmem_pages + MAXMEM_PFN > max_pfn) {
302 printk("only %luMB highmem pages available, ignoring highmem size of %uMB.\n", pages_to_mb(max_pfn - MAXMEM_PFN), pages_to_mb(highmem_pages));
305 max_low_pfn = MAXMEM_PFN;
306 #ifndef CONFIG_HIGHMEM
307 /* Maximum memory usable is what is directly addressable */
308 printk(KERN_WARNING "Warning only %ldMB will be used.\n",
310 if (max_pfn > MAX_NONPAE_PFN)
311 printk(KERN_WARNING "Use a PAE enabled kernel.\n");
313 printk(KERN_WARNING "Use a HIGHMEM enabled kernel.\n");
314 max_pfn = MAXMEM_PFN;
315 #else /* !CONFIG_HIGHMEM */
316 #ifndef CONFIG_X86_PAE
317 if (max_pfn > MAX_NONPAE_PFN) {
318 max_pfn = MAX_NONPAE_PFN;
319 printk(KERN_WARNING "Warning only 4GB will be used.\n");
320 printk(KERN_WARNING "Use a PAE enabled kernel.\n");
322 #endif /* !CONFIG_X86_PAE */
323 #endif /* !CONFIG_HIGHMEM */
325 if (highmem_pages == -1)
327 #ifdef CONFIG_HIGHMEM
328 if (highmem_pages >= max_pfn) {
329 printk(KERN_ERR "highmem size specified (%uMB) is bigger than pages available (%luMB)!.\n", pages_to_mb(highmem_pages), pages_to_mb(max_pfn));
333 if (max_low_pfn-highmem_pages < 64*1024*1024/PAGE_SIZE){
334 printk(KERN_ERR "highmem size %uMB results in smaller than 64MB lowmem, ignoring it.\n", pages_to_mb(highmem_pages));
337 max_low_pfn -= highmem_pages;
341 printk(KERN_ERR "ignoring highmem size on non-highmem kernel!\n");
349 * workaround for Dell systems that neglect to reserve EBDA
351 static void __init reserve_ebda_region(void)
354 addr = get_bios_ebda();
356 reserve_bootmem(addr, PAGE_SIZE);
360 #ifndef CONFIG_NEED_MULTIPLE_NODES
361 void __init setup_bootmem_allocator(void);
362 static unsigned long __init setup_memory(void)
365 * partially used pages are not usable - thus
366 * we are rounding upwards:
368 min_low_pfn = PFN_UP(__pa(xen_start_info->pt_base)) +
369 xen_start_info->nr_pt_frames;
373 max_low_pfn = find_max_low_pfn();
375 #ifdef CONFIG_HIGHMEM
376 highstart_pfn = highend_pfn = max_pfn;
377 if (max_pfn > max_low_pfn) {
378 highstart_pfn = max_low_pfn;
380 printk(KERN_NOTICE "%ldMB HIGHMEM available.\n",
381 pages_to_mb(highend_pfn - highstart_pfn));
382 num_physpages = highend_pfn;
383 high_memory = (void *) __va(highstart_pfn * PAGE_SIZE - 1) + 1;
385 num_physpages = max_low_pfn;
386 high_memory = (void *) __va(max_low_pfn * PAGE_SIZE - 1) + 1;
388 #ifdef CONFIG_FLATMEM
389 max_mapnr = num_physpages;
391 printk(KERN_NOTICE "%ldMB LOWMEM available.\n",
392 pages_to_mb(max_low_pfn));
394 setup_bootmem_allocator();
399 void __init zone_sizes_init(void)
402 * XEN: Our notion of "DMA memory" is fake when running over Xen.
403 * We simply put all RAM in the DMA zone so that those drivers which
404 * needlessly specify GFP_DMA do not get starved of RAM unnecessarily.
405 * Those drivers that *do* require lowmem are screwed anyway when
408 unsigned long max_zone_pfns[MAX_NR_ZONES];
409 memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
410 max_zone_pfns[ZONE_DMA] = max_low_pfn;
411 max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
412 #ifdef CONFIG_HIGHMEM
413 max_zone_pfns[ZONE_HIGHMEM] = highend_pfn;
414 add_active_range(0, 0, highend_pfn);
416 add_active_range(0, 0, max_low_pfn);
419 free_area_init_nodes(max_zone_pfns);
422 extern unsigned long __init setup_memory(void);
423 extern void zone_sizes_init(void);
424 #endif /* !CONFIG_NEED_MULTIPLE_NODES */
426 void __init setup_bootmem_allocator(void)
428 unsigned long bootmap_size;
430 * Initialize the boot-time allocator (with low memory only):
432 bootmap_size = init_bootmem(min_low_pfn, max_low_pfn);
434 register_bootmem_low_pages(max_low_pfn);
437 * Reserve the bootmem bitmap itself as well. We do this in two
438 * steps (first step was init_bootmem()) because this catches
439 * the (very unlikely) case of us accidentally initializing the
440 * bootmem allocator with an invalid RAM area.
442 reserve_bootmem(__pa_symbol(_text), (PFN_PHYS(min_low_pfn) +
443 bootmap_size + PAGE_SIZE-1) - __pa_symbol(_text));
447 * reserve physical page 0 - it's a special BIOS page on many boxes,
448 * enabling clean reboots, SMP operation, laptop functions.
450 reserve_bootmem(0, PAGE_SIZE);
452 /* reserve EBDA region, it's a 4K region */
453 reserve_ebda_region();
455 /* could be an AMD 768MPX chipset. Reserve a page before VGA to prevent
456 PCI prefetch into it (errata #56). Usually the page is reserved anyways,
457 unless you have no PS/2 mouse plugged in. */
458 if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
459 boot_cpu_data.x86 == 6)
460 reserve_bootmem(0xa0000 - 4096, 4096);
464 * But first pinch a few for the stack/trampoline stuff
465 * FIXME: Don't need the extra page at 4K, but need to fix
466 * trampoline before removing it. (see the GDT stuff)
468 reserve_bootmem(PAGE_SIZE, PAGE_SIZE);
470 #ifdef CONFIG_ACPI_SLEEP
472 * Reserve low memory region for sleep support.
474 acpi_reserve_bootmem();
476 #endif /* !CONFIG_XEN */
478 #ifdef CONFIG_BLK_DEV_INITRD
479 if (xen_start_info->mod_start) {
480 if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) {
481 /*reserve_bootmem(INITRD_START, INITRD_SIZE);*/
482 initrd_start = INITRD_START + PAGE_OFFSET;
483 initrd_end = initrd_start+INITRD_SIZE;
484 initrd_below_start_ok = 1;
487 printk(KERN_ERR "initrd extends beyond end of memory "
488 "(0x%08lx > 0x%08lx)\ndisabling initrd\n",
489 INITRD_START + INITRD_SIZE,
490 max_low_pfn << PAGE_SHIFT);
496 if (crashk_res.start != crashk_res.end)
497 reserve_bootmem(crashk_res.start,
498 crashk_res.end - crashk_res.start + 1);
501 if (!xen_feature(XENFEAT_auto_translated_physmap))
502 phys_to_machine_mapping =
503 (unsigned long *)xen_start_info->mfn_list;
507 * The node 0 pgdat is initialized before all of these because
508 * it's needed for bootmem. node>0 pgdats have their virtual
509 * space allocated before the pagetables are in place to access
510 * them, so they can't be cleared then.
512 * This should all compile down to nothing when NUMA is off.
514 void __init remapped_pgdat_init(void)
518 for_each_online_node(nid) {
520 memset(NODE_DATA(nid), 0, sizeof(struct pglist_data));
525 static void set_mca_bus(int x)
530 static void set_mca_bus(int x) { }
533 /* Overridden in paravirt.c if CONFIG_PARAVIRT */
534 char * __init __attribute__((weak)) memory_setup(void)
536 return machine_specific_memory_setup();
540 * Determine if we were loaded by an EFI loader. If so, then we have also been
541 * passed the efi memmap, systab, etc., so we should use these data structures
542 * for initialization. Note, the efi init code path is determined by the
543 * global efi_enabled. This allows the same kernel image to be used on existing
544 * systems (with a traditional BIOS) as well as on EFI systems.
546 void __init setup_arch(char **cmdline_p)
549 struct physdev_set_iopl set_iopl;
550 unsigned long max_low_pfn;
552 /* Force a quick death if the kernel panics (not domain 0). */
553 extern int panic_timeout;
554 if (!panic_timeout && !is_initial_xendomain())
557 /* Register a call for panic conditions. */
558 atomic_notifier_chain_register(&panic_notifier_list, &xen_panic_block);
560 HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_4gb_segments);
561 HYPERVISOR_vm_assist(VMASST_CMD_enable,
562 VMASST_TYPE_writable_pagetables);
564 memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data));
565 pre_setup_arch_hook();
569 * FIXME: This isn't an official loader_type right
570 * now but does currently work with elilo.
571 * If we were configured as an EFI kernel, check to make
572 * sure that we were loaded correctly from elilo and that
573 * the system table is valid. If not, then initialize normally.
576 if ((LOADER_TYPE == 0x50) && EFI_SYSTAB)
580 /* This must be initialized to UNNAMED_MAJOR for ipconfig to work
581 properly. Setting ROOT_DEV to default to /dev/ram0 breaks initrd.
583 ROOT_DEV = MKDEV(UNNAMED_MAJOR,0);
584 drive_info = DRIVE_INFO;
585 screen_info = SCREEN_INFO;
586 edid_info = EDID_INFO;
587 apm_info.bios = APM_BIOS_INFO;
589 saved_videomode = VIDEO_MODE;
590 if( SYS_DESC_TABLE.length != 0 ) {
591 set_mca_bus(SYS_DESC_TABLE.table[3] & 0x2);
592 machine_id = SYS_DESC_TABLE.table[0];
593 machine_submodel_id = SYS_DESC_TABLE.table[1];
594 BIOS_revision = SYS_DESC_TABLE.table[2];
596 bootloader_type = LOADER_TYPE;
598 if (is_initial_xendomain()) {
599 /* This is drawn from a dump from vgacon:startup in
601 screen_info.orig_video_mode = 3;
602 screen_info.orig_video_isVGA = 1;
603 screen_info.orig_video_lines = 25;
604 screen_info.orig_video_cols = 80;
605 screen_info.orig_video_ega_bx = 3;
606 screen_info.orig_video_points = 16;
607 screen_info.orig_y = screen_info.orig_video_lines - 1;
608 if (xen_start_info->console.dom0.info_size >=
609 sizeof(struct dom0_vga_console_info)) {
610 const struct dom0_vga_console_info *info =
611 (struct dom0_vga_console_info *)(
612 (char *)xen_start_info +
613 xen_start_info->console.dom0.info_off);
614 dom0_init_screen_info(info);
616 xen_start_info->console.domU.mfn = 0;
617 xen_start_info->console.domU.evtchn = 0;
619 screen_info.orig_video_isVGA = 0;
621 #ifdef CONFIG_BLK_DEV_RAM
622 rd_image_start = RAMDISK_FLAGS & RAMDISK_IMAGE_START_MASK;
623 rd_prompt = ((RAMDISK_FLAGS & RAMDISK_PROMPT_FLAG) != 0);
624 rd_doload = ((RAMDISK_FLAGS & RAMDISK_LOAD_FLAG) != 0);
627 setup_xen_features();
633 printk(KERN_INFO "BIOS-provided physical RAM map:\n");
634 print_memory_map(memory_setup());
639 if (!MOUNT_ROOT_RDONLY)
640 root_mountflags &= ~MS_RDONLY;
641 init_mm.start_code = (unsigned long) _text;
642 init_mm.end_code = (unsigned long) _etext;
643 init_mm.end_data = (unsigned long) _edata;
644 init_mm.brk = (PFN_UP(__pa(xen_start_info->pt_base)) +
645 xen_start_info->nr_pt_frames) << PAGE_SHIFT;
647 code_resource.start = virt_to_phys(_text);
648 code_resource.end = virt_to_phys(_etext)-1;
649 data_resource.start = virt_to_phys(_etext);
650 data_resource.end = virt_to_phys(_edata)-1;
654 if (user_defined_memmap) {
655 printk(KERN_INFO "user-defined physical RAM map:\n");
656 print_memory_map("user");
659 strlcpy(command_line, saved_command_line, COMMAND_LINE_SIZE);
660 *cmdline_p = command_line;
662 max_low_pfn = setup_memory();
665 * NOTE: before this point _nobody_ is allowed to allocate
666 * any memory using the bootmem allocator. Although the
667 * alloctor is now initialised only the first 8Mb of the kernel
668 * virtual address space has been mapped. All allocations before
669 * paging_init() has completed must use the alloc_bootmem_low_pages()
670 * variant (which allocates DMA'able memory) and care must be taken
671 * not to exceed the 8Mb limit.
675 smp_alloc_memory(); /* AP processor realmode stacks in low memory*/
678 remapped_pgdat_init();
682 #ifdef CONFIG_X86_FIND_SMP_CONFIG
684 * Find and reserve possible boot-time SMP configuration:
690 /* Make sure we have a correctly sized P->M table. */
691 if (!xen_feature(XENFEAT_auto_translated_physmap)) {
692 phys_to_machine_mapping = alloc_bootmem_low_pages(
693 max_pfn * sizeof(unsigned long));
694 memset(phys_to_machine_mapping, ~0,
695 max_pfn * sizeof(unsigned long));
696 memcpy(phys_to_machine_mapping,
697 (unsigned long *)xen_start_info->mfn_list,
698 xen_start_info->nr_pages * sizeof(unsigned long));
700 __pa(xen_start_info->mfn_list),
701 PFN_PHYS(PFN_UP(xen_start_info->nr_pages *
702 sizeof(unsigned long))));
705 * Initialise the list of the frames that specify the list of
706 * frames that make up the p2m table. Used by save/restore
708 pfn_to_mfn_frame_list_list = alloc_bootmem_low_pages(PAGE_SIZE);
709 HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list_list =
710 virt_to_mfn(pfn_to_mfn_frame_list_list);
712 fpp = PAGE_SIZE/sizeof(unsigned long);
713 for (i=0, j=0, k=-1; i< max_pfn; i+=fpp, j++) {
714 if ((j % fpp) == 0) {
717 pfn_to_mfn_frame_list[k] =
718 alloc_bootmem_low_pages(PAGE_SIZE);
719 pfn_to_mfn_frame_list_list[k] =
720 virt_to_mfn(pfn_to_mfn_frame_list[k]);
723 pfn_to_mfn_frame_list[k][j] =
724 virt_to_mfn(&phys_to_machine_mapping[i]);
726 HYPERVISOR_shared_info->arch.max_pfn = max_pfn;
730 * NOTE: at this point the bootmem allocator is fully available.
733 if (is_initial_xendomain())
736 #ifdef CONFIG_X86_GENERICARCH
737 generic_apic_probe();
743 HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl);
746 if (!is_initial_xendomain()) {
747 printk(KERN_INFO "ACPI in unprivileged domain disabled\n");
753 * Parse the ACPI tables for possible boot-time SMP configuration.
755 acpi_boot_table_init();
759 #ifdef CONFIG_X86_IO_APIC
760 check_acpi_pci(); /* Checks more than just ACPI actually */
767 #if defined(CONFIG_SMP) && defined(CONFIG_X86_PC)
769 printk(KERN_WARNING "More than 8 CPUs detected and "
770 "CONFIG_X86_PC cannot handle it.\nUse "
771 "CONFIG_X86_GENERICARCH or CONFIG_X86_BIGSMP.\n");
774 #ifdef CONFIG_X86_LOCAL_APIC
775 if (smp_found_config)
778 #if defined(CONFIG_XEN) && defined(CONFIG_SMP)
779 prefill_possible_map();
782 e820_register_memory();
784 if (is_initial_xendomain()) {
786 #if defined(CONFIG_VGA_CONSOLE)
788 (efi_mem_type(0xa0000) != EFI_CONVENTIONAL_MEMORY))
789 conswitchp = &vga_con;
790 #elif defined(CONFIG_DUMMY_CONSOLE)
791 conswitchp = &dummy_con;
795 #if defined(CONFIG_VT) && defined(CONFIG_DUMMY_CONSOLE)
796 conswitchp = &dummy_con;
799 #ifdef CONFIG_X86_TSC
805 xen_panic_event(struct notifier_block *this, unsigned long event, void *ptr)
807 HYPERVISOR_shutdown(SHUTDOWN_crash);
808 /* we're never actually going to get here... */
812 static __init int add_pcspkr(void)
814 struct platform_device *pd;
817 pd = platform_device_alloc("pcspkr", -1);
821 ret = platform_device_add(pd);
823 platform_device_put(pd);
827 device_initcall(add_pcspkr);