genassym.cf revision 1.6
11.6Smrg# $NetBSD: genassym.cf,v 1.6 1998/02/06 07:21:53 mrg Exp $ 21.1Smycroft 31.1Smycroft# 41.1Smycroft# Copyright (c) 1995, 1997 Charles M. Hannum. All rights reserved. 51.1Smycroft# Copyright (c) 1982, 1990 The Regents of the University of California. 61.1Smycroft# All rights reserved. 71.1Smycroft# 81.1Smycroft# This code is derived from software contributed to Berkeley by 91.1Smycroft# William Jolitz. 101.1Smycroft# 111.1Smycroft# Redistribution and use in source and binary forms, with or without 121.1Smycroft# modification, are permitted provided that the following conditions 131.1Smycroft# are met: 141.1Smycroft# 1. Redistributions of source code must retain the above copyright 151.1Smycroft# notice, this list of conditions and the following disclaimer. 161.1Smycroft# 2. Redistributions in binary form must reproduce the above copyright 171.1Smycroft# notice, this list of conditions and the following disclaimer in the 181.1Smycroft# documentation and/or other materials provided with the distribution. 191.1Smycroft# 3. All advertising materials mentioning features or use of this software 201.1Smycroft# must display the following acknowledgement: 211.1Smycroft# This product includes software developed by the University of 221.1Smycroft# California, Berkeley and its contributors. 231.1Smycroft# 4. Neither the name of the University nor the names of its contributors 241.1Smycroft# may be used to endorse or promote products derived from this software 251.1Smycroft# without specific prior written permission. 261.1Smycroft# 271.1Smycroft# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 281.1Smycroft# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 291.1Smycroft# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 301.1Smycroft# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 311.1Smycroft# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 321.1Smycroft# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 331.1Smycroft# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 341.1Smycroft# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 351.1Smycroft# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 361.1Smycroft# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 371.1Smycroft# SUCH DAMAGE. 381.1Smycroft# 391.1Smycroft# @(#)genassym.c 5.11 (Berkeley) 5/10/91 401.1Smycroft# 411.1Smycroft 421.1Smycroftinclude <sys/param.h> 431.1Smycroftinclude <sys/proc.h> 441.1Smycroftinclude <sys/resourcevar.h> 451.1Smycroftinclude <sys/device.h> 461.1Smycroftinclude <sys/user.h> 471.1Smycroftinclude <sys/mbuf.h> 481.1Smycroft 491.1Smycroftinclude <vm/vm.h> 501.1Smycroft 511.6Smrgifdef UVM 521.6Smrginclude <uvm/uvm_extern.h> 531.6Smrgendif 541.6Smrg 551.1Smycroftinclude <machine/trap.h> 561.1Smycroftinclude <machine/pmap.h> 571.1Smycroftinclude <machine/vmparam.h> 581.1Smycroft 591.1Smycroftinclude "apm.h" 601.1Smycroftif NAPM > 0 611.3Sjtkinclude <machine/bioscall.h> 621.1Smycroftinclude <machine/apmvar.h> 631.1Smycroftendif 641.1Smycroft 651.1Smycroftifdef COMPAT_SVR4 661.1Smycroftinclude <compat/svr4/svr4_ucontext.h> 671.1Smycroftendif 681.1Smycroft 691.1Smycroftifdef COMPAT_LINUX 701.1Smycroftinclude <machine/linux_machdep.h> 711.1Smycroftendif 721.1Smycroft 731.1Smycroftifdef COMPAT_FREEBSD 741.1Smycroftinclude <machine/freebsd_machdep.h> 751.1Smycroftendif 761.1Smycroft 771.1Smycroftinclude "isa.h" 781.1Smycroftif NISA > 0 791.1Smycroftinclude <i386/isa/isa_machdep.h> 801.1Smycroftendif 811.1Smycroft 821.1Smycroftdefine SRUN SRUN 831.1Smycroft 841.6Smrgif PMAP_NEW 851.6Smrgdefine PDSLOT_PTE PDSLOT_PTE 861.6Smrgdefine PDSLOT_APTE PDSLOT_APTE 871.6Smrgdefine PDSLOT_KERN PDSLOT_KERN 881.6Smrgdefine NKPTP_MIN NKPTP_MIN 891.6Smrgdefine NKPTP_MAX NKPTP_MAX 901.6Smrgelse 911.1Smycroftdefine PTDPTDI PTDPTDI 921.1Smycroftdefine KPTDI KPTDI 931.1Smycroftdefine NKPDE_BASE NKPDE_BASE 941.1Smycroftdefine NKPDE_MAX NKPDE_MAX 951.1Smycroftdefine NKPDE_SCALE NKPDE_SCALE 961.1Smycroftdefine APTDPTDI APTDPTDI 971.6Smrgendif 981.1Smycroft 991.1Smycroftdefine VM_MAXUSER_ADDRESS (int)VM_MAXUSER_ADDRESS 1001.1Smycroft 1011.1Smycroftdefine P_ADDR offsetof(struct proc, p_addr) 1021.1Smycroftdefine P_BACK offsetof(struct proc, p_back) 1031.1Smycroftdefine P_FORW offsetof(struct proc, p_forw) 1041.1Smycroftdefine P_PRIORITY offsetof(struct proc, p_priority) 1051.1Smycroftdefine P_STAT offsetof(struct proc, p_stat) 1061.1Smycroftdefine P_WCHAN offsetof(struct proc, p_wchan) 1071.1Smycroftdefine P_VMSPACE offsetof(struct proc, p_vmspace) 1081.1Smycroftdefine P_FLAG offsetof(struct proc, p_flag) 1091.1Smycroft 1101.1Smycroftdefine P_SYSTEM P_SYSTEM 1111.1Smycroft 1121.1Smycroftdefine M_DATA offsetof(struct mbuf, m_data) 1131.1Smycroftdefine M_LEN offsetof(struct mbuf, m_len) 1141.1Smycroftdefine M_NEXT offsetof(struct mbuf, m_next) 1151.1Smycroft 1161.6Smrgifdef UVM 1171.6Smrgdefine V_TRAP offsetof(struct uvmexp, traps) 1181.6Smrgdefine V_INTR offsetof(struct uvmexp, intrs) 1191.6Smrgelse 1201.1Smycroftdefine V_TRAP offsetof(struct vmmeter, v_trap) 1211.1Smycroftdefine V_INTR offsetof(struct vmmeter, v_intr) 1221.6Smrgendif 1231.1Smycroft 1241.1Smycroftdefine PCB_CR3 offsetof(struct pcb, pcb_cr3) 1251.1Smycroftdefine PCB_EBP offsetof(struct pcb, pcb_ebp) 1261.1Smycroftdefine PCB_ESP offsetof(struct pcb, pcb_esp) 1271.1Smycroftdefine PCB_FS offsetof(struct pcb, pcb_fs) 1281.1Smycroftdefine PCB_GS offsetof(struct pcb, pcb_gs) 1291.1Smycroftdefine PCB_CR0 offsetof(struct pcb, pcb_cr0) 1301.1Smycroftdefine PCB_LDT_SEL offsetof(struct pcb, pcb_ldt_sel) 1311.1Smycroftdefine PCB_TSS_SEL offsetof(struct pcb, pcb_tss_sel) 1321.1Smycroftdefine PCB_ONFAULT offsetof(struct pcb, pcb_onfault) 1331.1Smycroft 1341.1Smycroftdefine TF_CS offsetof(struct trapframe, tf_cs) 1351.5Smycroftdefine TF_EIP offsetof(struct trapframe, tf_eip) 1361.4Smycroftdefine TF_ERR offsetof(struct trapframe, tf_err) 1371.1Smycroftdefine TF_TRAPNO offsetof(struct trapframe, tf_trapno) 1381.1Smycroftdefine TF_EFLAGS offsetof(struct trapframe, tf_eflags) 1391.1Smycroft 1401.1Smycroftdefine FRAMESIZE sizeof(struct trapframe) 1411.1Smycroft 1421.1Smycroftdefine SIGF_HANDLER offsetof(struct sigframe, sf_handler) 1431.1Smycroftdefine SIGF_SC offsetof(struct sigframe, sf_sc) 1441.1Smycroftdefine SC_FS offsetof(struct sigcontext, sc_fs) 1451.1Smycroftdefine SC_GS offsetof(struct sigcontext, sc_gs) 1461.1Smycroftdefine SC_EFLAGS offsetof(struct sigcontext, sc_eflags) 1471.1Smycroft 1481.1Smycroftifdef COMPAT_SVR4 1491.1Smycroftdefine SVR4_SIGF_HANDLER offsetof(struct svr4_sigframe, sf_handler) 1501.1Smycroftdefine SVR4_SIGF_UC offsetof(struct svr4_sigframe, sf_uc) 1511.1Smycroftdefine SVR4_UC_FS offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_FS]) 1521.1Smycroftdefine SVR4_UC_GS offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_GS]) 1531.1Smycroftdefine SVR4_UC_EFLAGS offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_EFL]) 1541.1Smycroftendif 1551.1Smycroft 1561.1Smycroftifdef COMPAT_LINUX 1571.1Smycroftdefine LINUX_SIGF_HANDLER offsetof(struct linux_sigframe, sf_handler) 1581.1Smycroftdefine LINUX_SIGF_SC offsetof(struct linux_sigframe, sf_sc) 1591.1Smycroftdefine LINUX_SC_FS offsetof(struct linux_sigcontext, sc_fs) 1601.1Smycroftdefine LINUX_SC_GS offsetof(struct linux_sigcontext, sc_gs) 1611.1Smycroftdefine LINUX_SC_EFLAGS offsetof(struct linux_sigcontext, sc_eflags) 1621.1Smycroftendif 1631.1Smycroft 1641.1Smycroftifdef COMPAT_FREEBSD 1651.1Smycroftdefine FREEBSD_SIGF_HANDLER offsetof(struct freebsd_sigframe, sf_handler) 1661.1Smycroftdefine FREEBSD_SIGF_SC offsetof(struct freebsd_sigframe, sf_sc) 1671.1Smycroftendif 1681.1Smycroft 1691.1Smycroftif NISA > 0 1701.1Smycroftdefine IH_FUN offsetof(struct intrhand, ih_fun) 1711.1Smycroftdefine IH_ARG offsetof(struct intrhand, ih_arg) 1721.1Smycroftdefine IH_COUNT offsetof(struct intrhand, ih_count) 1731.1Smycroftdefine IH_NEXT offsetof(struct intrhand, ih_next) 1741.1Smycroftendif 1751.1Smycroft 1761.1Smycroftif NAPM > 0 1771.1Smycroftdefine APM_CODE32 offsetof(struct apm_connect_info, apm_code32_seg_base) 1781.1Smycroftdefine APM_CODE16 offsetof(struct apm_connect_info, apm_code16_seg_base) 1791.1Smycroftdefine APM_DATA offsetof(struct apm_connect_info, apm_data_seg_base) 1801.1Smycroftdefine APM_CODE32_LEN offsetof(struct apm_connect_info, apm_code32_seg_len) 1811.1Smycroftdefine APM_DATA_LEN offsetof(struct apm_connect_info, apm_data_seg_len) 1821.1Smycroftdefine APM_ENTRY offsetof(struct apm_connect_info, apm_entrypt) 1831.1Smycroftdefine APM_DETAIL offsetof(struct apm_connect_info, apm_detail) 1841.1Smycroftdefine APM_SIZE sizeof(struct apm_connect_info) 1851.3Sjtkdefine BIOSCALLREG_AX offsetof(struct bioscallregs, ax) 1861.3Sjtkdefine BIOSCALLREG_BX offsetof(struct bioscallregs, bx) 1871.3Sjtkdefine BIOSCALLREG_CX offsetof(struct bioscallregs, cx) 1881.3Sjtkdefine BIOSCALLREG_DX offsetof(struct bioscallregs, dx) 1891.3Sjtkdefine BIOSCALLREG_SI offsetof(struct bioscallregs, si) 1901.3Sjtkdefine BIOSCALLREG_DI offsetof(struct bioscallregs, di) 1911.3Sjtkdefine BIOSCALLREG_FLAGS offsetof(struct bioscallregs, flags) 1921.1Smycroftendif 193