genassym.cf revision 1.39
11.39Smatt# $NetBSD: genassym.cf,v 1.39 2008/04/27 18:58:44 matt Exp $ 21.1Schris 31.1Schris# Copyright (c) 1982, 1990 The Regents of the University of California. 41.1Schris# All rights reserved. 51.1Schris# 61.1Schris# This code is derived from software contributed to Berkeley by 71.1Schris# William Jolitz. 81.1Schris# 91.1Schris# Redistribution and use in source and binary forms, with or without 101.1Schris# modification, are permitted provided that the following conditions 111.1Schris# are met: 121.1Schris# 1. Redistributions of source code must retain the above copyright 131.1Schris# notice, this list of conditions and the following disclaimer. 141.1Schris# 2. Redistributions in binary form must reproduce the above copyright 151.1Schris# notice, this list of conditions and the following disclaimer in the 161.1Schris# documentation and/or other materials provided with the distribution. 171.1Schris# 3. All advertising materials mentioning features or use of this software 181.1Schris# must display the following acknowledgement: 191.1Schris# This product includes software developed by the University of 201.1Schris# California, Berkeley and its contributors. 211.1Schris# 4. Neither the name of the University nor the names of its contributors 221.1Schris# may be used to endorse or promote products derived from this software 231.1Schris# without specific prior written permission. 241.1Schris# 251.1Schris# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 261.1Schris# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 271.1Schris# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 281.1Schris# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 291.1Schris# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 301.1Schris# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 311.1Schris# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 321.1Schris# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 331.1Schris# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 341.1Schris# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 351.1Schris# SUCH DAMAGE. 361.1Schris 371.1Schrisinclude <sys/param.h> 381.1Schrisinclude <sys/systm.h> 391.25Sscwinclude <sys/mbuf.h> 401.1Schrisinclude <sys/proc.h> 411.1Schrisinclude <sys/resourcevar.h> 421.1Schrisinclude <sys/device.h> 431.1Schrisinclude <sys/user.h> 441.1Schrisinclude <sys/signal.h> 451.25Sscwinclude <netinet/in.h> 461.25Sscwinclude <netinet/in_systm.h> 471.25Sscwinclude <netinet/ip.h> 481.25Sscwinclude <netinet/ip6.h> 491.25Sscwinclude <netinet/ip_var.h> 501.1Schris 511.1Schrisinclude <uvm/uvm_extern.h> 521.8Sthorpej 531.8Sthorpejinclude <arm/fiq.h> 541.1Schris 551.1Schrisinclude <machine/pmap.h> 561.1Schrisinclude <machine/frame.h> 571.1Schrisinclude <machine/vmparam.h> 581.6Sthorpej 591.16Sbjh21include "opt_multiprocessor.h" 601.26Sscwinclude "opt_compat_netbsd.h" 611.26Sscwinclude "opt_execfmt.h" 621.16Sbjh21 631.6Sthorpejdefine __PROG32 1 641.10Sthorpejifdef __ARM_FIQ_INDIRECT 651.10Sthorpejdefine __ARM_FIQ_INDIRECT 1 661.10Sthorpejendif 671.1Schris 681.37Smattifdef __HAVE_FAST_SOFTINTS 691.37Smattdefine __HAVE_FAST_SOFTINTS 1 701.37Smattendif 711.37Smatt 721.31Smattdefine KERNEL_BASE KERNEL_BASE 731.1Schrisdefine VM_MIN_ADDRESS VM_MIN_ADDRESS 741.1Schrisdefine VM_MAXUSER_ADDRESS VM_MAXUSER_ADDRESS 751.22Sscw 761.22Sscwdefine PMAP_DOMAIN_KERNEL PMAP_DOMAIN_KERNEL 771.23Sthorpej 781.23Sthorpejifdef PMAP_INCLUDE_PTE_SYNC 791.23Sthorpejdefine PMAP_INCLUDE_PTE_SYNC 1 801.22Sscwendif 811.1Schris 821.21Sthorpejdefine PAGE_SIZE PAGE_SIZE 831.1Schrisdefine UPAGES UPAGES 841.1Schrisdefine PGSHIFT PGSHIFT 851.1Schris 861.20Sthorpej# Important offsets into the lwp and proc structs & associated constants 871.20Sthorpejdefine L_ADDR offsetof(struct lwp, l_addr) 881.20Sthorpejdefine L_CPU offsetof(struct lwp, l_cpu) 891.20Sthorpejdefine L_PRIORITY offsetof(struct lwp, l_priority) 901.20Sthorpejdefine L_WCHAN offsetof(struct lwp, l_wchan) 911.20Sthorpejdefine L_STAT offsetof(struct lwp, l_stat) 921.20Sthorpejdefine L_PROC offsetof(struct lwp, l_proc) 931.39Smattdefine L_CTXSWTCH offsetof(struct lwp, l_ctxswtch) 941.27Sdsldefine P_RASLIST offsetof(struct proc, p_raslist) 951.1Schris 961.15Sthorpejdefine PCB_TF offsetof(struct pcb, pcb_tf) 971.1Schrisdefine PCB_FLAGS offsetof(struct pcb, pcb_flags) 981.19Sbjh21define PCB_R8 offsetof(struct pcb, pcb_un.un_32.pcb32_r8) 991.19Sbjh21define PCB_R9 offsetof(struct pcb, pcb_un.un_32.pcb32_r9) 1001.19Sbjh21define PCB_R10 offsetof(struct pcb, pcb_un.un_32.pcb32_r10) 1011.5Stoshiidefine PCB_R11 offsetof(struct pcb, pcb_un.un_32.pcb32_r11) 1021.5Stoshiidefine PCB_R12 offsetof(struct pcb, pcb_un.un_32.pcb32_r12) 1031.5Stoshiidefine PCB_SP offsetof(struct pcb, pcb_un.un_32.pcb32_sp) 1041.5Stoshiidefine PCB_LR offsetof(struct pcb, pcb_un.un_32.pcb32_lr) 1051.5Stoshiidefine PCB_PC offsetof(struct pcb, pcb_un.un_32.pcb32_pc) 1061.39Smattdefine PCB_USER_PID_RW offsetof(struct pcb, pcb_un.un_32.pcb32_user_pid_rw) 1071.39Smattdefine PCB_USER_PID_RO offsetof(struct pcb, pcb_un.un_32.pcb32_user_pid_ro) 1081.1Schrisdefine PCB_ONFAULT offsetof(struct pcb, pcb_onfault) 1091.26Sscwdefine PCB_NOALIGNFLT PCB_NOALIGNFLT 1101.1Schris 1111.1Schrisdefine USER_SIZE sizeof(struct user) 1121.1Schris 1131.1Schrisdefine V_TRAP offsetof(struct uvmexp, traps) 1141.1Schrisdefine V_INTR offsetof(struct uvmexp, intrs) 1151.1Schrisdefine V_SOFT offsetof(struct uvmexp, softs) 1161.1Schris 1171.1Schrisdefine VM_MAP offsetof(struct vmspace, vm_map) 1181.1Schrisdefine VM_PMAP offsetof(struct vmspace, vm_map.pmap) 1191.1Schris 1201.1Schrisdefine PR_BASE offsetof(struct uprof, pr_base) 1211.1Schrisdefine PR_SIZE offsetof(struct uprof, pr_size) 1221.1Schrisdefine PR_OFF offsetof(struct uprof, pr_off) 1231.1Schrisdefine PR_SCALE offsetof(struct uprof, pr_scale) 1241.1Schris 1251.1Schrisdefine SIGTRAP SIGTRAP 1261.1Schrisdefine SIGEMT SIGEMT 1271.1Schris 1281.1Schrisdefine TF_R0 offsetof(struct trapframe, tf_r0) 1291.1Schrisdefine TF_R10 offsetof(struct trapframe, tf_r10) 1301.1Schrisdefine TF_PC offsetof(struct trapframe, tf_pc) 1311.1Schris 1321.32Sthorpejdefine IF_PC offsetof(struct irqframe, if_pc) 1331.32Sthorpej 1341.1Schrisdefine PROCSIZE sizeof(struct proc) 1351.1Schrisdefine TRAPFRAMESIZE sizeof(struct trapframe) 1361.1Schris 1371.9Sthorpejdefine CF_IDCACHE_WBINV_ALL offsetof(struct cpu_functions, cf_idcache_wbinv_all) 1381.22Sscwdefine CF_DCACHE_WB_RANGE offsetof(struct cpu_functions, cf_dcache_wb_range) 1391.22Sscwdefine CF_TLB_FLUSHID_SE offsetof(struct cpu_functions, cf_tlb_flushID_SE) 1401.1Schrisdefine CF_CONTEXT_SWITCH offsetof(struct cpu_functions, cf_context_switch) 1411.1Schrisdefine CF_SLEEP offsetof(struct cpu_functions, cf_sleep) 1421.26Sscwdefine CF_CONTROL offsetof(struct cpu_functions, cf_control) 1431.1Schris 1441.1Schrisdefine CI_CURPRIORITY offsetof(struct cpu_info, ci_schedstate.spc_curpriority) 1451.39Smattifndef PROCESS_ID_IS_CURLWP 1461.20Sthorpejdefine CI_CURLWP offsetof(struct cpu_info, ci_curlwp) 1471.39Smattendif 1481.17Sbjh21define CI_CURPCB offsetof(struct cpu_info, ci_curpcb) 1491.39Smattdefine CI_CPL offsetof(struct cpu_info, ci_cpl) 1501.39Smattdefine CI_ASTPENDING offsetof(struct cpu_info, ci_astpending) 1511.39Smattdefine CI_WANT_RESCHED offsetof(struct cpu_info, ci_want_resched) 1521.39Smattdefine CI_INTR_DEPTH offsetof(struct cpu_info, ci_intr_depth) 1531.39Smattdefine CI_MTX_COUNT offsetof(struct cpu_info, ci_mtx_count) 1541.29Smanuif defined(EXEC_AOUT) 1551.26Sscwdefine CI_CTRL offsetof(struct cpu_info, ci_ctrl) 1561.16Sbjh21endif 1571.25Sscw 1581.25Sscw# Constants required for in_cksum() and friends. 1591.25Sscwdefine M_LEN offsetof(struct mbuf, m_len) 1601.25Sscwdefine M_DATA offsetof(struct mbuf, m_data) 1611.25Sscwdefine M_NEXT offsetof(struct mbuf, m_next) 1621.25Sscwdefine IP_SRC offsetof(struct ip, ip_src) 1631.25Sscwdefine IP_DST offsetof(struct ip, ip_dst) 164