xref: /titanic_50/usr/src/stand/sys/salib.h (revision 4a634bb80136cc001d14ab96addd9915105e5223)
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_SALIB_H
277c478bd9Sstevel@tonic-gate #define	_SYS_SALIB_H
287c478bd9Sstevel@tonic-gate 
297c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
307c478bd9Sstevel@tonic-gate 
317c478bd9Sstevel@tonic-gate #include <sys/types.h>
327c478bd9Sstevel@tonic-gate #include <sys/memlist.h>
337c478bd9Sstevel@tonic-gate 
347c478bd9Sstevel@tonic-gate /*
357c478bd9Sstevel@tonic-gate  * This header file contains most of the libc-like interfaces exported by
367c478bd9Sstevel@tonic-gate  * standalone's "libsa" library, and a few other odds and ends (witness the
377c478bd9Sstevel@tonic-gate  * externs below).  This file should *only* be included from code that is
387c478bd9Sstevel@tonic-gate  * built *exclusively* for use in the standalone environment.  Even then, it's
397c478bd9Sstevel@tonic-gate  * perfectly acceptable to instead just use the traditional libc names for
407c478bd9Sstevel@tonic-gate  * #include files (as we do below), since all standalone code is built against
417c478bd9Sstevel@tonic-gate  * an alternate set of C headers (located under $SRC/stand/lib/sa).
427c478bd9Sstevel@tonic-gate  */
437c478bd9Sstevel@tonic-gate 
447c478bd9Sstevel@tonic-gate #include <assert.h>
457c478bd9Sstevel@tonic-gate #include <ctype.h>
467c478bd9Sstevel@tonic-gate #include <errno.h>
477c478bd9Sstevel@tonic-gate #include <libintl.h>
487c478bd9Sstevel@tonic-gate #include <netdb.h>
497c478bd9Sstevel@tonic-gate #include <stdio.h>
507c478bd9Sstevel@tonic-gate #include <stdlib.h>
517c478bd9Sstevel@tonic-gate #include <strings.h>
527c478bd9Sstevel@tonic-gate #include <time.h>
537c478bd9Sstevel@tonic-gate #include <unistd.h>
547c478bd9Sstevel@tonic-gate 
557c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
567c478bd9Sstevel@tonic-gate extern "C" {
577c478bd9Sstevel@tonic-gate #endif
587c478bd9Sstevel@tonic-gate 
597c478bd9Sstevel@tonic-gate extern void init_boot_time(void);
607c478bd9Sstevel@tonic-gate extern void *bkmem_alloc(size_t);
617c478bd9Sstevel@tonic-gate extern void *bkmem_zalloc(size_t);
627c478bd9Sstevel@tonic-gate extern void bkmem_free(void *, size_t);
637c478bd9Sstevel@tonic-gate 
647c478bd9Sstevel@tonic-gate /* memlist.c */
657c478bd9Sstevel@tonic-gate extern caddr_t tablep;
667c478bd9Sstevel@tonic-gate extern void print_memlist(struct memlist *);
677c478bd9Sstevel@tonic-gate extern void *getlink(uint_t);
687c478bd9Sstevel@tonic-gate extern struct memlist *get_memlist_struct(void);
697c478bd9Sstevel@tonic-gate extern void add_to_freelist(struct memlist *);
707c478bd9Sstevel@tonic-gate 
717c478bd9Sstevel@tonic-gate /* standalloc.c */
727c478bd9Sstevel@tonic-gate extern caddr_t kern_resalloc(caddr_t, size_t, int);
737c478bd9Sstevel@tonic-gate extern void kern_resfree(caddr_t, size_t);
747c478bd9Sstevel@tonic-gate extern int get_progmemory(caddr_t, size_t, int);
757c478bd9Sstevel@tonic-gate 
767c478bd9Sstevel@tonic-gate #ifdef __sparc
777c478bd9Sstevel@tonic-gate /* prom_misc.c */
787c478bd9Sstevel@tonic-gate enum encode_how	{ ENCODE_BYTES, ENCODE_STRING };
797c478bd9Sstevel@tonic-gate extern void	prom_create_encoded_prop(char *, void *, int, enum encode_how);
807c478bd9Sstevel@tonic-gate #endif
817c478bd9Sstevel@tonic-gate 
827c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
837c478bd9Sstevel@tonic-gate }
847c478bd9Sstevel@tonic-gate #endif
857c478bd9Sstevel@tonic-gate 
867c478bd9Sstevel@tonic-gate #endif	/* _SYS_SALIB_H */
87