xref: /illumos-gate/usr/src/psm/stand/boot/sparc/common/boot_plat.h (revision 355b4669e025ff377602b6fc7caaf30dbc218371)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef _BOOT_PLAT_H
28 #define	_BOOT_PLAT_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 
37 
38 /* boot_plat.c */
39 extern char	*cmd_line_default_path;
40 extern int	verbosemode;
41 extern char	filename[];
42 extern char	*const defname;
43 extern char	*const defname64;
44 extern char	wanboot_arguments[];
45 
46 extern int	bootprog(char *, char *, boolean_t);
47 extern char	*choose_default_filename(char *, char *);
48 extern char	*get_default_filename(void);
49 extern void	post_mountroot(char *, char *);
50 extern void	redirect_boot_path(char *, char *);
51 extern void	set_client_bootargs(const char *, const char *);
52 extern boolean_t is_netdev(char *devpath);
53 
54 
55 /* boot_1275entry.c */
56 extern int	boot1275_entry_asm(void *);
57 extern void	boot_fail_gracefully_asm(void);
58 
59 
60 /* boot_services.c */
61 extern int	boot1275_entry(void *);
62 
63 
64 /* bootops.c */
65 extern struct bootops	bootops;
66 
67 extern void	setup_bootops(void);
68 extern void	update_memlist(char *, char *, struct memlist **);
69 extern void	boot_fail_gracefully(void);
70 
71 
72 /*
73  * bootprop.c.  These variables will be exported to the standalone as boot
74  * properties.
75  */
76 extern char	*v2path, *kernname, *systype, *my_own_name;
77 extern char	v2args_buf[];
78 #define	V2ARGS_BUF_SZ	OBP_MAXPATHLEN
79 extern char	*v2args;
80 extern char	*mfg_name;
81 extern char	*impl_arch_name;
82 extern char	*bootp_response;
83 extern char	*boot_message;
84 extern char	*cmd_line_default_path;
85 extern int	cache_state;
86 extern uint64_t	memlistextent;
87 extern char	*netdev_path;
88 
89 extern void	set_default_filename(char *filename);
90 
91 
92 /* get.c */
93 extern int	cons_gets(char *, int);
94 
95 
96 /* machdep.c */
97 extern int  vac;
98 
99 extern void	fiximp(void);
100 extern void	retain_nvram_page();
101 
102 #ifdef MPSAS
103 extern void	sas_bpts(void);
104 #endif
105 
106 extern int	cpu_is_ultrasparc_1(void);
107 
108 
109 /* memlist.c */
110 extern void		init_memlists(void);
111 extern struct memlist	*fill_memlists(char *name, char *prop,
112     struct memlist *old);
113 
114 
115 /* srt0.c */
116 extern void	_start(void *romp, ...);
117 extern void	exitto(int (*entrypoint)());
118 extern void	exitto64(int (*entrypoint)(), void *bootvec);
119 
120 
121 /* standalloc.c */
122 extern caddr_t	memlistpage;
123 extern caddr_t	scratchmemp;
124 
125 
126 
127 #ifdef __cplusplus
128 }
129 #endif
130 
131 #endif /* _BOOT_PLAT_H */
132