xref: /illumos-gate/usr/src/stand/sys/bootsyms.h (revision 241c90a0)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
54a634bb8Sga  * Common Development and Distribution License (the "License").
64a634bb8Sga  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*
224a634bb8Sga  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
247c478bd9Sstevel@tonic-gate  */
267c478bd9Sstevel@tonic-gate #ifndef _SYS_BOOTSYMS_H
277c478bd9Sstevel@tonic-gate #define	_SYS_BOOTSYMS_H
297c478bd9Sstevel@tonic-gate /*
307c478bd9Sstevel@tonic-gate  * This header file should not exist.
317c478bd9Sstevel@tonic-gate  *
327c478bd9Sstevel@tonic-gate  * Whether it be due to laziness, machismo, or just plain cluelessness, most
337c478bd9Sstevel@tonic-gate  * of the symbols over in psm/stand are not properly prototyped anywhere.
347c478bd9Sstevel@tonic-gate  *
357c478bd9Sstevel@tonic-gate  * To workaround this, developers have adopted the horrendous practice of
367c478bd9Sstevel@tonic-gate  * "externing" the symbols they need, leading to dozens of declarations of
377c478bd9Sstevel@tonic-gate  * the same symbol which have to be kept in sync.  Unfortunately, no similar
387c478bd9Sstevel@tonic-gate  * workaround exists for lint's pass2, which requires definitions for all
397c478bd9Sstevel@tonic-gate  * symbols in order to properly perform cross-checks.
407c478bd9Sstevel@tonic-gate  *
41*241c90a0SRichard Lowe  * Thus, this header file was created to address the problems:
427c478bd9Sstevel@tonic-gate  *
43*241c90a0SRichard Lowe  *	- The "extern" problem.  All files beneath stand/lib should #include
44*241c90a0SRichard Lowe  *	  this file rather than "extern" the symbol. Additionally, existing
45*241c90a0SRichard Lowe  *	  externs should be removed as convenient.
467c478bd9Sstevel@tonic-gate  *
47*241c90a0SRichard Lowe  *	  Of course, eventually some brave soul needs to venture over to the
48*241c90a0SRichard Lowe  *	  slums of psm/stand and add all the proper header files, at which
49*241c90a0SRichard Lowe  *	  point this file can be disposed of.
507c478bd9Sstevel@tonic-gate  *
517c478bd9Sstevel@tonic-gate  * Note that the set of symbols shared between stand/lib and psm/stand is
527c478bd9Sstevel@tonic-gate  * itself a moving target.  As such, this file should be updated as needed
537c478bd9Sstevel@tonic-gate  * so that it always contains the *minimum* set of shared symbols needed to
547c478bd9Sstevel@tonic-gate  * avoid externs and placate lint.
557c478bd9Sstevel@tonic-gate  */
577c478bd9Sstevel@tonic-gate #include <sys/saio.h>
597c478bd9Sstevel@tonic-gate #ifdef __cplusplus
607c478bd9Sstevel@tonic-gate extern "C" {
617c478bd9Sstevel@tonic-gate #endif
637c478bd9Sstevel@tonic-gate /*
647c478bd9Sstevel@tonic-gate  * From psm/stand/boot/$(MACH)/common/fsconf.c:
657c478bd9Sstevel@tonic-gate  */
667c478bd9Sstevel@tonic-gate extern int nfs_readsize;
677c478bd9Sstevel@tonic-gate extern int boot_nfsw;
687c478bd9Sstevel@tonic-gate extern struct boot_fs_ops *boot_fsw[];
697c478bd9Sstevel@tonic-gate extern struct boot_fs_ops *extendfs_ops;
707c478bd9Sstevel@tonic-gate extern struct boot_fs_ops *origfs_ops;
727c478bd9Sstevel@tonic-gate /*
737c478bd9Sstevel@tonic-gate  * From psm/stand/boot/common/boot.c:
747c478bd9Sstevel@tonic-gate  */
757c478bd9Sstevel@tonic-gate extern int boothowto;
767c478bd9Sstevel@tonic-gate extern int verbosemode;
777c478bd9Sstevel@tonic-gate extern char *systype;
787c478bd9Sstevel@tonic-gate extern struct memlist *pfreelistp;
797c478bd9Sstevel@tonic-gate extern struct memlist *vfreelistp;
807c478bd9Sstevel@tonic-gate extern void set_default_filename(char *);
827c478bd9Sstevel@tonic-gate /*
837c478bd9Sstevel@tonic-gate  * From psm/stand/boot/common/heap_kmem.c:
847c478bd9Sstevel@tonic-gate  */
857c478bd9Sstevel@tonic-gate extern void *bkmem_alloc(size_t);
867c478bd9Sstevel@tonic-gate extern void *bkmem_zalloc(size_t);
877c478bd9Sstevel@tonic-gate extern void bkmem_free(void *, size_t);
897c478bd9Sstevel@tonic-gate /*
907c478bd9Sstevel@tonic-gate  * From psm/stand/boot/$(MACH)/common/$(MACH)_standalloc.c:
917c478bd9Sstevel@tonic-gate  */
927c478bd9Sstevel@tonic-gate extern caddr_t resalloc(enum RESOURCES, size_t, caddr_t, int);
937c478bd9Sstevel@tonic-gate extern void resfree(enum RESOURCES, caddr_t, size_t);
947c478bd9Sstevel@tonic-gate extern void reset_alloc(void);
967c478bd9Sstevel@tonic-gate /*
977c478bd9Sstevel@tonic-gate  * From psm/stand/lib/names/$(MACH)/common/mfgname.c: (libnames)
987c478bd9Sstevel@tonic-gate  */
997c478bd9Sstevel@tonic-gate extern char *get_mfg_name(void);
1017c478bd9Sstevel@tonic-gate /*
1027c478bd9Sstevel@tonic-gate  * From psm/stand/boot/i386/common/boot_plat.c or
1037c478bd9Sstevel@tonic-gate  *      psm/stand/boot/sparcv9/sun4u/machdep.c:
1047c478bd9Sstevel@tonic-gate  */
1057c478bd9Sstevel@tonic-gate extern int pagesize;
1067c478bd9Sstevel@tonic-gate extern int global_pages;
1087c478bd9Sstevel@tonic-gate #ifdef __sparc
1097c478bd9Sstevel@tonic-gate /*
1107c478bd9Sstevel@tonic-gate  * From psm/stand/boot/sparc/common/fsconf.c:
1117c478bd9Sstevel@tonic-gate  */
1127c478bd9Sstevel@tonic-gate extern char *bootp_response;
1137c478bd9Sstevel@tonic-gate #endif /* __sparc */
1157c478bd9Sstevel@tonic-gate #ifdef __cplusplus
1167c478bd9Sstevel@tonic-gate }
1177c478bd9Sstevel@tonic-gate #endif
1197c478bd9Sstevel@tonic-gate #endif /* _SYS_BOOTSYMS_H */