4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #pragma ident "%Z%%M% %I% %E% SMI"
29 #include <sys/kobj_impl.h>
30 #include <sys/errno.h>
33 * Stubs for entry points into
34 * the stand-alone linker/loader.
39 kobj_load_module(struct modctl
*modp
, int use_path
)
46 kobj_load_primary_module(struct modctl
*modp
)
53 kobj_unload_module(struct modctl
*modp
)
58 kobj_path_exists(char *name
, int use_path
)
65 kobj_open_path(char *name
, int use_path
, int use_moddir_suffix
)
72 kobj_open_file(char *name
)
79 kobj_read_file(struct _buf
*file
, char *buf
, unsigned size
, unsigned off
)
86 kobj_close_file(struct _buf
*file
)
91 kobj_open(char *filename
)
98 kobj_read(intptr_t descr
, char *buf
, unsigned size
, unsigned offset
)
105 kobj_close(intptr_t descr
)
110 kobj_fstat(intptr_t descr
, struct bootstat
*buf
)
117 kobj_get_filesize(struct _buf
*file
, uint64_t *size
)
124 kobj_filbuf(struct _buf
*f
)
131 kobj_addrcheck(void *xmp
, caddr_t adr
)
138 kobj_getelfsym(char *name
, void *mp
, int *size
)
145 kobj_getmodinfo(void *xmp
, struct modinfo
*modinfo
)
154 kobj_getsymname(uintptr_t value
, ulong_t
*offset
)
161 kobj_getsymvalue(char *name
, int kernelonly
)
168 kobj_searchsym(struct module
*mp
, uintptr_t value
, ulong_t
*offset
)
175 kobj_lookup(struct module
*mod
, const char *name
)
182 kobj_lookup_all(struct module
*mp
, char *name
, int include_self
)
189 kobj_alloc(size_t size
, int flag
)
196 kobj_zalloc(size_t size
, int flag
)
203 kobj_free(void *address
, size_t size
)
213 kobj_stat_get(kobj_stat_t
*kp
)
218 kobj_sync_instruction_memory(caddr_t addr
, size_t size
)
224 kobj_notify_add(kobj_notify_list_t
*knp
)
231 kobj_notify_remove(kobj_notify_list_t
*knp
)
238 kobj_export_module(struct module
*mp
)
244 kobj_boot_unmountroot(void)
249 * Dummy declarations for variables in
250 * the stand-alone linker/loader.
252 void *__tnf_probe_list_head
;
253 void *__tnf_tag_list_head
;
254 int tnf_changed_probe_list
;
255 char *boot_cpu_compatible_list
;