.. | .. |
---|
25 | 25 | */ |
---|
26 | 26 | #include <linux/module.h> |
---|
27 | 27 | #include <linux/init.h> |
---|
| 28 | +#include <linux/pgtable.h> |
---|
28 | 29 | |
---|
29 | 30 | #include <linux/acpi.h> |
---|
30 | | -#include <linux/bootmem.h> |
---|
31 | 31 | #include <linux/console.h> |
---|
32 | 32 | #include <linux/delay.h> |
---|
33 | 33 | #include <linux/cpu.h> |
---|
| 34 | +#include <linux/kdev_t.h> |
---|
34 | 35 | #include <linux/kernel.h> |
---|
35 | 36 | #include <linux/memblock.h> |
---|
36 | 37 | #include <linux/reboot.h> |
---|
.. | .. |
---|
42 | 43 | #include <linux/threads.h> |
---|
43 | 44 | #include <linux/screen_info.h> |
---|
44 | 45 | #include <linux/dmi.h> |
---|
| 46 | +#include <linux/root_dev.h> |
---|
45 | 47 | #include <linux/serial.h> |
---|
46 | 48 | #include <linux/serial_core.h> |
---|
47 | 49 | #include <linux/efi.h> |
---|
.. | .. |
---|
51 | 53 | #include <linux/kexec.h> |
---|
52 | 54 | #include <linux/crash_dump.h> |
---|
53 | 55 | |
---|
54 | | -#include <asm/machvec.h> |
---|
55 | 56 | #include <asm/mca.h> |
---|
56 | 57 | #include <asm/meminit.h> |
---|
57 | 58 | #include <asm/page.h> |
---|
58 | 59 | #include <asm/patch.h> |
---|
59 | | -#include <asm/pgtable.h> |
---|
60 | 60 | #include <asm/processor.h> |
---|
61 | 61 | #include <asm/sal.h> |
---|
62 | 62 | #include <asm/sections.h> |
---|
.. | .. |
---|
64 | 64 | #include <asm/smp.h> |
---|
65 | 65 | #include <asm/tlbflush.h> |
---|
66 | 66 | #include <asm/unistd.h> |
---|
67 | | -#include <asm/hpsim.h> |
---|
| 67 | +#include <asm/uv/uv.h> |
---|
| 68 | +#include <asm/xtp.h> |
---|
68 | 69 | |
---|
69 | 70 | #if defined(CONFIG_SMP) && (IA64_CPU_SIZE > PAGE_SIZE) |
---|
70 | 71 | # error "struct cpuinfo_ia64 too big!" |
---|
71 | 72 | #endif |
---|
| 73 | + |
---|
| 74 | +char ia64_platform_name[64]; |
---|
72 | 75 | |
---|
73 | 76 | #ifdef CONFIG_SMP |
---|
74 | 77 | unsigned long __per_cpu_offset[NR_CPUS]; |
---|
.. | .. |
---|
257 | 260 | * This function checks if the reserved crashkernel is allowed on the specific |
---|
258 | 261 | * IA64 machine flavour. Machines without an IO TLB use swiotlb and require |
---|
259 | 262 | * some memory below 4 GB (i.e. in 32 bit area), see the implementation of |
---|
260 | | - * lib/swiotlb.c. The hpzx1 architecture has an IO TLB but cannot use that |
---|
| 263 | + * kernel/dma/swiotlb.c. The hpzx1 architecture has an IO TLB but cannot use that |
---|
261 | 264 | * in kdump case. See the comment in sba_init() in sba_iommu.c. |
---|
262 | 265 | * |
---|
263 | 266 | * So, the only machvec that really supports loading the kdump kernel |
---|
264 | | - * over 4 GB is "sn2". |
---|
| 267 | + * over 4 GB is "uv". |
---|
265 | 268 | */ |
---|
266 | 269 | static int __init check_crashkernel_memory(unsigned long pbase, size_t size) |
---|
267 | 270 | { |
---|
268 | | - if (ia64_platform_is("sn2") || ia64_platform_is("uv")) |
---|
| 271 | + if (is_uv_system()) |
---|
269 | 272 | return 1; |
---|
270 | 273 | else |
---|
271 | 274 | return pbase < (1UL << 32); |
---|
.. | .. |
---|
287 | 290 | } |
---|
288 | 291 | |
---|
289 | 292 | if (!check_crashkernel_memory(base, size)) { |
---|
290 | | - pr_warning("crashkernel: There would be kdump memory " |
---|
| 293 | + pr_warn("crashkernel: There would be kdump memory " |
---|
291 | 294 | "at %ld GB but this is unusable because it " |
---|
292 | 295 | "must\nbe below 4 GB. Change the memory " |
---|
293 | 296 | "configuration of the machine.\n", |
---|
.. | .. |
---|
462 | 465 | static inline int __init |
---|
463 | 466 | early_console_setup (char *cmdline) |
---|
464 | 467 | { |
---|
465 | | - int earlycons = 0; |
---|
466 | | - |
---|
467 | | -#ifdef CONFIG_SERIAL_SGI_L1_CONSOLE |
---|
468 | | - { |
---|
469 | | - extern int sn_serial_console_early_setup(void); |
---|
470 | | - if (!sn_serial_console_early_setup()) |
---|
471 | | - earlycons++; |
---|
472 | | - } |
---|
473 | | -#endif |
---|
474 | 468 | #ifdef CONFIG_EFI_PCDP |
---|
475 | 469 | if (!efi_setup_pcdp_console(cmdline)) |
---|
476 | | - earlycons++; |
---|
| 470 | + return 0; |
---|
477 | 471 | #endif |
---|
478 | | - if (!simcons_register()) |
---|
479 | | - earlycons++; |
---|
| 472 | + return -1; |
---|
| 473 | +} |
---|
480 | 474 | |
---|
481 | | - return (earlycons) ? 0 : -1; |
---|
| 475 | +static void __init |
---|
| 476 | +screen_info_setup(void) |
---|
| 477 | +{ |
---|
| 478 | + unsigned int orig_x, orig_y, num_cols, num_rows, font_height; |
---|
| 479 | + |
---|
| 480 | + memset(&screen_info, 0, sizeof(screen_info)); |
---|
| 481 | + |
---|
| 482 | + if (!ia64_boot_param->console_info.num_rows || |
---|
| 483 | + !ia64_boot_param->console_info.num_cols) { |
---|
| 484 | + printk(KERN_WARNING "invalid screen-info, guessing 80x25\n"); |
---|
| 485 | + orig_x = 0; |
---|
| 486 | + orig_y = 0; |
---|
| 487 | + num_cols = 80; |
---|
| 488 | + num_rows = 25; |
---|
| 489 | + font_height = 16; |
---|
| 490 | + } else { |
---|
| 491 | + orig_x = ia64_boot_param->console_info.orig_x; |
---|
| 492 | + orig_y = ia64_boot_param->console_info.orig_y; |
---|
| 493 | + num_cols = ia64_boot_param->console_info.num_cols; |
---|
| 494 | + num_rows = ia64_boot_param->console_info.num_rows; |
---|
| 495 | + font_height = 400 / num_rows; |
---|
| 496 | + } |
---|
| 497 | + |
---|
| 498 | + screen_info.orig_x = orig_x; |
---|
| 499 | + screen_info.orig_y = orig_y; |
---|
| 500 | + screen_info.orig_video_cols = num_cols; |
---|
| 501 | + screen_info.orig_video_lines = num_rows; |
---|
| 502 | + screen_info.orig_video_points = font_height; |
---|
| 503 | + screen_info.orig_video_mode = 3; /* XXX fake */ |
---|
| 504 | + screen_info.orig_video_isVGA = 1; /* XXX fake */ |
---|
| 505 | + screen_info.orig_video_ega_bx = 3; /* XXX fake */ |
---|
482 | 506 | } |
---|
483 | 507 | |
---|
484 | 508 | static inline void |
---|
.. | .. |
---|
537 | 561 | efi_init(); |
---|
538 | 562 | io_port_init(); |
---|
539 | 563 | |
---|
540 | | -#ifdef CONFIG_IA64_GENERIC |
---|
541 | | - /* machvec needs to be parsed from the command line |
---|
542 | | - * before parse_early_param() is called to ensure |
---|
543 | | - * that ia64_mv is initialised before any command line |
---|
544 | | - * settings may cause console setup to occur |
---|
545 | | - */ |
---|
546 | | - machvec_init_from_cmdline(*cmdline_p); |
---|
547 | | -#endif |
---|
548 | | - |
---|
| 564 | + uv_probe_system_type(); |
---|
549 | 565 | parse_early_param(); |
---|
550 | 566 | |
---|
551 | 567 | if (early_console_setup(*cmdline_p) == 0) |
---|
552 | 568 | mark_bsp_online(); |
---|
553 | 569 | |
---|
554 | | -#ifdef CONFIG_ACPI |
---|
555 | 570 | /* Initialize the ACPI boot-time table parser */ |
---|
556 | 571 | acpi_table_init(); |
---|
557 | 572 | early_acpi_boot_init(); |
---|
558 | | -# ifdef CONFIG_ACPI_NUMA |
---|
| 573 | +#ifdef CONFIG_ACPI_NUMA |
---|
559 | 574 | acpi_numa_init(); |
---|
560 | 575 | acpi_numa_fixup(); |
---|
561 | | -# ifdef CONFIG_ACPI_HOTPLUG_CPU |
---|
| 576 | +#ifdef CONFIG_ACPI_HOTPLUG_CPU |
---|
562 | 577 | prefill_possible_map(); |
---|
563 | | -# endif |
---|
| 578 | +#endif |
---|
564 | 579 | per_cpu_scan_finalize((cpumask_weight(&early_cpu_possible_map) == 0 ? |
---|
565 | 580 | 32 : cpumask_weight(&early_cpu_possible_map)), |
---|
566 | 581 | additional_cpus > 0 ? additional_cpus : 0); |
---|
567 | | -# endif |
---|
568 | | -#endif /* CONFIG_APCI_BOOT */ |
---|
| 582 | +#endif /* CONFIG_ACPI_NUMA */ |
---|
569 | 583 | |
---|
570 | 584 | #ifdef CONFIG_SMP |
---|
571 | 585 | smp_build_cpu_map(); |
---|
.. | .. |
---|
573 | 587 | find_memory(); |
---|
574 | 588 | |
---|
575 | 589 | /* process SAL system table: */ |
---|
576 | | - ia64_sal_init(__va(efi.sal_systab)); |
---|
| 590 | + ia64_sal_init(__va(sal_systab_phys)); |
---|
577 | 591 | |
---|
578 | 592 | #ifdef CONFIG_ITANIUM |
---|
579 | 593 | ia64_patch_rse((u64) __start___rse_patchlist, (u64) __end___rse_patchlist); |
---|
.. | .. |
---|
595 | 609 | |
---|
596 | 610 | #ifdef CONFIG_VT |
---|
597 | 611 | if (!conswitchp) { |
---|
598 | | -# if defined(CONFIG_DUMMY_CONSOLE) |
---|
599 | | - conswitchp = &dummy_con; |
---|
600 | | -# endif |
---|
601 | 612 | # if defined(CONFIG_VGA_CONSOLE) |
---|
602 | 613 | /* |
---|
603 | 614 | * Non-legacy systems may route legacy VGA MMIO range to system |
---|
.. | .. |
---|
615 | 626 | if (!nomca) |
---|
616 | 627 | ia64_mca_init(); |
---|
617 | 628 | |
---|
618 | | - platform_setup(cmdline_p); |
---|
619 | | -#ifndef CONFIG_IA64_HP_SIM |
---|
620 | | - check_sal_cache_flush(); |
---|
| 629 | + /* |
---|
| 630 | + * Default to /dev/sda2. This assumes that the EFI partition |
---|
| 631 | + * is physical disk 1 partition 1 and the Linux root disk is |
---|
| 632 | + * physical disk 1 partition 2. |
---|
| 633 | + */ |
---|
| 634 | + ROOT_DEV = Root_SDA2; /* default to second partition on first drive */ |
---|
| 635 | + |
---|
| 636 | + if (is_uv_system()) |
---|
| 637 | + uv_setup(cmdline_p); |
---|
| 638 | +#ifdef CONFIG_SMP |
---|
| 639 | + else |
---|
| 640 | + init_smp_config(); |
---|
621 | 641 | #endif |
---|
| 642 | + |
---|
| 643 | + screen_info_setup(); |
---|
622 | 644 | paging_init(); |
---|
623 | 645 | |
---|
624 | 646 | clear_sched_clock_stable(); |
---|
.. | .. |
---|
1047 | 1069 | ia64_patch_phys_stack_reg(num_phys_stacked*8 + 8); |
---|
1048 | 1070 | max_num_phys_stacked = num_phys_stacked; |
---|
1049 | 1071 | } |
---|
1050 | | - platform_cpu_init(); |
---|
1051 | 1072 | } |
---|
1052 | 1073 | |
---|
1053 | 1074 | void __init |
---|
.. | .. |
---|
1059 | 1080 | |
---|
1060 | 1081 | static int __init run_dmi_scan(void) |
---|
1061 | 1082 | { |
---|
1062 | | - dmi_scan_machine(); |
---|
1063 | | - dmi_memdev_walk(); |
---|
1064 | | - dmi_set_dump_stack_arch_desc(); |
---|
| 1083 | + dmi_setup(); |
---|
1065 | 1084 | return 0; |
---|
1066 | 1085 | } |
---|
1067 | 1086 | core_initcall(run_dmi_scan); |
---|