# $NetBSD: genassym.cf,v 1.1.2.2 1997/03/12 14:34:41 is Exp $
#
# Copyright (c) 1995, 1997 Charles M. Hannum. All rights reserved.
# Copyright (c) 1982, 1990 The Regents of the University of California.
# All rights reserved.
#
# This code is derived from software contributed to Berkeley by
# William Jolitz.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by the University of
# California, Berkeley and its contributors.
# 4. Neither the name of the University nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# @(#)genassym.c 5.11 (Berkeley) 5/10/91
#
include <sys/param.h>
include <sys/proc.h>
include <sys/resourcevar.h>
include <sys/device.h>
include <sys/user.h>
include <sys/mbuf.h>
include <vm/vm.h>
include <machine/trap.h>
include <machine/pmap.h>
include <machine/vmparam.h>
include "apm.h"
if NAPM > 0
include <machine/apmvar.h>
endif
ifdef COMPAT_SVR4
include <compat/svr4/svr4_ucontext.h>
endif
ifdef COMPAT_LINUX
include <machine/linux_machdep.h>
endif
ifdef COMPAT_FREEBSD
include <machine/freebsd_machdep.h>
endif
include "isa.h"
if NISA > 0
include <i386/isa/isa_machdep.h>
endif
define SRUN SRUN
define PTDPTDI PTDPTDI
define KPTDI KPTDI
define NKPDE_BASE NKPDE_BASE
define NKPDE_MAX NKPDE_MAX
define NKPDE_SCALE NKPDE_SCALE
define APTDPTDI APTDPTDI
define VM_MAXUSER_ADDRESS (int)VM_MAXUSER_ADDRESS
define P_ADDR offsetof(struct proc, p_addr)
define P_BACK offsetof(struct proc, p_back)
define P_FORW offsetof(struct proc, p_forw)
define P_PRIORITY offsetof(struct proc, p_priority)
define P_STAT offsetof(struct proc, p_stat)
define P_WCHAN offsetof(struct proc, p_wchan)
define P_VMSPACE offsetof(struct proc, p_vmspace)
define P_FLAG offsetof(struct proc, p_flag)
define P_SYSTEM P_SYSTEM
define M_DATA offsetof(struct mbuf, m_data)
define M_LEN offsetof(struct mbuf, m_len)
define M_NEXT offsetof(struct mbuf, m_next)
define V_TRAP offsetof(struct vmmeter, v_trap)
define V_INTR offsetof(struct vmmeter, v_intr)
define PCB_CR3 offsetof(struct pcb, pcb_cr3)
define PCB_EBP offsetof(struct pcb, pcb_ebp)
define PCB_ESP offsetof(struct pcb, pcb_esp)
define PCB_FS offsetof(struct pcb, pcb_fs)
define PCB_GS offsetof(struct pcb, pcb_gs)
define PCB_CR0 offsetof(struct pcb, pcb_cr0)
define PCB_LDT_SEL offsetof(struct pcb, pcb_ldt_sel)
define PCB_TSS_SEL offsetof(struct pcb, pcb_tss_sel)
define PCB_ONFAULT offsetof(struct pcb, pcb_onfault)
define TF_CS offsetof(struct trapframe, tf_cs)
define TF_TRAPNO offsetof(struct trapframe, tf_trapno)
define TF_EFLAGS offsetof(struct trapframe, tf_eflags)
define FRAMESIZE sizeof(struct trapframe)
define SIGF_HANDLER offsetof(struct sigframe, sf_handler)
define SIGF_SC offsetof(struct sigframe, sf_sc)
define SC_FS offsetof(struct sigcontext, sc_fs)
define SC_GS offsetof(struct sigcontext, sc_gs)
define SC_EFLAGS offsetof(struct sigcontext, sc_eflags)
ifdef COMPAT_SVR4
define SVR4_SIGF_HANDLER offsetof(struct svr4_sigframe, sf_handler)
define SVR4_SIGF_UC offsetof(struct svr4_sigframe, sf_uc)
define SVR4_UC_FS offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_FS])
define SVR4_UC_GS offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_GS])
define SVR4_UC_EFLAGS offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_EFL])
endif
ifdef COMPAT_LINUX
define LINUX_SIGF_HANDLER offsetof(struct linux_sigframe, sf_handler)
define LINUX_SIGF_SC offsetof(struct linux_sigframe, sf_sc)
define LINUX_SC_FS offsetof(struct linux_sigcontext, sc_fs)
define LINUX_SC_GS offsetof(struct linux_sigcontext, sc_gs)
define LINUX_SC_EFLAGS offsetof(struct linux_sigcontext, sc_eflags)
endif
ifdef COMPAT_FREEBSD
define FREEBSD_SIGF_HANDLER offsetof(struct freebsd_sigframe, sf_handler)
define FREEBSD_SIGF_SC offsetof(struct freebsd_sigframe, sf_sc)
endif
if NISA > 0
define IH_FUN offsetof(struct intrhand, ih_fun)
define IH_ARG offsetof(struct intrhand, ih_arg)
define IH_COUNT offsetof(struct intrhand, ih_count)
define IH_NEXT offsetof(struct intrhand, ih_next)
endif
if NAPM > 0
define APM_CODE32 offsetof(struct apm_connect_info, apm_code32_seg_base)
define APM_CODE16 offsetof(struct apm_connect_info, apm_code16_seg_base)
define APM_DATA offsetof(struct apm_connect_info, apm_data_seg_base)
define APM_CODE32_LEN offsetof(struct apm_connect_info, apm_code32_seg_len)
define APM_DATA_LEN offsetof(struct apm_connect_info, apm_data_seg_len)
define APM_ENTRY offsetof(struct apm_connect_info, apm_entrypt)
define APM_DETAIL offsetof(struct apm_connect_info, apm_detail)
define APM_SIZE sizeof(struct apm_connect_info)
define APMREG_AX offsetof(struct apmregs, ax)
define APMREG_BX offsetof(struct apmregs, bx)
define APMREG_CX offsetof(struct apmregs, cx)
define APMREG_DX offsetof(struct apmregs, dx)
define APMREG_SI offsetof(struct apmregs, si)
define APMREG_DI offsetof(struct apmregs, di)
define APMREG_FLAGS offsetof(struct apmregs, flags)
endif