genassym.cf revision 1.59
11.59Smatt# $NetBSD: genassym.cf,v 1.59 2012/12/10 06:50:28 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.41Stsutsui# 3. Neither the name of the University nor the names of its contributors 181.1Schris# may be used to endorse or promote products derived from this software 191.1Schris# without specific prior written permission. 201.1Schris# 211.1Schris# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 221.1Schris# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 231.1Schris# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 241.1Schris# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 251.1Schris# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 261.1Schris# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 271.1Schris# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 281.1Schris# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 291.1Schris# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 301.1Schris# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 311.1Schris# SUCH DAMAGE. 321.1Schris 331.1Schrisinclude <sys/param.h> 341.1Schrisinclude <sys/systm.h> 351.25Sscwinclude <sys/mbuf.h> 361.1Schrisinclude <sys/proc.h> 371.1Schrisinclude <sys/resourcevar.h> 381.1Schrisinclude <sys/device.h> 391.1Schrisinclude <sys/signal.h> 401.25Sscwinclude <netinet/in.h> 411.25Sscwinclude <netinet/in_systm.h> 421.25Sscwinclude <netinet/ip.h> 431.25Sscwinclude <netinet/ip6.h> 441.25Sscwinclude <netinet/ip_var.h> 451.1Schris 461.1Schrisinclude <uvm/uvm_extern.h> 471.8Sthorpej 481.8Sthorpejinclude <arm/fiq.h> 491.58Smattinclude <arm/vfpreg.h> 501.1Schris 511.45Smattinclude <arm/arm32/pte.h> 521.1Schrisinclude <machine/pmap.h> 531.1Schrisinclude <machine/frame.h> 541.49Smattinclude <machine/pcb.h> 551.1Schrisinclude <machine/vmparam.h> 561.6Sthorpej 571.16Sbjh21include "opt_multiprocessor.h" 581.26Sscwinclude "opt_compat_netbsd.h" 591.26Sscwinclude "opt_execfmt.h" 601.16Sbjh21 611.6Sthorpejdefine __PROG32 1 621.10Sthorpejifdef __ARM_FIQ_INDIRECT 631.10Sthorpejdefine __ARM_FIQ_INDIRECT 1 641.10Sthorpejendif 651.1Schris 661.59Smattifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS 671.59Smattdefine __HAVE_MM_MD_DIRECT_MAPPED_PHYS 1 681.59Smattendif 691.59Smatt 701.37Smattifdef __HAVE_FAST_SOFTINTS 711.37Smattdefine __HAVE_FAST_SOFTINTS 1 721.37Smattendif 731.37Smatt 741.52Smattifdef __HAVE_PIC_FAST_SOFTINTS 751.52Smattdefine __HAVE_PIC_FAST_SOFTINTS 1 761.52Smattendif 771.52Smatt 781.40Smattifdef __HAVE_UNNESTED_INTRS 791.40Smattdefine __HAVE_UNNESTED_INTRS 1 801.40Smattendif 811.40Smatt 821.31Smattdefine KERNEL_BASE KERNEL_BASE 831.1Schrisdefine VM_MIN_ADDRESS VM_MIN_ADDRESS 841.1Schrisdefine VM_MAXUSER_ADDRESS VM_MAXUSER_ADDRESS 851.22Sscw 861.54Smattdefine DCACHE_LINE_SIZE offsetof(struct arm_cache_info, dcache_line_size) 871.54Smatt 881.51Smattdefine PV_PA offsetof(pv_addr_t, pv_pa) 891.22Sscwdefine PMAP_DOMAIN_KERNEL PMAP_DOMAIN_KERNEL 901.45Smattdefine DOMAIN_CLIENT DOMAIN_CLIENT 911.45Smattdefine L1_S_PROTO_generic L1_S_PROTO_generic 921.45Smattdefine L1_S_PROTO_armv7 L1_S_PROTO_armv7 931.45Smattdefine L1_S_PROTO_xscale L1_S_PROTO_xscale 941.45Smattif ARM_NMMUS == 1 951.45Smattdefine L1_S_PROTO L1_S_PROTO 961.45Smattendif 971.45Smattdefine L1_S_FRAME L1_S_FRAME 981.45Smattdefine L1_S_SHIFT L1_S_SHIFT 991.45Smattdefine L1_S_SIZE L1_S_SIZE 1001.45Smattdefine L1_S_B L1_S_B 1011.45Smattdefine L1_S_C L1_S_C 1021.53Smattdefine L1_S_AP_KR L1_S_AP(AP_KR) 1031.45Smattdefine L1_S_AP_KRW L1_S_AP(AP_KRW) 1041.45Smattdefine L1_S_APv7_KRW L1_S_AP(AP7_KRW) 1051.45Smattdefine L1_TABLE_SIZE L1_TABLE_SIZE 1061.45Smattdefine L1_TYPE_S L1_TYPE_S 1071.45Smattdefine L1_S_DOM_KERNEL L1_S_DOM(PMAP_DOMAIN_KERNEL) 1081.23Sthorpej 1091.23Sthorpejifdef PMAP_INCLUDE_PTE_SYNC 1101.23Sthorpejdefine PMAP_INCLUDE_PTE_SYNC 1 1111.22Sscwendif 1121.1Schris 1131.54Smattdefine PAGE_MASK PAGE_MASK 1141.21Sthorpejdefine PAGE_SIZE PAGE_SIZE 1151.1Schrisdefine UPAGES UPAGES 1161.1Schrisdefine PGSHIFT PGSHIFT 1171.1Schris 1181.20Sthorpej# Important offsets into the lwp and proc structs & associated constants 1191.42Srminddefine L_PCB offsetof(struct lwp, l_addr) 1201.20Sthorpejdefine L_CPU offsetof(struct lwp, l_cpu) 1211.20Sthorpejdefine L_PRIORITY offsetof(struct lwp, l_priority) 1221.20Sthorpejdefine L_WCHAN offsetof(struct lwp, l_wchan) 1231.20Sthorpejdefine L_STAT offsetof(struct lwp, l_stat) 1241.20Sthorpejdefine L_PROC offsetof(struct lwp, l_proc) 1251.39Smattdefine L_CTXSWTCH offsetof(struct lwp, l_ctxswtch) 1261.46Smattdefine L_PRIVATE offsetof(struct lwp, l_private) 1271.49Smattdefine L_MD_FLAGS offsetof(struct lwp, l_md.md_flags) 1281.49Smattdefine L_MD_TF offsetof(struct lwp, l_md.md_tf) 1291.49Smattdefine MDLWP_NOALIGNFLT MDLWP_NOALIGNFLT 1301.49Smatt 1311.27Sdsldefine P_RASLIST offsetof(struct proc, p_raslist) 1321.1Schris 1331.19Sbjh21define PCB_R8 offsetof(struct pcb, pcb_un.un_32.pcb32_r8) 1341.19Sbjh21define PCB_R9 offsetof(struct pcb, pcb_un.un_32.pcb32_r9) 1351.19Sbjh21define PCB_R10 offsetof(struct pcb, pcb_un.un_32.pcb32_r10) 1361.5Stoshiidefine PCB_R11 offsetof(struct pcb, pcb_un.un_32.pcb32_r11) 1371.5Stoshiidefine PCB_R12 offsetof(struct pcb, pcb_un.un_32.pcb32_r12) 1381.57Smattdefine PCB_KSP offsetof(struct pcb, pcb_un.un_32.pcb32_sp) 1391.5Stoshiidefine PCB_LR offsetof(struct pcb, pcb_un.un_32.pcb32_lr) 1401.5Stoshiidefine PCB_PC offsetof(struct pcb, pcb_un.un_32.pcb32_pc) 1411.39Smattdefine PCB_USER_PID_RW offsetof(struct pcb, pcb_un.un_32.pcb32_user_pid_rw) 1421.1Schrisdefine PCB_ONFAULT offsetof(struct pcb, pcb_onfault) 1431.1Schris 1441.44Srminddefine PCB_SIZE sizeof(struct pcb) 1451.1Schris 1461.1Schrisdefine VM_MAP offsetof(struct vmspace, vm_map) 1471.1Schrisdefine VM_PMAP offsetof(struct vmspace, vm_map.pmap) 1481.1Schris 1491.1Schrisdefine PR_BASE offsetof(struct uprof, pr_base) 1501.1Schrisdefine PR_SIZE offsetof(struct uprof, pr_size) 1511.1Schrisdefine PR_OFF offsetof(struct uprof, pr_off) 1521.1Schrisdefine PR_SCALE offsetof(struct uprof, pr_scale) 1531.1Schris 1541.1Schrisdefine SIGTRAP SIGTRAP 1551.1Schrisdefine SIGEMT SIGEMT 1561.1Schris 1571.50Smattdefine TF_FILL offsetof(struct trapframe, tf_fill) 1581.1Schrisdefine TF_R0 offsetof(struct trapframe, tf_r0) 1591.55Smattdefine TF_R4 offsetof(struct trapframe, tf_r4) 1601.55Smattdefine TF_R6 offsetof(struct trapframe, tf_r6) 1611.1Schrisdefine TF_R10 offsetof(struct trapframe, tf_r10) 1621.56Smattdefine TF_USR_SP offsetof(struct trapframe, tf_usr_sp) 1631.56Smattdefine TF_SVC_SP offsetof(struct trapframe, tf_svc_sp) 1641.1Schrisdefine TF_PC offsetof(struct trapframe, tf_pc) 1651.1Schris 1661.1Schrisdefine PROCSIZE sizeof(struct proc) 1671.1Schrisdefine TRAPFRAMESIZE sizeof(struct trapframe) 1681.1Schris 1691.9Sthorpejdefine CF_IDCACHE_WBINV_ALL offsetof(struct cpu_functions, cf_idcache_wbinv_all) 1701.22Sscwdefine CF_DCACHE_WB_RANGE offsetof(struct cpu_functions, cf_dcache_wb_range) 1711.22Sscwdefine CF_TLB_FLUSHID_SE offsetof(struct cpu_functions, cf_tlb_flushID_SE) 1721.1Schrisdefine CF_CONTEXT_SWITCH offsetof(struct cpu_functions, cf_context_switch) 1731.1Schrisdefine CF_SLEEP offsetof(struct cpu_functions, cf_sleep) 1741.26Sscwdefine CF_CONTROL offsetof(struct cpu_functions, cf_control) 1751.1Schris 1761.1Schrisdefine CI_CURPRIORITY offsetof(struct cpu_info, ci_schedstate.spc_curpriority) 1771.50Smattdefine CI_ARM_CPUID offsetof(struct cpu_info, ci_arm_cpuid) 1781.20Sthorpejdefine CI_CURLWP offsetof(struct cpu_info, ci_curlwp) 1791.39Smattdefine CI_CPL offsetof(struct cpu_info, ci_cpl) 1801.39Smattdefine CI_ASTPENDING offsetof(struct cpu_info, ci_astpending) 1811.39Smattdefine CI_WANT_RESCHED offsetof(struct cpu_info, ci_want_resched) 1821.39Smattdefine CI_INTR_DEPTH offsetof(struct cpu_info, ci_intr_depth) 1831.39Smattdefine CI_MTX_COUNT offsetof(struct cpu_info, ci_mtx_count) 1841.51Smattdefine CI_UNDEFSAVE offsetof(struct cpu_info, ci_undefsave[0]) 1851.29Smanuif defined(EXEC_AOUT) 1861.26Sscwdefine CI_CTRL offsetof(struct cpu_info, ci_ctrl) 1871.16Sbjh21endif 1881.40Smattifdef __HAVE_FAST_SOFTINTS 1891.40Smattdefine CI_SOFTINTS offsetof(struct cpu_info, ci_softints) 1901.40Smattendif 1911.51Smattdefine CI_IDLELWP offsetof(struct cpu_info, ci_data.cpu_idlelwp) 1921.43Smattdefine CI_CC_NTRAP offsetof(struct cpu_info, ci_data.cpu_ntrap) 1931.43Smattdefine CI_CC_NINTR offsetof(struct cpu_info, ci_data.cpu_nintr) 1941.43Smattdefine CI_CC_NSOFT offsetof(struct cpu_info, ci_data.cpu_nsoft) 1951.43Smatt 1961.58Smattdefine VFP_FPEXC_EN VFP_FPEXC_EN 1971.25Sscw 1981.25Sscw# Constants required for in_cksum() and friends. 1991.25Sscwdefine M_LEN offsetof(struct mbuf, m_len) 2001.25Sscwdefine M_DATA offsetof(struct mbuf, m_data) 2011.25Sscwdefine M_NEXT offsetof(struct mbuf, m_next) 2021.25Sscwdefine IP_SRC offsetof(struct ip, ip_src) 2031.25Sscwdefine IP_DST offsetof(struct ip, ip_dst) 204