xref: /onnv-gate/usr/src/cmd/mdb/intel/kmdb/kaif.h (revision 3446:5903aece022d)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
52712Snn35248  * Common Development and Distribution License (the "License").
62712Snn35248  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
210Sstevel@tonic-gate /*
22*3446Smrj  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate  * Use is subject to license terms.
240Sstevel@tonic-gate  */
250Sstevel@tonic-gate 
260Sstevel@tonic-gate #ifndef _KAIF_H
270Sstevel@tonic-gate #define	_KAIF_H
280Sstevel@tonic-gate 
290Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
300Sstevel@tonic-gate 
310Sstevel@tonic-gate #ifndef _ASM
320Sstevel@tonic-gate #include <sys/kdi.h>
330Sstevel@tonic-gate #include <sys/types.h>
340Sstevel@tonic-gate #include <sys/segments.h>
35*3446Smrj #include <sys/kdi_machimpl.h>
360Sstevel@tonic-gate #endif
370Sstevel@tonic-gate 
380Sstevel@tonic-gate #ifdef __cplusplus
390Sstevel@tonic-gate extern "C" {
400Sstevel@tonic-gate #endif
410Sstevel@tonic-gate 
42*3446Smrj typedef kdi_cpusave_t kaif_cpusave_t;
430Sstevel@tonic-gate 
44*3446Smrj #define	KAIF_CPU_STATE_NONE		KDI_CPU_STATE_NONE
45*3446Smrj #define	KAIF_CPU_STATE_MASTER		KDI_CPU_STATE_MASTER
46*3446Smrj #define	KAIF_CPU_STATE_SLAVE		KDI_CPU_STATE_SLAVE
470Sstevel@tonic-gate 
480Sstevel@tonic-gate #ifndef _ASM
490Sstevel@tonic-gate 
50*3446Smrj extern kdi_cpusave_t *kaif_cpusave;
510Sstevel@tonic-gate extern int kaif_ncpusave;
520Sstevel@tonic-gate extern int kaif_master_cpuid;
530Sstevel@tonic-gate 
540Sstevel@tonic-gate extern int kaif_trap_switch;
550Sstevel@tonic-gate 
560Sstevel@tonic-gate extern void kaif_trap_set_debugger(void);
57*3446Smrj extern void kaif_trap_set_saved(kdi_cpusave_t *);
580Sstevel@tonic-gate 
590Sstevel@tonic-gate extern uintptr_t kaif_invoke(uintptr_t, uint_t, const uintptr_t[]);
600Sstevel@tonic-gate 
610Sstevel@tonic-gate #endif
620Sstevel@tonic-gate 
630Sstevel@tonic-gate #ifdef __cplusplus
640Sstevel@tonic-gate }
650Sstevel@tonic-gate #endif
660Sstevel@tonic-gate 
670Sstevel@tonic-gate #endif /* _KAIF_H */
68