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) 2000-2003 Silicon Graphics, Inc. All rights reserved.
12 #include <linux/config.h>
13 #include <linux/types.h>
14 #include <asm/bitops.h>
15 #include <asm/sn/simulator.h>
18 extern void klgraph_init(void);
19 void sys_fw_init (const char *args, int arglen);
22 fmain(int lid, int bsp) {
23 int nasid, cpu, mynasid, mycpu, bootmaster;
26 * * Pass the parameter base address to the build_efi_xxx routines.
29 build_init(0x3000000000UL | ((long)base_nasid<<38));
33 * First lets figure out who we are. This is done from the
36 mynasid = (lid>>16)&0xfff;
40 * Determine if THIS cpu is the bootmaster. The <bsp> parameter
41 * is the logical cpu of the bootmaster. Cpus are numbered
42 * low-to-high nasid/lid.
44 GetLogicalCpu(bsp, &nasid, &cpu);
45 bootmaster = (mynasid == nasid) && (mycpu == cpu);
48 * Initialize SAL & EFI tables.
49 * Note: non-bootmaster cpus will return to the slave loop
50 * in fpromasm.S. They spin there until they receive an
51 * external interrupt from the master cpu.
56 * Undef if you need fprom to generate a 1 node klgraph
57 * information .. only works for 1 node for nasid 0.
69 /* Why isnt there a bcopy/memcpy in lib64.a */
72 memcpy(void * dest, const void *src, size_t count)
76 for(d=dest, s=(char*)src, se=s+count; s<se; s++, d++)