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
5ea8dc4b6Seschrock  * Common Development and Distribution License (the "License").
6ea8dc4b6Seschrock  * 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*b1b8ab34Slling  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
247c478bd9Sstevel@tonic-gate  */
257c478bd9Sstevel@tonic-gate 
267c478bd9Sstevel@tonic-gate #include <sys/kobj.h>
277c478bd9Sstevel@tonic-gate #include <sys/kobj_impl.h>
287c478bd9Sstevel@tonic-gate #include <sys/errno.h>
297c478bd9Sstevel@tonic-gate 
307c478bd9Sstevel@tonic-gate /*
317c478bd9Sstevel@tonic-gate  * Stubs for entry points into
327c478bd9Sstevel@tonic-gate  * the stand-alone linker/loader.
337c478bd9Sstevel@tonic-gate  */
347c478bd9Sstevel@tonic-gate 
357c478bd9Sstevel@tonic-gate /*ARGSUSED*/
367c478bd9Sstevel@tonic-gate int
kobj_load_module(struct modctl * modp,int use_path)377c478bd9Sstevel@tonic-gate kobj_load_module(struct modctl *modp, int use_path)
387c478bd9Sstevel@tonic-gate {
397c478bd9Sstevel@tonic-gate 	return (EINVAL);
407c478bd9Sstevel@tonic-gate }
417c478bd9Sstevel@tonic-gate 
427c478bd9Sstevel@tonic-gate /*ARGSUSED*/
437c478bd9Sstevel@tonic-gate int
kobj_load_primary_module(struct modctl * modp)447c478bd9Sstevel@tonic-gate kobj_load_primary_module(struct modctl *modp)
457c478bd9Sstevel@tonic-gate {
467c478bd9Sstevel@tonic-gate 	return (-1);
477c478bd9Sstevel@tonic-gate }
487c478bd9Sstevel@tonic-gate 
497c478bd9Sstevel@tonic-gate /*ARGSUSED*/
507c478bd9Sstevel@tonic-gate void
kobj_unload_module(struct modctl * modp)517c478bd9Sstevel@tonic-gate kobj_unload_module(struct modctl *modp)
527c478bd9Sstevel@tonic-gate {}
537c478bd9Sstevel@tonic-gate 
545c311300Scth /*ARGSUSED*/
555c311300Scth int
kobj_path_exists(char * name,int use_path)565c311300Scth kobj_path_exists(char *name, int use_path)
575c311300Scth {
585c311300Scth 	return (0);
595c311300Scth }
605c311300Scth 
617c478bd9Sstevel@tonic-gate /*ARGSUSED*/
627c478bd9Sstevel@tonic-gate struct _buf *
kobj_open_path(char * name,int use_path,int use_moddir_suffix)637c478bd9Sstevel@tonic-gate kobj_open_path(char *name, int use_path, int use_moddir_suffix)
647c478bd9Sstevel@tonic-gate {
657c478bd9Sstevel@tonic-gate 	return (NULL);
667c478bd9Sstevel@tonic-gate }
677c478bd9Sstevel@tonic-gate 
687c478bd9Sstevel@tonic-gate /*ARGSUSED*/
697c478bd9Sstevel@tonic-gate struct _buf *
kobj_open_file(char * name)707c478bd9Sstevel@tonic-gate kobj_open_file(char *name)
717c478bd9Sstevel@tonic-gate {
727c478bd9Sstevel@tonic-gate 	return (NULL);
737c478bd9Sstevel@tonic-gate }
747c478bd9Sstevel@tonic-gate 
757c478bd9Sstevel@tonic-gate /*ARGSUSED*/
767c478bd9Sstevel@tonic-gate int
kobj_read_file(struct _buf * file,char * buf,unsigned size,unsigned off)777c478bd9Sstevel@tonic-gate kobj_read_file(struct _buf *file, char *buf, unsigned size, unsigned off)
787c478bd9Sstevel@tonic-gate {
797c478bd9Sstevel@tonic-gate 	return (-1);
807c478bd9Sstevel@tonic-gate }
817c478bd9Sstevel@tonic-gate 
827c478bd9Sstevel@tonic-gate /*ARGSUSED*/
837c478bd9Sstevel@tonic-gate void
kobj_close_file(struct _buf * file)847c478bd9Sstevel@tonic-gate kobj_close_file(struct _buf *file)
857c478bd9Sstevel@tonic-gate {}
867c478bd9Sstevel@tonic-gate 
877c478bd9Sstevel@tonic-gate /*ARGSUSED*/
887c478bd9Sstevel@tonic-gate intptr_t
kobj_open(char * filename)897c478bd9Sstevel@tonic-gate kobj_open(char *filename)
907c478bd9Sstevel@tonic-gate {
917c478bd9Sstevel@tonic-gate 	return (-1L);
927c478bd9Sstevel@tonic-gate }
937c478bd9Sstevel@tonic-gate 
947c478bd9Sstevel@tonic-gate /*ARGSUSED*/
957c478bd9Sstevel@tonic-gate int
kobj_read(intptr_t descr,char * buf,unsigned size,unsigned offset)967c478bd9Sstevel@tonic-gate kobj_read(intptr_t descr, char *buf, unsigned size, unsigned offset)
977c478bd9Sstevel@tonic-gate {
987c478bd9Sstevel@tonic-gate 	return (-1);
997c478bd9Sstevel@tonic-gate }
1007c478bd9Sstevel@tonic-gate 
1017c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1027c478bd9Sstevel@tonic-gate void
kobj_close(intptr_t descr)1037c478bd9Sstevel@tonic-gate kobj_close(intptr_t descr)
1047c478bd9Sstevel@tonic-gate {}
1057c478bd9Sstevel@tonic-gate 
106ea8dc4b6Seschrock /*ARGSUSED*/
107ea8dc4b6Seschrock int
kobj_fstat(intptr_t descr,struct bootstat * buf)108ea8dc4b6Seschrock kobj_fstat(intptr_t descr, struct bootstat *buf)
109ea8dc4b6Seschrock {
110ea8dc4b6Seschrock 	return (-1);
111ea8dc4b6Seschrock }
112ea8dc4b6Seschrock 
113*b1b8ab34Slling /*ARGSUSED*/
114*b1b8ab34Slling int
kobj_get_filesize(struct _buf * file,uint64_t * size)115*b1b8ab34Slling kobj_get_filesize(struct _buf *file, uint64_t *size)
116*b1b8ab34Slling {
117*b1b8ab34Slling 	return (-1);
118*b1b8ab34Slling }
119*b1b8ab34Slling 
1207c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1217c478bd9Sstevel@tonic-gate int
kobj_filbuf(struct _buf * f)1227c478bd9Sstevel@tonic-gate kobj_filbuf(struct _buf *f)
1237c478bd9Sstevel@tonic-gate {
1247c478bd9Sstevel@tonic-gate 	return (-1);
1257c478bd9Sstevel@tonic-gate }
1267c478bd9Sstevel@tonic-gate 
1277c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1287c478bd9Sstevel@tonic-gate int
kobj_addrcheck(void * xmp,caddr_t adr)1297c478bd9Sstevel@tonic-gate kobj_addrcheck(void *xmp, caddr_t adr)
1307c478bd9Sstevel@tonic-gate {
1317c478bd9Sstevel@tonic-gate 	return (1);
1327c478bd9Sstevel@tonic-gate }
1337c478bd9Sstevel@tonic-gate 
1347c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1357c478bd9Sstevel@tonic-gate uintptr_t
kobj_getelfsym(char * name,void * mp,int * size)1367c478bd9Sstevel@tonic-gate kobj_getelfsym(char *name, void *mp, int *size)
1377c478bd9Sstevel@tonic-gate {
1387c478bd9Sstevel@tonic-gate 	return (0);
1397c478bd9Sstevel@tonic-gate }
1407c478bd9Sstevel@tonic-gate 
1417c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1427c478bd9Sstevel@tonic-gate void
kobj_getmodinfo(void * xmp,struct modinfo * modinfo)1437c478bd9Sstevel@tonic-gate kobj_getmodinfo(void *xmp, struct modinfo *modinfo)
1447c478bd9Sstevel@tonic-gate {}
1457c478bd9Sstevel@tonic-gate 
1467c478bd9Sstevel@tonic-gate void
kobj_getpagesize()1477c478bd9Sstevel@tonic-gate kobj_getpagesize()
1487c478bd9Sstevel@tonic-gate {}
1497c478bd9Sstevel@tonic-gate 
1507c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1517c478bd9Sstevel@tonic-gate char *
kobj_getsymname(uintptr_t value,ulong_t * offset)1527c478bd9Sstevel@tonic-gate kobj_getsymname(uintptr_t value, ulong_t *offset)
1537c478bd9Sstevel@tonic-gate {
1547c478bd9Sstevel@tonic-gate 	return (NULL);
1557c478bd9Sstevel@tonic-gate }
1567c478bd9Sstevel@tonic-gate 
1577c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1587c478bd9Sstevel@tonic-gate uintptr_t
kobj_getsymvalue(char * name,int kernelonly)1597c478bd9Sstevel@tonic-gate kobj_getsymvalue(char *name, int kernelonly)
1607c478bd9Sstevel@tonic-gate {
1617c478bd9Sstevel@tonic-gate 	return (0);
1627c478bd9Sstevel@tonic-gate }
1637c478bd9Sstevel@tonic-gate 
1647c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1657c478bd9Sstevel@tonic-gate char *
kobj_searchsym(struct module * mp,uintptr_t value,ulong_t * offset)1667c478bd9Sstevel@tonic-gate kobj_searchsym(struct module *mp, uintptr_t value, ulong_t *offset)
1677c478bd9Sstevel@tonic-gate {
1687c478bd9Sstevel@tonic-gate 	return (NULL);
1697c478bd9Sstevel@tonic-gate }
1707c478bd9Sstevel@tonic-gate 
1717c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1727c478bd9Sstevel@tonic-gate uintptr_t
kobj_lookup(struct module * mod,const char * name)1737aec1d6eScindi kobj_lookup(struct module *mod, const char *name)
1747c478bd9Sstevel@tonic-gate {
1757c478bd9Sstevel@tonic-gate 	return (0);
1767c478bd9Sstevel@tonic-gate }
1777c478bd9Sstevel@tonic-gate 
1787c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1797c478bd9Sstevel@tonic-gate Sym *
kobj_lookup_all(struct module * mp,char * name,int include_self)1807c478bd9Sstevel@tonic-gate kobj_lookup_all(struct module *mp, char *name, int include_self)
1817c478bd9Sstevel@tonic-gate {
1827c478bd9Sstevel@tonic-gate 	return (NULL);
1837c478bd9Sstevel@tonic-gate }
1847c478bd9Sstevel@tonic-gate 
1857c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1867c478bd9Sstevel@tonic-gate void *
kobj_alloc(size_t size,int flag)1877c478bd9Sstevel@tonic-gate kobj_alloc(size_t size, int flag)
1887c478bd9Sstevel@tonic-gate {
1897c478bd9Sstevel@tonic-gate 	return (NULL);
1907c478bd9Sstevel@tonic-gate }
1917c478bd9Sstevel@tonic-gate 
1927c478bd9Sstevel@tonic-gate /*ARGSUSED*/
1937c478bd9Sstevel@tonic-gate void *
kobj_zalloc(size_t size,int flag)1947c478bd9Sstevel@tonic-gate kobj_zalloc(size_t size, int flag)
1957c478bd9Sstevel@tonic-gate {
1967c478bd9Sstevel@tonic-gate 	return (NULL);
1977c478bd9Sstevel@tonic-gate }
1987c478bd9Sstevel@tonic-gate 
1997c478bd9Sstevel@tonic-gate /*ARGSUSED*/
2007c478bd9Sstevel@tonic-gate void
kobj_free(void * address,size_t size)2017c478bd9Sstevel@tonic-gate kobj_free(void *address, size_t size)
2027c478bd9Sstevel@tonic-gate {}
2037c478bd9Sstevel@tonic-gate 
2047c478bd9Sstevel@tonic-gate /*ARGSUSED*/
2057c478bd9Sstevel@tonic-gate void
kobj_sync(void)2067c478bd9Sstevel@tonic-gate kobj_sync(void)
2077c478bd9Sstevel@tonic-gate {}
2087c478bd9Sstevel@tonic-gate 
2097c478bd9Sstevel@tonic-gate /*ARGSUSED*/
2107c478bd9Sstevel@tonic-gate void
kobj_stat_get(kobj_stat_t * kp)2117c478bd9Sstevel@tonic-gate kobj_stat_get(kobj_stat_t *kp)
2127c478bd9Sstevel@tonic-gate {}
2137c478bd9Sstevel@tonic-gate 
2147c478bd9Sstevel@tonic-gate /*ARGSUSED*/
2157c478bd9Sstevel@tonic-gate void
kobj_sync_instruction_memory(caddr_t addr,size_t size)2167c478bd9Sstevel@tonic-gate kobj_sync_instruction_memory(caddr_t addr, size_t size)
2177c478bd9Sstevel@tonic-gate {
2187c478bd9Sstevel@tonic-gate }
2197c478bd9Sstevel@tonic-gate 
2207c478bd9Sstevel@tonic-gate /*ARGSUSED*/
2217c478bd9Sstevel@tonic-gate int
kobj_notify_add(kobj_notify_list_t * knp)2227c478bd9Sstevel@tonic-gate kobj_notify_add(kobj_notify_list_t *knp)
2237c478bd9Sstevel@tonic-gate {
2247c478bd9Sstevel@tonic-gate 	return (-1);
2257c478bd9Sstevel@tonic-gate }
2267c478bd9Sstevel@tonic-gate 
2277c478bd9Sstevel@tonic-gate /*ARGSUSED*/
2287c478bd9Sstevel@tonic-gate int
kobj_notify_remove(kobj_notify_list_t * knp)2297c478bd9Sstevel@tonic-gate kobj_notify_remove(kobj_notify_list_t *knp)
2307c478bd9Sstevel@tonic-gate {
2317c478bd9Sstevel@tonic-gate 	return (-1);
2327c478bd9Sstevel@tonic-gate }
2337c478bd9Sstevel@tonic-gate 
2347c478bd9Sstevel@tonic-gate /*ARGSUSED*/
2357c478bd9Sstevel@tonic-gate void
kobj_export_module(struct module * mp)2367c478bd9Sstevel@tonic-gate kobj_export_module(struct module *mp)
2377c478bd9Sstevel@tonic-gate {
2387c478bd9Sstevel@tonic-gate }
2397c478bd9Sstevel@tonic-gate 
2407c478bd9Sstevel@tonic-gate #ifndef sparc
2417c478bd9Sstevel@tonic-gate void
kobj_boot_unmountroot(void)2427c478bd9Sstevel@tonic-gate kobj_boot_unmountroot(void)
2437c478bd9Sstevel@tonic-gate {}
2447c478bd9Sstevel@tonic-gate #endif
2457c478bd9Sstevel@tonic-gate 
2467c478bd9Sstevel@tonic-gate /*
2477c478bd9Sstevel@tonic-gate  * Dummy declarations for variables in
2487c478bd9Sstevel@tonic-gate  * the stand-alone linker/loader.
2497c478bd9Sstevel@tonic-gate  */
2507c478bd9Sstevel@tonic-gate char *boot_cpu_compatible_list;
251