# $NetBSD: genassym.cf,v 1.24.2.8 2002/09/17 21:15:04 nathanw Exp $ # # Copyright (c) 1998 The NetBSD Foundation, Inc. # All rights reserved. # # This code is derived from software contributed to The NetBSD Foundation # by Charles M. Hannum. # # 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 NetBSD # Foundation, Inc. and its contributors. # 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. # # # 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 # if defined(_KERNEL_OPT) include "opt_compat_svr4.h" include "opt_compat_freebsd.h" include "opt_compat_linux.h" endif include include include include include include include include include include include include include include include if defined(_KERNEL) && !defined(_LKM) include "apm.h" endif if NAPM > 0 include include endif ifdef COMPAT_SVR4 include endif ifdef COMPAT_LINUX include include endif ifdef COMPAT_FREEBSD include endif if defined(_KERNEL) && !defined(_LKM) include "isa.h" endif if NISA > 0 include endif define LSRUN LSRUN define LSONPROC LSONPROC define PDSLOT_PTE PDSLOT_PTE define PDSLOT_APTE PDSLOT_APTE define PDSLOT_KERN PDSLOT_KERN define NKPTP_MIN NKPTP_MIN define NKPTP_MAX NKPTP_MAX define VM_MAXUSER_ADDRESS (int)VM_MAXUSER_ADDRESS define UVM_PAGE_IDLE_ZERO offsetof(struct uvm, page_idle_zero) define L_ADDR offsetof(struct lwp, l_addr) define L_BACK offsetof(struct lwp, l_back) define L_FORW offsetof(struct lwp, l_forw) define L_PRIORITY offsetof(struct lwp, l_priority) define L_STAT offsetof(struct lwp, l_stat) define L_WCHAN offsetof(struct lwp, l_wchan) define L_PROC offsetof(struct lwp, l_proc) define L_MD_TSS_SEL offsetof(struct lwp, l_md.md_tss_sel) define L_MD_REGS offsetof(struct lwp, l_md.md_regs) define P_FLAG offsetof(struct proc, p_flag) define P_NRAS offsetof(struct proc, p_nras) define P_MD_SYSCALL offsetof(struct proc, p_md.md_syscall) 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 IP_SRC offsetof(struct ip, ip_src) define IP_DST offsetof(struct ip, ip_dst) define IP6_SRC offsetof(struct ip6_hdr, ip6_src) define IP6_DST offsetof(struct ip6_hdr, ip6_dst) define V_TRAP offsetof(struct uvmexp, traps) define V_INTR offsetof(struct uvmexp, intrs) 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_CR0 offsetof(struct pcb, pcb_cr0) define PCB_LDT_SEL offsetof(struct pcb, pcb_ldt_sel) define PCB_ONFAULT offsetof(struct pcb, pcb_onfault) define TF_CS offsetof(struct trapframe, tf_cs) define TF_EIP offsetof(struct trapframe, tf_eip) define TF_ERR offsetof(struct trapframe, tf_err) define TF_TRAPNO offsetof(struct trapframe, tf_trapno) define TF_EFLAGS offsetof(struct trapframe, tf_eflags) define FRAMESIZE sizeof(struct trapframe) ifdef COMPAT_SVR4 define SVR4_SIGF_HANDLER offsetof(struct svr4_sigframe, sf_handler) define SVR4_SIGF_UC offsetof(struct svr4_sigframe, sf_uc) endif ifdef COMPAT_LINUX define LINUX_SIGF_HANDLER offsetof(struct linux_sigframe, sf_handler) define LINUX_SIGF_SC offsetof(struct linux_sigframe, sf_sc) 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 BIOSCALLREG_EAX offsetof(struct bioscallregs, EAX) define BIOSCALLREG_EBX offsetof(struct bioscallregs, EBX) define BIOSCALLREG_ECX offsetof(struct bioscallregs, ECX) define BIOSCALLREG_EDX offsetof(struct bioscallregs, EDX) define BIOSCALLREG_ESI offsetof(struct bioscallregs, ESI) define BIOSCALLREG_EDI offsetof(struct bioscallregs, EDI) define BIOSCALLREG_EFLAGS offsetof(struct bioscallregs, EFLAGS) endif if defined(__HAVE_GENERIC_SOFT_INTERRUPTS) define __HAVE_GENERIC_SOFT_INTERRUPTS 1 endif