3 * This file is subject to the terms and conditions of the GNU General Public
4 * License. See the file "COPYING" in the main directory of this archive
7 * Copyright (C) 1992-1997,2000-2003 Silicon Graphics, Inc. All rights reserved.
10 #include <linux/config.h>
11 #include <linux/types.h>
12 #include <asm/sn/sgi.h>
13 #include <asm/sn/sn_sal.h>
14 #include <asm/sn/io.h>
15 #include <asm/sn/sn_cpuid.h>
16 #include <asm/sn/klconfig.h>
17 #include <asm/sn/module.h>
18 #include <asm/sn/sn_private.h>
20 cpuid_t master_procid;
24 * Return non-zero if the given variable was specified
29 return (strlen(s) != 0);
33 * Routines provided by ml/SN/promif.c.
35 static __psunsigned_t master_bridge_base;
36 nasid_t console_nasid = (nasid_t)-1;
37 char master_baseio_wid;
38 static char console_wid;
39 static char console_pcislot;
42 set_master_bridge_base(void)
44 console_wid = WIDGETID_GET(KL_CONFIG_CH_CONS_INFO(master_nasid)->memory_base);
45 console_pcislot = KL_CONFIG_CH_CONS_INFO(master_nasid)->npci;
46 master_bridge_base = (__psunsigned_t)NODE_SWIN_BASE(console_nasid, console_wid);
47 // FIXME("WARNING: set_master_bridge_base: NON NASID 0 DOES NOT WORK\n");
51 check_nasid_equiv(nasid_t nasida, nasid_t nasidb)
53 if ((nasida == nasidb) || (nasida == NODEPDA(NASID_TO_COMPACT_NODEID(nasidb))->xbow_peer))
60 is_master_baseio_nasid_widget(nasid_t test_nasid, xwidgetnum_t test_wid)
62 extern nasid_t master_baseio_nasid;
65 * If the widget numbers are different, we're not the master.
67 if (test_wid != (xwidgetnum_t)master_baseio_wid) {
72 * If the NASIDs are the same or equivalent, we're the master.
74 if (check_nasid_equiv(test_nasid, master_baseio_nasid)) {