\
\ Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
\ Use is subject to license terms.
\
\ CDDL HEADER START
\
\ The contents of this file are subject to the terms of the
\ Common Development and Distribution License (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
\ or http://www.opensolaris.org/os/licensing.
\ 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
\

#pragma ident	"%Z%%M%	%I%	%E% SMI"

\
\ offsets.in: input file to produce assym.h using the ctfstabs program
\

#ifndef	_GENASSYM
#define	_GENASSYM
#endif

#define	SIZES	1


\
\ XXPV	This seems to be needed to avoid a namespace collisions with
\	some other header file in the list below.
\

#if defined(__xpv)
#include <sys/hypervisor.h>
#endif

#include <sys/types.h>
#include <sys/bootsvcs.h>
#include <sys/systm.h>
#include <sys/sysinfo.h>
#include <sys/user.h>
#include <sys/thread.h>
#include <sys/proc.h>
#include <sys/cpuvar.h>
#include <sys/tss.h>
#include <sys/privregs.h>
#include <sys/segments.h>
#include <sys/devops.h>
#include <sys/ddi_impldefs.h>
#include <vm/as.h>
#include <sys/avintr.h>
#include <sys/pic.h>
#include <sys/rm_platter.h>
#include <sys/stream.h>
#include <sys/strsubr.h>
#include <sys/sunddi.h>
#include <sys/traptrace.h>
#include <sys/ontrap.h>
#include <sys/lgrp.h>
#include <sys/dtrace.h>

regs	REGSIZE
	r_savfp	REGOFF_SAVFP
	r_savpc	REGOFF_SAVPC
	r_rdi	REGOFF_RDI
	r_rsi	REGOFF_RSI
	r_rdx	REGOFF_RDX
	r_rcx	REGOFF_RCX
	r_r8	REGOFF_R8
	r_r9	REGOFF_R9
	r_rax	REGOFF_RAX
	r_rbx	REGOFF_RBX
	r_rbp	REGOFF_RBP
	r_r10	REGOFF_R10
	r_r11	REGOFF_R11
	r_r12	REGOFF_R12
	r_r13	REGOFF_R13
	r_r14	REGOFF_R14
	r_r15	REGOFF_R15
\#if DEBUG
	__r_fsbase	REGOFF_FSBASE
	__r_gsbase	REGOFF_GSBASE
\#endif
	r_ds	REGOFF_DS
	r_es	REGOFF_ES
	r_fs	REGOFF_FS
	r_gs	REGOFF_GS
	r_trapno	REGOFF_TRAPNO
	r_err	REGOFF_ERR
	r_rip	REGOFF_RIP
	r_cs	REGOFF_CS
	r_rfl	REGOFF_RFL
	r_rsp	REGOFF_RSP
	r_ss	REGOFF_SS

\#define	REGOFF_PC	REGOFF_RIP

boot_syscalls
	bsvc_putchar	BOOTSVCS_PUTCHAR

tss
	tss_rsp0
	tss_rsp1
	tss_rsp2
	tss_ist1
	tss_ist2
	tss_ist3
	tss_ist4
	tss_ist5
	tss_ist6
	tss_ist7

\#define	LABEL_RBP	_CONST(_MUL(2, LABEL_VAL_INCR) + LABEL_VAL)
\#define	LABEL_RBX	_CONST(_MUL(3, LABEL_VAL_INCR) + LABEL_VAL)
\#define	LABEL_R12	_CONST(_MUL(4, LABEL_VAL_INCR) + LABEL_VAL)
\#define	LABEL_R13	_CONST(_MUL(5, LABEL_VAL_INCR) + LABEL_VAL)
\#define	LABEL_R14	_CONST(_MUL(6, LABEL_VAL_INCR) + LABEL_VAL)
\#define	LABEL_R15	_CONST(_MUL(7, LABEL_VAL_INCR) + LABEL_VAL)
\#define	T_RBP		_CONST(T_LABEL + LABEL_RBP)
\#define	T_RBX		_CONST(T_LABEL + LABEL_RBX)
\#define	T_R12		_CONST(T_LABEL + LABEL_R12)
\#define	T_R13		_CONST(T_LABEL + LABEL_R13)
\#define	T_R14		_CONST(T_LABEL + LABEL_R14)
\#define	T_R15		_CONST(T_LABEL + LABEL_R15)

_klwp
	lwp_pcb.pcb_fpu		LWP_PCB_FPU
	lwp_pcb.pcb_fsbase	LWP_PCB_FSBASE
	lwp_pcb.pcb_gsbase	LWP_PCB_GSBASE
	lwp_pcb.pcb_ds		LWP_PCB_DS
	lwp_pcb.pcb_es		LWP_PCB_ES
	lwp_pcb.pcb_fs		LWP_PCB_FS
	lwp_pcb.pcb_gs		LWP_PCB_GS
	lwp_pcb.pcb_drstat	LWP_PCB_DRSTAT
	lwp_pcb.pcb_flags	PCB_FLAGS
	lwp_pcb.pcb_fpu.fpu_regs LWP_FPU_REGS
	lwp_pcb.pcb_fpu.fpu_flags LWP_FPU_FLAGS
	lwp_pcb.pcb_rupdate	PCB_RUPDATE

pcb	PCBSIZE
	pcb_drstat
	pcb_fsbase
	pcb_gsbase
	pcb_ds
	pcb_es
	pcb_fs
	pcb_gs
	pcb_fpu.fpu_regs	PCB_FPU_REGS
	pcb_fpu.fpu_flags	PCB_FPU_FLAGS

cpu
	cpu_m.mcpu_rtmp_rsp	CPU_RTMP_RSP
	cpu_m.mcpu_rtmp_r15	CPU_RTMP_R15

rm_platter
	rm_temp_gdt_lim		TEMPGDTOFF
	rm_temp_idt_lim		TEMPIDTOFF
	rm_longmode64_addr	LM64OFF

#if defined(__xpv)

vcpu_info
	evtchn_upcall_pending	VCPU_INFO_EVTCHN_UPCALL_PENDING
	evtchn_upcall_mask	VCPU_INFO_EVTCHN_UPCALL_MASK
	arch.cr2		VCPU_INFO_ARCH_CR2

#endif	/* __xpv */