genassym.cf revision 1.23
11.23Sthorpej# $NetBSD: genassym.cf,v 1.23 2003/04/22 00:24:49 thorpej 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.1Schrisinclude <sys/proc.h> 401.1Schrisinclude <sys/resourcevar.h> 411.1Schrisinclude <sys/device.h> 421.1Schrisinclude <sys/user.h> 431.1Schrisinclude <sys/signal.h> 441.1Schris 451.1Schrisinclude <uvm/uvm_extern.h> 461.8Sthorpej 471.8Sthorpejinclude <arm/fiq.h> 481.1Schris 491.1Schrisinclude <machine/pmap.h> 501.1Schrisinclude <machine/frame.h> 511.1Schrisinclude <machine/vmparam.h> 521.6Sthorpej 531.16Sbjh21include "opt_multiprocessor.h" 541.16Sbjh21 551.6Sthorpejdefine __PROG32 1 561.10Sthorpejifdef __ARM_FIQ_INDIRECT 571.10Sthorpejdefine __ARM_FIQ_INDIRECT 1 581.10Sthorpejendif 591.1Schris 601.1Schrisdefine VM_MIN_ADDRESS VM_MIN_ADDRESS 611.1Schrisdefine VM_MAXUSER_ADDRESS VM_MAXUSER_ADDRESS 621.22Sscw 631.22Sscwifndef ARM32_PMAP_NEW 641.12Sthorpejdefine PTE_BASE PTE_BASE 651.22Sscwelse 661.22Sscwdefine DOMAIN_CLIENT DOMAIN_CLIENT 671.22Sscwdefine PMAP_DOMAIN_KERNEL PMAP_DOMAIN_KERNEL 681.23Sthorpejendif 691.23Sthorpej 701.23Sthorpejifdef PMAP_INCLUDE_PTE_SYNC 711.23Sthorpejdefine PMAP_INCLUDE_PTE_SYNC 1 721.22Sscwendif 731.1Schris 741.21Sthorpejdefine PAGE_SIZE PAGE_SIZE 751.1Schrisdefine UPAGES UPAGES 761.1Schrisdefine PGSHIFT PGSHIFT 771.1Schris 781.20Sthorpej# Important offsets into the lwp and proc structs & associated constants 791.20Sthorpejdefine L_FORW offsetof(struct lwp, l_forw) 801.20Sthorpejdefine L_BACK offsetof(struct lwp, l_back) 811.20Sthorpejdefine L_ADDR offsetof(struct lwp, l_addr) 821.20Sthorpejdefine L_CPU offsetof(struct lwp, l_cpu) 831.20Sthorpejdefine L_PRIORITY offsetof(struct lwp, l_priority) 841.20Sthorpejdefine L_WCHAN offsetof(struct lwp, l_wchan) 851.20Sthorpejdefine L_STAT offsetof(struct lwp, l_stat) 861.20Sthorpejdefine L_PROC offsetof(struct lwp, l_proc) 871.15Sthorpejdefine P_NRAS offsetof(struct proc, p_nras) 881.1Schris 891.20Sthorpej# Process status constants 901.20Sthorpejdefine LSONPROC LSONPROC 911.1Schris 921.15Sthorpejdefine PCB_TF offsetof(struct pcb, pcb_tf) 931.1Schrisdefine PCB_PAGEDIR offsetof(struct pcb, pcb_pagedir) 941.22Sscwifdef ARM32_PMAP_NEW 951.22Sscwdefine PCB_PL1VEC offsetof(struct pcb, pcb_pl1vec) 961.22Sscwdefine PCB_L1VEC offsetof(struct pcb, pcb_l1vec) 971.22Sscwdefine PCB_DACR offsetof(struct pcb, pcb_dacr) 981.22Sscwdefine PCB_CSTATE offsetof(struct pcb, pcb_cstate) 991.22Sscwendif 1001.1Schrisdefine PCB_FLAGS offsetof(struct pcb, pcb_flags) 1011.19Sbjh21define PCB_R8 offsetof(struct pcb, pcb_un.un_32.pcb32_r8) 1021.19Sbjh21define PCB_R9 offsetof(struct pcb, pcb_un.un_32.pcb32_r9) 1031.19Sbjh21define PCB_R10 offsetof(struct pcb, pcb_un.un_32.pcb32_r10) 1041.5Stoshiidefine PCB_R11 offsetof(struct pcb, pcb_un.un_32.pcb32_r11) 1051.5Stoshiidefine PCB_R12 offsetof(struct pcb, pcb_un.un_32.pcb32_r12) 1061.5Stoshiidefine PCB_SP offsetof(struct pcb, pcb_un.un_32.pcb32_sp) 1071.5Stoshiidefine PCB_LR offsetof(struct pcb, pcb_un.un_32.pcb32_lr) 1081.5Stoshiidefine PCB_PC offsetof(struct pcb, pcb_un.un_32.pcb32_pc) 1091.5Stoshiidefine PCB_UND_SP offsetof(struct pcb, pcb_un.un_32.pcb32_und_sp) 1101.1Schrisdefine PCB_ONFAULT offsetof(struct pcb, pcb_onfault) 1111.1Schris 1121.1Schrisdefine USER_SIZE sizeof(struct user) 1131.1Schris 1141.1Schrisdefine V_TRAP offsetof(struct uvmexp, traps) 1151.1Schrisdefine V_INTR offsetof(struct uvmexp, intrs) 1161.1Schrisdefine V_SOFT offsetof(struct uvmexp, softs) 1171.1Schris 1181.1Schrisdefine VM_MAP offsetof(struct vmspace, vm_map) 1191.1Schrisdefine VM_PMAP offsetof(struct vmspace, vm_map.pmap) 1201.1Schris 1211.22Sscwifdef ARM32_PMAP_NEW 1221.22Sscwdefine CS_TLB_ID offsetof(union pmap_cache_state, cs_tlb_id) 1231.22Sscwdefine CS_TLB_D offsetof(union pmap_cache_state, cs_tlb_d) 1241.22Sscwdefine CS_TLB offsetof(union pmap_cache_state, cs_tlb) 1251.22Sscwdefine CS_CACHE_ID offsetof(union pmap_cache_state, cs_cache_id) 1261.22Sscwdefine CS_CACHE_D offsetof(union pmap_cache_state, cs_cache_d) 1271.22Sscwdefine CS_CACHE offsetof(union pmap_cache_state, cs_cache) 1281.22Sscwdefine CS_ALL offsetof(union pmap_cache_state, cs_all) 1291.22Sscwdefine PMAP_CSTATE offsetof(struct pmap, pm_cstate) 1301.22Sscwendif 1311.22Sscw 1321.1Schrisdefine PR_BASE offsetof(struct uprof, pr_base) 1331.1Schrisdefine PR_SIZE offsetof(struct uprof, pr_size) 1341.1Schrisdefine PR_OFF offsetof(struct uprof, pr_off) 1351.1Schrisdefine PR_SCALE offsetof(struct uprof, pr_scale) 1361.1Schris 1371.1Schrisdefine SIGTRAP SIGTRAP 1381.1Schrisdefine SIGEMT SIGEMT 1391.1Schris 1401.1Schrisdefine TF_R0 offsetof(struct trapframe, tf_r0) 1411.1Schrisdefine TF_R10 offsetof(struct trapframe, tf_r10) 1421.1Schrisdefine TF_PC offsetof(struct trapframe, tf_pc) 1431.1Schris 1441.1Schrisdefine PROCSIZE sizeof(struct proc) 1451.1Schrisdefine TRAPFRAMESIZE sizeof(struct trapframe) 1461.1Schris 1471.9Sthorpejdefine CF_IDCACHE_WBINV_ALL offsetof(struct cpu_functions, cf_idcache_wbinv_all) 1481.22Sscwifdef ARM32_PMAP_NEW 1491.22Sscwdefine CF_DCACHE_WB_RANGE offsetof(struct cpu_functions, cf_dcache_wb_range) 1501.22Sscwdefine CF_TLB_FLUSHID_SE offsetof(struct cpu_functions, cf_tlb_flushID_SE) 1511.22Sscwendif 1521.1Schrisdefine CF_CONTEXT_SWITCH offsetof(struct cpu_functions, cf_context_switch) 1531.1Schrisdefine CF_SLEEP offsetof(struct cpu_functions, cf_sleep) 1541.1Schris 1551.1Schrisdefine CI_CURPRIORITY offsetof(struct cpu_info, ci_schedstate.spc_curpriority) 1561.16Sbjh21ifdef MULTIPROCESSOR 1571.20Sthorpejdefine CI_CURLWP offsetof(struct cpu_info, ci_curlwp) 1581.17Sbjh21define CI_CURPCB offsetof(struct cpu_info, ci_curpcb) 1591.16Sbjh21endif 160