1/* 2 * CDDL HEADER START 3 * 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. 7 * 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. 12 * 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] 18 * 19 * CDDL HEADER END 20 */ 21/* 22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25 26#pragma ident "%Z%%M% %I% %E% SMI" 27 28#include <sys/kobj.h> 29#include <sys/kobj_impl.h> 30#include <sys/errno.h> 31 32/* 33 * Stubs for entry points into 34 * the stand-alone linker/loader. 35 */ 36 37/*ARGSUSED*/ 38int 39kobj_load_module(struct modctl *modp, int use_path) 40{ 41 return (EINVAL); 42} 43 44/*ARGSUSED*/ 45int 46kobj_load_primary_module(struct modctl *modp) 47{ 48 return (-1); 49} 50 51/*ARGSUSED*/ 52void 53kobj_unload_module(struct modctl *modp) 54{} 55 56/*ARGSUSED*/ 57int 58kobj_path_exists(char *name, int use_path) 59{ 60 return (0); 61} 62 63/*ARGSUSED*/ 64struct _buf * 65kobj_open_path(char *name, int use_path, int use_moddir_suffix) 66{ 67 return (NULL); 68} 69 70/*ARGSUSED*/ 71struct _buf * 72kobj_open_file(char *name) 73{ 74 return (NULL); 75} 76 77/*ARGSUSED*/ 78int 79kobj_read_file(struct _buf *file, char *buf, unsigned size, unsigned off) 80{ 81 return (-1); 82} 83 84/*ARGSUSED*/ 85void 86kobj_close_file(struct _buf *file) 87{} 88 89/*ARGSUSED*/ 90intptr_t 91kobj_open(char *filename) 92{ 93 return (-1L); 94} 95 96/*ARGSUSED*/ 97int 98kobj_read(intptr_t descr, char *buf, unsigned size, unsigned offset) 99{ 100 return (-1); 101} 102 103/*ARGSUSED*/ 104void 105kobj_close(intptr_t descr) 106{} 107 108/*ARGSUSED*/ 109int 110kobj_fstat(intptr_t descr, struct bootstat *buf) 111{ 112 return (-1); 113} 114 115/*ARGSUSED*/ 116int 117kobj_get_filesize(struct _buf *file, uint64_t *size) 118{ 119 return (-1); 120} 121 122/*ARGSUSED*/ 123int 124kobj_filbuf(struct _buf *f) 125{ 126 return (-1); 127} 128 129/*ARGSUSED*/ 130int 131kobj_addrcheck(void *xmp, caddr_t adr) 132{ 133 return (1); 134} 135 136/*ARGSUSED*/ 137uintptr_t 138kobj_getelfsym(char *name, void *mp, int *size) 139{ 140 return (0); 141} 142 143/*ARGSUSED*/ 144void 145kobj_getmodinfo(void *xmp, struct modinfo *modinfo) 146{} 147 148void 149kobj_getpagesize() 150{} 151 152/*ARGSUSED*/ 153char * 154kobj_getsymname(uintptr_t value, ulong_t *offset) 155{ 156 return (NULL); 157} 158 159/*ARGSUSED*/ 160uintptr_t 161kobj_getsymvalue(char *name, int kernelonly) 162{ 163 return (0); 164} 165 166/*ARGSUSED*/ 167char * 168kobj_searchsym(struct module *mp, uintptr_t value, ulong_t *offset) 169{ 170 return (NULL); 171} 172 173/*ARGSUSED*/ 174uintptr_t 175kobj_lookup(struct module *mod, const char *name) 176{ 177 return (0); 178} 179 180/*ARGSUSED*/ 181Sym * 182kobj_lookup_all(struct module *mp, char *name, int include_self) 183{ 184 return (NULL); 185} 186 187/*ARGSUSED*/ 188void * 189kobj_alloc(size_t size, int flag) 190{ 191 return (NULL); 192} 193 194/*ARGSUSED*/ 195void * 196kobj_zalloc(size_t size, int flag) 197{ 198 return (NULL); 199} 200 201/*ARGSUSED*/ 202void 203kobj_free(void *address, size_t size) 204{} 205 206/*ARGSUSED*/ 207void 208kobj_sync(void) 209{} 210 211/*ARGSUSED*/ 212void 213kobj_stat_get(kobj_stat_t *kp) 214{} 215 216/*ARGSUSED*/ 217void 218kobj_sync_instruction_memory(caddr_t addr, size_t size) 219{ 220} 221 222/*ARGSUSED*/ 223int 224kobj_notify_add(kobj_notify_list_t *knp) 225{ 226 return (-1); 227} 228 229/*ARGSUSED*/ 230int 231kobj_notify_remove(kobj_notify_list_t *knp) 232{ 233 return (-1); 234} 235 236/*ARGSUSED*/ 237void 238kobj_export_module(struct module *mp) 239{ 240} 241 242#ifndef sparc 243void 244kobj_boot_unmountroot(void) 245{} 246#endif 247 248/* 249 * Dummy declarations for variables in 250 * the stand-alone linker/loader. 251 */ 252void *__tnf_probe_list_head; 253void *__tnf_tag_list_head; 254int tnf_changed_probe_list; 255char *boot_cpu_compatible_list; 256