genassym.cf revision 1.5
11.5Smycroft# $NetBSD: genassym.cf,v 1.5 1997/11/13 03:25:27 mycroft 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.1Smycroftinclude <machine/trap.h> 521.1Smycroftinclude <machine/pmap.h> 531.1Smycroftinclude <machine/vmparam.h> 541.1Smycroft 551.1Smycroftinclude "apm.h" 561.1Smycroftif NAPM > 0 571.3Sjtkinclude <machine/bioscall.h> 581.1Smycroftinclude <machine/apmvar.h> 591.1Smycroftendif 601.1Smycroft 611.1Smycroftifdef COMPAT_SVR4 621.1Smycroftinclude <compat/svr4/svr4_ucontext.h> 631.1Smycroftendif 641.1Smycroft 651.1Smycroftifdef COMPAT_LINUX 661.1Smycroftinclude <machine/linux_machdep.h> 671.1Smycroftendif 681.1Smycroft 691.1Smycroftifdef COMPAT_FREEBSD 701.1Smycroftinclude <machine/freebsd_machdep.h> 711.1Smycroftendif 721.1Smycroft 731.1Smycroftinclude "isa.h" 741.1Smycroftif NISA > 0 751.1Smycroftinclude <i386/isa/isa_machdep.h> 761.1Smycroftendif 771.1Smycroft 781.1Smycroftdefine SRUN SRUN 791.1Smycroft 801.1Smycroftdefine PTDPTDI PTDPTDI 811.1Smycroftdefine KPTDI KPTDI 821.1Smycroftdefine NKPDE_BASE NKPDE_BASE 831.1Smycroftdefine NKPDE_MAX NKPDE_MAX 841.1Smycroftdefine NKPDE_SCALE NKPDE_SCALE 851.1Smycroftdefine APTDPTDI APTDPTDI 861.1Smycroft 871.1Smycroftdefine VM_MAXUSER_ADDRESS (int)VM_MAXUSER_ADDRESS 881.1Smycroft 891.1Smycroftdefine P_ADDR offsetof(struct proc, p_addr) 901.1Smycroftdefine P_BACK offsetof(struct proc, p_back) 911.1Smycroftdefine P_FORW offsetof(struct proc, p_forw) 921.1Smycroftdefine P_PRIORITY offsetof(struct proc, p_priority) 931.1Smycroftdefine P_STAT offsetof(struct proc, p_stat) 941.1Smycroftdefine P_WCHAN offsetof(struct proc, p_wchan) 951.1Smycroftdefine P_VMSPACE offsetof(struct proc, p_vmspace) 961.1Smycroftdefine P_FLAG offsetof(struct proc, p_flag) 971.1Smycroft 981.1Smycroftdefine P_SYSTEM P_SYSTEM 991.1Smycroft 1001.1Smycroftdefine M_DATA offsetof(struct mbuf, m_data) 1011.1Smycroftdefine M_LEN offsetof(struct mbuf, m_len) 1021.1Smycroftdefine M_NEXT offsetof(struct mbuf, m_next) 1031.1Smycroft 1041.1Smycroftdefine V_TRAP offsetof(struct vmmeter, v_trap) 1051.1Smycroftdefine V_INTR offsetof(struct vmmeter, v_intr) 1061.1Smycroft 1071.1Smycroftdefine PCB_CR3 offsetof(struct pcb, pcb_cr3) 1081.1Smycroftdefine PCB_EBP offsetof(struct pcb, pcb_ebp) 1091.1Smycroftdefine PCB_ESP offsetof(struct pcb, pcb_esp) 1101.1Smycroftdefine PCB_FS offsetof(struct pcb, pcb_fs) 1111.1Smycroftdefine PCB_GS offsetof(struct pcb, pcb_gs) 1121.1Smycroftdefine PCB_CR0 offsetof(struct pcb, pcb_cr0) 1131.1Smycroftdefine PCB_LDT_SEL offsetof(struct pcb, pcb_ldt_sel) 1141.1Smycroftdefine PCB_TSS_SEL offsetof(struct pcb, pcb_tss_sel) 1151.1Smycroftdefine PCB_ONFAULT offsetof(struct pcb, pcb_onfault) 1161.1Smycroft 1171.1Smycroftdefine TF_CS offsetof(struct trapframe, tf_cs) 1181.5Smycroftdefine TF_EIP offsetof(struct trapframe, tf_eip) 1191.4Smycroftdefine TF_ERR offsetof(struct trapframe, tf_err) 1201.1Smycroftdefine TF_TRAPNO offsetof(struct trapframe, tf_trapno) 1211.1Smycroftdefine TF_EFLAGS offsetof(struct trapframe, tf_eflags) 1221.1Smycroft 1231.1Smycroftdefine FRAMESIZE sizeof(struct trapframe) 1241.1Smycroft 1251.1Smycroftdefine SIGF_HANDLER offsetof(struct sigframe, sf_handler) 1261.1Smycroftdefine SIGF_SC offsetof(struct sigframe, sf_sc) 1271.1Smycroftdefine SC_FS offsetof(struct sigcontext, sc_fs) 1281.1Smycroftdefine SC_GS offsetof(struct sigcontext, sc_gs) 1291.1Smycroftdefine SC_EFLAGS offsetof(struct sigcontext, sc_eflags) 1301.1Smycroft 1311.1Smycroftifdef COMPAT_SVR4 1321.1Smycroftdefine SVR4_SIGF_HANDLER offsetof(struct svr4_sigframe, sf_handler) 1331.1Smycroftdefine SVR4_SIGF_UC offsetof(struct svr4_sigframe, sf_uc) 1341.1Smycroftdefine SVR4_UC_FS offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_FS]) 1351.1Smycroftdefine SVR4_UC_GS offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_GS]) 1361.1Smycroftdefine SVR4_UC_EFLAGS offsetof(struct svr4_ucontext, uc_mcontext.greg[SVR4_X86_EFL]) 1371.1Smycroftendif 1381.1Smycroft 1391.1Smycroftifdef COMPAT_LINUX 1401.1Smycroftdefine LINUX_SIGF_HANDLER offsetof(struct linux_sigframe, sf_handler) 1411.1Smycroftdefine LINUX_SIGF_SC offsetof(struct linux_sigframe, sf_sc) 1421.1Smycroftdefine LINUX_SC_FS offsetof(struct linux_sigcontext, sc_fs) 1431.1Smycroftdefine LINUX_SC_GS offsetof(struct linux_sigcontext, sc_gs) 1441.1Smycroftdefine LINUX_SC_EFLAGS offsetof(struct linux_sigcontext, sc_eflags) 1451.1Smycroftendif 1461.1Smycroft 1471.1Smycroftifdef COMPAT_FREEBSD 1481.1Smycroftdefine FREEBSD_SIGF_HANDLER offsetof(struct freebsd_sigframe, sf_handler) 1491.1Smycroftdefine FREEBSD_SIGF_SC offsetof(struct freebsd_sigframe, sf_sc) 1501.1Smycroftendif 1511.1Smycroft 1521.1Smycroftif NISA > 0 1531.1Smycroftdefine IH_FUN offsetof(struct intrhand, ih_fun) 1541.1Smycroftdefine IH_ARG offsetof(struct intrhand, ih_arg) 1551.1Smycroftdefine IH_COUNT offsetof(struct intrhand, ih_count) 1561.1Smycroftdefine IH_NEXT offsetof(struct intrhand, ih_next) 1571.1Smycroftendif 1581.1Smycroft 1591.1Smycroftif NAPM > 0 1601.1Smycroftdefine APM_CODE32 offsetof(struct apm_connect_info, apm_code32_seg_base) 1611.1Smycroftdefine APM_CODE16 offsetof(struct apm_connect_info, apm_code16_seg_base) 1621.1Smycroftdefine APM_DATA offsetof(struct apm_connect_info, apm_data_seg_base) 1631.1Smycroftdefine APM_CODE32_LEN offsetof(struct apm_connect_info, apm_code32_seg_len) 1641.1Smycroftdefine APM_DATA_LEN offsetof(struct apm_connect_info, apm_data_seg_len) 1651.1Smycroftdefine APM_ENTRY offsetof(struct apm_connect_info, apm_entrypt) 1661.1Smycroftdefine APM_DETAIL offsetof(struct apm_connect_info, apm_detail) 1671.1Smycroftdefine APM_SIZE sizeof(struct apm_connect_info) 1681.3Sjtkdefine BIOSCALLREG_AX offsetof(struct bioscallregs, ax) 1691.3Sjtkdefine BIOSCALLREG_BX offsetof(struct bioscallregs, bx) 1701.3Sjtkdefine BIOSCALLREG_CX offsetof(struct bioscallregs, cx) 1711.3Sjtkdefine BIOSCALLREG_DX offsetof(struct bioscallregs, dx) 1721.3Sjtkdefine BIOSCALLREG_SI offsetof(struct bioscallregs, si) 1731.3Sjtkdefine BIOSCALLREG_DI offsetof(struct bioscallregs, di) 1741.3Sjtkdefine BIOSCALLREG_FLAGS offsetof(struct bioscallregs, flags) 1751.1Smycroftendif 176