9 #include <linux/module.h>
12 #include <linux/kernel.h>
13 #include <linux/kdev_t.h>
14 #include <linux/string.h>
15 #include <linux/screen_info.h>
17 #include <linux/timex.h>
18 #include <linux/sched.h>
21 #include <linux/serial.h>
27 #include <linux/compiler.h>
35 #include <asm/machvec.h>
36 #include <asm/processor.h>
38 #include <asm/setup.h>
39 #include <asm/sn/arch.h>
40 #include <asm/sn/addrs.h>
54 #include <asm/sn/klconfig.h>
59 #define MAX_PHYS_MEMORY (1UL << IA64_MAX_PHYS_BITS)
103 static void sn_init_pdas(
char **);
104 static void build_cnode_tables(
void);
116 .orig_video_mode = 3,
117 .orig_video_cols = 80,
118 .orig_video_ega_bx = 3,
119 .orig_video_lines = 25,
120 .orig_video_isVGA = 1,
121 .orig_video_points = 16
133 static int __init pxm_to_nasid(
int pxm)
172 for (i = 0; i < efi_systab->
nr_tables; i++) {
175 sal_systab =
__va(config_tables[i].
table);
176 p = (
char *)(sal_systab + 1);
203 static inline int __cpuinit is_shub_1_1(
int nasid)
215 static void __cpuinit sn_check_for_wars(
void)
298 #define PCDP_PRIMARY_CONSOLE 0x01
301 #define PCDP_CONSOLE_INOUT 0x0
302 #define PCDP_CONSOLE_DEBUG 0x1
303 #define PCDP_CONSOLE_OUT 0x2
304 #define PCDP_CONSOLE_IN 0x3
305 #define PCDP_CONSOLE_TYPE_VGA 0x8
307 #define PCDP_CONSOLE_VGA (PCDP_CONSOLE_TYPE_VGA | PCDP_CONSOLE_OUT)
310 #define PCDP_IF_PCI 1
313 #define PCDP_PCI_TRANS_IOPORT 0x02
314 #define PCDP_PCI_TRANS_MMIO 0x01
316 #if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE)
324 extern struct efi efi;
337 memcpy(&device, bp,
sizeof(device));
344 memcpy(&if_pci, bp+
sizeof(device),
sizeof(if_pci));
360 static unsigned long sn2_rtc_initial;
372 long status, ticks_per_sec, drift;
377 ia64_sn_plat_set_error_handling_features();
392 #if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE)
428 if (!
strstr(*cmdline_p,
"console="))
432 if (!
strstr(*cmdline_p,
"console="))
434 #ifdef CONFIG_DUMMY_CONSOLE
447 build_cnode_tables();
452 if (status != 0 || ticks_per_sec < 100000) {
454 "unable to determine platform RTC clock frequency, guessing.\n");
462 printk(
"SGI SAL version %x.%02x\n", version >> 8, version & 0x00FF);
473 sn_init_pdas(cmdline_p);
505 static void __init sn_init_pdas(
char **cmdline_p)
531 memcpy(nodepdaindr[cnode]->pernode_pdaindr, nodepdaindr,
532 sizeof(nodepdaindr));
547 for (cnode = 0; cnode <
num_cnodes; cnode++) {
570 static int wars_have_been_checked, set_cpu0_number;
574 if (ia64_sn_is_fake_prom())
599 if (!set_cpu0_number) {
600 (
void) ia64_sn_set_cpu_number(cpuid);
604 (
void) ia64_sn_set_cpu_number(cpuid);
610 if (nodepdaindr[0] ==
NULL)
614 if (ia64_sn_get_prom_feature_set(i, &sn_prom_features[i]) != 0)
619 if (ia64_sn_get_sapic_info(cpuphyid, &nasid, &subnode, &slice))
623 if (nodepdaindr[i]) {
637 pda->hb_count =
HZ / 2;
644 (&
per_cpu(__sn_cnodeid_to_nasid, 0)),
656 if (!wars_have_been_checked) {
658 wars_have_been_checked = 1;
671 pda->pio_write_status_addr =
679 if (local_node_data->active_cpu_count++ == 0 &&
is_shub1()) {
684 pda->pio_shub_war_cam_addr =
693 static inline int __init board_needs_cnode(
int type)
698 void __init build_cnode_tables(
void)
727 if (IS_RUNNING_ON_FAKE_PROM())
734 klgraph_header = ia64_sn_get_klconfig_addr(nasid);
742 brd = find_lboard_next(brd);
764 return test_bit(
id, sn_prom_features);
771 if (ia64_sn_kernel_launch_event())
772 printk(
KERN_ERR "KEXEC is not supported in this PROM, Please update the PROM.\n");