1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
|
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_BOOTSYMS_H
#define _SYS_BOOTSYMS_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* This header file should not exist.
*
* Whether it be due to laziness, machismo, or just plain cluelessness, most
* of the symbols over in psm/stand are not properly prototyped anywhere.
*
* To workaround this, developers have adopted the horrendous practice of
* "externing" the symbols they need, leading to dozens of declarations of
* the same symbol which have to be kept in sync. Unfortunately, no similar
* workaround exists for lint's pass2, which requires definitions for all
* symbols in order to properly perform cross-checks.
*
* Thus, this header file was created to address two problems:
*
* 1. The "extern" problem. All files beneath stand/lib should #include
* this file rather than "extern" the symbol. Additionally, existing
* externs should be removed as convenient.
*
* Of course, eventually some brave soul needs to venture over to the
* slums of psm/stand and add all the proper header files, at which
* point this file can be disposed of.
*
* 2. The lint pass2 problem. Specifically, this file is used to build
* llib-lfakeboot.ln, which is then used to properly lint the
* binaries under stand/lib. See stand/lib/llib-lfakeboot for more
* details.
*
* Note that the set of symbols shared between stand/lib and psm/stand is
* itself a moving target. As such, this file should be updated as needed
* so that it always contains the *minimum* set of shared symbols needed to
* avoid externs and placate lint.
*/
#include <sys/saio.h>
#ifdef __i386
#include <sys/obpdefs.h> /* for phandle_t */
#include <sys/ihandle.h> /* for struct ihandle (and its routines) */
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* From psm/stand/boot/$(MACH)/common/fsconf.c:
*/
extern int nfs_readsize;
extern int boot_nfsw;
extern struct boot_fs_ops *boot_fsw[];
extern struct boot_fs_ops *extendfs_ops;
extern struct boot_fs_ops *origfs_ops;
/*
* From psm/stand/boot/common/boot.c:
*/
extern int boothowto;
extern int verbosemode;
extern char *systype;
extern struct memlist *pfreelistp;
extern struct memlist *vfreelistp;
extern void set_default_filename(char *);
/*
* From psm/stand/boot/common/heap_kmem.c:
*/
extern void *bkmem_alloc(size_t);
extern void *bkmem_zalloc(size_t);
extern void bkmem_free(void *, size_t);
/*
* From psm/stand/boot/$(MACH)/common/$(MACH)_standalloc.c:
*/
extern caddr_t resalloc(enum RESOURCES, size_t, caddr_t, int);
extern void resfree(enum RESOURCES, caddr_t, size_t);
extern void reset_alloc(void);
/*
* From psm/stand/lib/names/$(MACH)/common/mfgname.c: (libnames)
*/
extern char *get_mfg_name(void);
/*
* From psm/stand/boot/i386/common/boot_plat.c or
* psm/stand/boot/sparcv9/sun4u/machdep.c:
*/
extern int pagesize;
extern int global_pages;
#ifdef __sparc
/*
* From psm/stand/boot/sparc/common/fsconf.c:
*/
extern char *bootp_response;
/*
* From psm/stand/boot/sparc/common/wanboot.c:
*/
extern char *bootcfg;
#endif /* __sparc */
#ifdef __i386
/*
* From psm/stand/boot/i386/common/bootops.c:
*/
extern char *new_root_type;
extern struct bootops bootops;
/*
* From psm/stand/boot/i386/common/delayed.c:
*/
typedef struct orf rffd_t;
extern void RAMfiletoprop(rffd_t *);
/*
* From psm/stand/boot/i386/common/disk.c:
*/
extern int is_floppy(int);
extern int is_floppy0(int);
extern int is_floppy1(int);
extern int read_blocks(struct ihandle *, daddr_t, int);
extern int floppy_status_changed(int);
extern int SilentDiskFailures;
/*
* From psm/stand/boot/i386/common/disk.c:
*/
extern int bgets(char *, int);
/*
* From psm/stand/boot/i386/common/i386_memlist.c:
*/
extern int insert_node(struct memlist **, struct memlist *);
extern struct memlist *search_list(struct memlist *, struct memlist *);
/*
* From psm/stand/boot/i386/common/memory.c:
*/
extern uint_t top_virtaddr;
extern uint32_t find_mem(unsigned int, int);
/*
* From psm/stand/boot/i386/common/net_pxe.c:
*/
extern int pxe_ack_cache(char **);
/*
* From psm/stand/boot/i386/common/misc_utls.c:
*/
extern void popup_prompt(char *, char *);
/*
* From psm/stand/boot/i386/i86pc/srt0.s:
*/
extern int Oldstyleboot;
extern uint_t bpd_loc;
extern struct bootops *bop;
extern struct pri_to_secboot *realp;
/*
* From psm/stand/boot/intel/bootprop.c:
*/
extern int bgetprop(struct bootops *, char *, caddr_t, int, phandle_t);
extern int bgetproplen(struct bootops *, char *, phandle_t);
extern int bsetprop(struct bootops *, char *, caddr_t, int, phandle_t);
#endif /* __i386 */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_BOOTSYMS_H */
|