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