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 5*4a634bb8Sga159272 * Common Development and Distribution License (the "License"). 6*4a634bb8Sga159272 * 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 /* 22*4a634bb8Sga159272 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate * Use is subject to license terms. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gate #ifndef _SYS_BOOTSYMS_H 277c478bd9Sstevel@tonic-gate #define _SYS_BOOTSYMS_H 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gate /* 327c478bd9Sstevel@tonic-gate * This header file should not exist. 337c478bd9Sstevel@tonic-gate * 347c478bd9Sstevel@tonic-gate * Whether it be due to laziness, machismo, or just plain cluelessness, most 357c478bd9Sstevel@tonic-gate * of the symbols over in psm/stand are not properly prototyped anywhere. 367c478bd9Sstevel@tonic-gate * 377c478bd9Sstevel@tonic-gate * To workaround this, developers have adopted the horrendous practice of 387c478bd9Sstevel@tonic-gate * "externing" the symbols they need, leading to dozens of declarations of 397c478bd9Sstevel@tonic-gate * the same symbol which have to be kept in sync. Unfortunately, no similar 407c478bd9Sstevel@tonic-gate * workaround exists for lint's pass2, which requires definitions for all 417c478bd9Sstevel@tonic-gate * symbols in order to properly perform cross-checks. 427c478bd9Sstevel@tonic-gate * 437c478bd9Sstevel@tonic-gate * Thus, this header file was created to address two problems: 447c478bd9Sstevel@tonic-gate * 457c478bd9Sstevel@tonic-gate * 1. The "extern" problem. All files beneath stand/lib should #include 467c478bd9Sstevel@tonic-gate * this file rather than "extern" the symbol. Additionally, existing 477c478bd9Sstevel@tonic-gate * externs should be removed as convenient. 487c478bd9Sstevel@tonic-gate * 497c478bd9Sstevel@tonic-gate * Of course, eventually some brave soul needs to venture over to the 507c478bd9Sstevel@tonic-gate * slums of psm/stand and add all the proper header files, at which 517c478bd9Sstevel@tonic-gate * point this file can be disposed of. 527c478bd9Sstevel@tonic-gate * 537c478bd9Sstevel@tonic-gate * 2. The lint pass2 problem. Specifically, this file is used to build 547c478bd9Sstevel@tonic-gate * llib-lfakeboot.ln, which is then used to properly lint the 557c478bd9Sstevel@tonic-gate * binaries under stand/lib. See stand/lib/llib-lfakeboot for more 567c478bd9Sstevel@tonic-gate * details. 577c478bd9Sstevel@tonic-gate * 587c478bd9Sstevel@tonic-gate * Note that the set of symbols shared between stand/lib and psm/stand is 597c478bd9Sstevel@tonic-gate * itself a moving target. As such, this file should be updated as needed 607c478bd9Sstevel@tonic-gate * so that it always contains the *minimum* set of shared symbols needed to 617c478bd9Sstevel@tonic-gate * avoid externs and placate lint. 627c478bd9Sstevel@tonic-gate */ 637c478bd9Sstevel@tonic-gate 647c478bd9Sstevel@tonic-gate #include <sys/saio.h> 657c478bd9Sstevel@tonic-gate 667c478bd9Sstevel@tonic-gate #ifdef __cplusplus 677c478bd9Sstevel@tonic-gate extern "C" { 687c478bd9Sstevel@tonic-gate #endif 697c478bd9Sstevel@tonic-gate 707c478bd9Sstevel@tonic-gate /* 717c478bd9Sstevel@tonic-gate * From psm/stand/boot/$(MACH)/common/fsconf.c: 727c478bd9Sstevel@tonic-gate */ 737c478bd9Sstevel@tonic-gate extern int nfs_readsize; 747c478bd9Sstevel@tonic-gate extern int boot_nfsw; 757c478bd9Sstevel@tonic-gate extern struct boot_fs_ops *boot_fsw[]; 767c478bd9Sstevel@tonic-gate extern struct boot_fs_ops *extendfs_ops; 777c478bd9Sstevel@tonic-gate extern struct boot_fs_ops *origfs_ops; 787c478bd9Sstevel@tonic-gate 797c478bd9Sstevel@tonic-gate /* 807c478bd9Sstevel@tonic-gate * From psm/stand/boot/common/boot.c: 817c478bd9Sstevel@tonic-gate */ 827c478bd9Sstevel@tonic-gate extern int boothowto; 837c478bd9Sstevel@tonic-gate extern int verbosemode; 847c478bd9Sstevel@tonic-gate extern char *systype; 857c478bd9Sstevel@tonic-gate extern struct memlist *pfreelistp; 867c478bd9Sstevel@tonic-gate extern struct memlist *vfreelistp; 877c478bd9Sstevel@tonic-gate extern void set_default_filename(char *); 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gate /* 907c478bd9Sstevel@tonic-gate * From psm/stand/boot/common/heap_kmem.c: 917c478bd9Sstevel@tonic-gate */ 927c478bd9Sstevel@tonic-gate extern void *bkmem_alloc(size_t); 937c478bd9Sstevel@tonic-gate extern void *bkmem_zalloc(size_t); 947c478bd9Sstevel@tonic-gate extern void bkmem_free(void *, size_t); 957c478bd9Sstevel@tonic-gate 967c478bd9Sstevel@tonic-gate /* 977c478bd9Sstevel@tonic-gate * From psm/stand/boot/$(MACH)/common/$(MACH)_standalloc.c: 987c478bd9Sstevel@tonic-gate */ 997c478bd9Sstevel@tonic-gate extern caddr_t resalloc(enum RESOURCES, size_t, caddr_t, int); 1007c478bd9Sstevel@tonic-gate extern void resfree(enum RESOURCES, caddr_t, size_t); 1017c478bd9Sstevel@tonic-gate extern void reset_alloc(void); 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gate /* 1047c478bd9Sstevel@tonic-gate * From psm/stand/lib/names/$(MACH)/common/mfgname.c: (libnames) 1057c478bd9Sstevel@tonic-gate */ 1067c478bd9Sstevel@tonic-gate extern char *get_mfg_name(void); 1077c478bd9Sstevel@tonic-gate 1087c478bd9Sstevel@tonic-gate /* 1097c478bd9Sstevel@tonic-gate * From psm/stand/boot/i386/common/boot_plat.c or 1107c478bd9Sstevel@tonic-gate * psm/stand/boot/sparcv9/sun4u/machdep.c: 1117c478bd9Sstevel@tonic-gate */ 1127c478bd9Sstevel@tonic-gate extern int pagesize; 1137c478bd9Sstevel@tonic-gate extern int global_pages; 1147c478bd9Sstevel@tonic-gate 1157c478bd9Sstevel@tonic-gate #ifdef __sparc 1167c478bd9Sstevel@tonic-gate /* 1177c478bd9Sstevel@tonic-gate * From psm/stand/boot/sparc/common/fsconf.c: 1187c478bd9Sstevel@tonic-gate */ 1197c478bd9Sstevel@tonic-gate extern char *bootp_response; 1207c478bd9Sstevel@tonic-gate 1217c478bd9Sstevel@tonic-gate /* 1227c478bd9Sstevel@tonic-gate * From psm/stand/boot/sparc/common/wanboot.c: 1237c478bd9Sstevel@tonic-gate */ 1247c478bd9Sstevel@tonic-gate extern char *bootcfg; 1257c478bd9Sstevel@tonic-gate #endif /* __sparc */ 1267c478bd9Sstevel@tonic-gate 1277c478bd9Sstevel@tonic-gate #ifdef __cplusplus 1287c478bd9Sstevel@tonic-gate } 1297c478bd9Sstevel@tonic-gate #endif 1307c478bd9Sstevel@tonic-gate 1317c478bd9Sstevel@tonic-gate #endif /* _SYS_BOOTSYMS_H */ 132