Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * This file is subject to the terms and conditions of the GNU General Public
0003  * License.  See the file "COPYING" in the main directory of this archive
0004  * for more details.
0005  *
0006  * PROM library initialisation code.
0007  *
0008  * Copyright (C) 1996 David S. Miller (davem@davemloft.net)
0009  */
0010 #include <linux/init.h>
0011 #include <linux/kernel.h>
0012 
0013 #include <asm/bootinfo.h>
0014 #include <asm/sgialib.h>
0015 #include <asm/smp-ops.h>
0016 
0017 #undef DEBUG_PROM_INIT
0018 
0019 /* Master romvec interface. */
0020 struct linux_romvec *romvec;
0021 
0022 #if defined(CONFIG_64BIT) && defined(CONFIG_FW_ARC32)
0023 /* stack for calling 32bit ARC prom */
0024 u64 o32_stk[4096];
0025 #endif
0026 
0027 void __init prom_init(void)
0028 {
0029     PSYSTEM_PARAMETER_BLOCK pb = PROMBLOCK;
0030 
0031     romvec = ROMVECTOR;
0032 
0033     if (pb->magic != 0x53435241) {
0034         printk(KERN_CRIT "Aieee, bad prom vector magic %08lx\n",
0035                (unsigned long) pb->magic);
0036         while(1)
0037             ;
0038     }
0039 
0040     prom_init_cmdline(fw_arg0, (LONG *)fw_arg1);
0041     prom_identify_arch();
0042     printk(KERN_INFO "PROMLIB: ARC firmware Version %d Revision %d\n",
0043            pb->ver, pb->rev);
0044     prom_meminit();
0045 
0046 #ifdef DEBUG_PROM_INIT
0047     pr_info("Press a key to reboot\n");
0048     ArcRead(0, &c, 1, &cnt);
0049     ArcEnterInteractiveMode();
0050 #endif
0051 }