1 /* $Id: init.c,v 1.5 2000/03/07 15:45:27 ralf Exp $
2 * This file is subject to the terms and conditions of the GNU General Public+
3 * License. See the file "COPYING" in the main directory of this archive
6 * PROM library initialisation code.
8 * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
10 #include <linux/init.h>
11 #include <linux/kernel.h>
13 #include <asm/sgialib.h>
15 #undef DEBUG_PROM_INIT
17 /* Master romvec interface. */
18 struct linux_romvec
*romvec
;
19 struct linux_promblock
*sgi_pblock
;
21 char **prom_argv
, **prom_envp
;
22 unsigned short prom_vers
, prom_rev
;
24 extern void prom_testtree(void);
26 int __init
prom_init(int argc
, char **argv
, char **envp
, int *prom_vec
)
28 struct linux_promblock
*pb
;
31 pb
= sgi_pblock
= PROMBLOCK
;
36 if(pb
->magic
!= 0x53435241) {
37 prom_printf("Aieee, bad prom vector magic %08lx\n", pb
->magic
);
47 printk("PROMLIB: ARC firmware Version %d Revision %d\n",
51 #ifdef DEBUG_PROM_INIT
53 prom_printf("Press a key to reboot\n");
54 (void) prom_getchar();