kobj_impl.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
*/
#ifndef _SYS_KOBJ_IMPL_H
#define _SYS_KOBJ_IMPL_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
*/
#define BA_DYNAMIC 0
#define BA_PHDR 1
#define BA_PHNUM 2
#define BA_PHENT 3
#define BA_ENTRY 4
#define BA_PAGESZ 5
#define BA_LPAGESZ 6
#define BA_LDELF 7
#define BA_LDSHDR 8
#define BA_LDNAME 9
#define BA_BSS 10
#define BA_IFLUSH 11
#define BA_CPU 12
#define BA_MMU 13
#define BA_GOTADDR 14
#define BA_NEXTGOT 15
#define BA_NUM 16
typedef union {
unsigned long ba_val;
void *ba_ptr;
} val_t;
/*
* Segment info.
*/
struct proginfo {
};
/*
* Implementation-specific flags.
*/
/*
* kobj_notify_add() data notification structure
*/
typedef struct kobj_notify_list {
struct kobj_notify_list *kn_prev;
struct kobj_notify_list *kn_next;
/*
* krtld can provide notification to external clients on the
* following events.
*/
#define KOBJ_NOTIFY_MAX 4
#ifdef DEBUG
#define KOBJ_DEBUG
#endif
#ifdef KOBJ_DEBUG
/*
* Debugging flags.
*/
extern int kobj_debug; /* different than moddebug */
#endif
/*
* Flags for kobj memory allocation.
*/
struct bootops;
extern struct modctl_list *kobj_linkmaps[];
extern char *kobj_kmdb_argv[];
extern int kobj_mmu_pagesize;
extern int kobj_notify_add(kobj_notify_list_t *);
extern int kobj_notify_remove(kobj_notify_list_t *);
extern int do_relocations(struct module *);
extern void (*_kobj_printf)(void *, const char *fmt, ...);
extern void mach_alloc_funcdesc(struct module *);
extern uint_t kobj_hash_name(const char *);
extern Sym *kobj_lookup_kernel(const char *);
extern struct modctl *kobj_boot_mod_lookup(const char *);
extern void kobj_export_module(struct module *);
extern int kobj_load_primary_module(struct modctl *);
#ifdef __sparc
extern void *kobj_bs_alloc(size_t);
extern void *kobj_tmp_alloc(size_t);
extern void kobj_tmp_free(void);
#else
extern void kobj_boot_unmountroot(void);
#endif
#define KOBJ_LM_PRIMARY 0x0
#define KOBJ_LM_DEBUGGER 0x1
extern struct modctl_list *kobj_lm_lookup(int);
extern void kobj_lm_dump(int);
#ifdef __cplusplus
}
#endif
#endif /* _SYS_KOBJ_IMPL_H */