genassym.cf revision 1.18
1# $NetBSD: genassym.cf,v 1.18 2002/10/18 21:32:58 bjh21 Exp $ 2 3# Copyright (c) 1982, 1990 The Regents of the University of California. 4# All rights reserved. 5# 6# This code is derived from software contributed to Berkeley by 7# William Jolitz. 8# 9# Redistribution and use in source and binary forms, with or without 10# modification, are permitted provided that the following conditions 11# are met: 12# 1. Redistributions of source code must retain the above copyright 13# notice, this list of conditions and the following disclaimer. 14# 2. Redistributions in binary form must reproduce the above copyright 15# notice, this list of conditions and the following disclaimer in the 16# documentation and/or other materials provided with the distribution. 17# 3. All advertising materials mentioning features or use of this software 18# must display the following acknowledgement: 19# This product includes software developed by the University of 20# California, Berkeley and its contributors. 21# 4. Neither the name of the University nor the names of its contributors 22# may be used to endorse or promote products derived from this software 23# without specific prior written permission. 24# 25# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 26# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 29# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35# SUCH DAMAGE. 36 37include <sys/param.h> 38include <sys/systm.h> 39include <sys/proc.h> 40include <sys/resourcevar.h> 41include <sys/device.h> 42include <sys/user.h> 43include <sys/signal.h> 44 45include <uvm/uvm_extern.h> 46 47include <arm/fiq.h> 48 49include <machine/pmap.h> 50include <machine/frame.h> 51include <machine/vmparam.h> 52 53include "opt_multiprocessor.h" 54 55define __PROG32 1 56ifdef __ARM_FIQ_INDIRECT 57define __ARM_FIQ_INDIRECT 1 58endif 59 60define VM_MIN_ADDRESS VM_MIN_ADDRESS 61define VM_MAXUSER_ADDRESS VM_MAXUSER_ADDRESS 62define PTE_BASE PTE_BASE 63 64define UPAGES UPAGES 65define PGSHIFT PGSHIFT 66 67define P_TRACED P_TRACED 68define P_PROFIL P_PROFIL 69define P_ADDR offsetof(struct proc, p_addr) 70define P_BACK offsetof(struct proc, p_back) 71define P_FORW offsetof(struct proc, p_forw) 72define P_CPU offsetof(struct proc, p_cpu) 73define P_PRIORITY offsetof(struct proc, p_priority) 74define P_STAT offsetof(struct proc, p_stat) 75define P_WCHAN offsetof(struct proc, p_wchan) 76define P_VMSPACE offsetof(struct proc, p_vmspace) 77define P_FLAG offsetof(struct proc, p_flag) 78define P_NRAS offsetof(struct proc, p_nras) 79define P_SIGLIST offsetof(struct proc, p_sigctx) + offsetof(struct sigctx, ps_siglist) 80define P_SIGMASK offsetof(struct proc, p_sigctx) + offsetof(struct sigctx, ps_sigmask) 81define P_USRPRI offsetof(struct proc, p_usrpri) 82 83define SONPROC SONPROC 84 85define PCB_TF offsetof(struct pcb, pcb_tf) 86define PCB_PAGEDIR offsetof(struct pcb, pcb_pagedir) 87define PCB_FLAGS offsetof(struct pcb, pcb_flags) 88define PCB_R11 offsetof(struct pcb, pcb_un.un_32.pcb32_r11) 89define PCB_R12 offsetof(struct pcb, pcb_un.un_32.pcb32_r12) 90define PCB_SP offsetof(struct pcb, pcb_un.un_32.pcb32_sp) 91define PCB_LR offsetof(struct pcb, pcb_un.un_32.pcb32_lr) 92define PCB_PC offsetof(struct pcb, pcb_un.un_32.pcb32_pc) 93define PCB_UND_SP offsetof(struct pcb, pcb_un.un_32.pcb32_und_sp) 94define PCB_ONFAULT offsetof(struct pcb, pcb_onfault) 95 96define USER_SIZE sizeof(struct user) 97 98define V_TRAP offsetof(struct uvmexp, traps) 99define V_INTR offsetof(struct uvmexp, intrs) 100define V_SOFT offsetof(struct uvmexp, softs) 101 102define VM_MAP offsetof(struct vmspace, vm_map) 103define VM_PMAP offsetof(struct vmspace, vm_map.pmap) 104 105define PR_BASE offsetof(struct uprof, pr_base) 106define PR_SIZE offsetof(struct uprof, pr_size) 107define PR_OFF offsetof(struct uprof, pr_off) 108define PR_SCALE offsetof(struct uprof, pr_scale) 109 110define SIGTRAP SIGTRAP 111define SIGEMT SIGEMT 112 113define TF_R0 offsetof(struct trapframe, tf_r0) 114define TF_R10 offsetof(struct trapframe, tf_r10) 115define TF_PC offsetof(struct trapframe, tf_pc) 116 117define PROCSIZE sizeof(struct proc) 118define TRAPFRAMESIZE sizeof(struct trapframe) 119 120define CF_IDCACHE_WBINV_ALL offsetof(struct cpu_functions, cf_idcache_wbinv_all) 121define CF_CONTEXT_SWITCH offsetof(struct cpu_functions, cf_context_switch) 122define CF_SLEEP offsetof(struct cpu_functions, cf_sleep) 123 124define CI_CURPRIORITY offsetof(struct cpu_info, ci_schedstate.spc_curpriority) 125ifdef MULTIPROCESSOR 126define CI_CURPROC offsetof(struct cpu_info, ci_curproc) 127define CI_CURPCB offsetof(struct cpu_info, ci_curpcb) 128endif 129