genassym.cf revision 1.2
1# $NetBSD: genassym.cf,v 1.2 2001/08/27 11:39:43 chris 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 <machine/pmap.h> 48include <machine/frame.h> 49include <machine/vmparam.h> 50include <machine/irqhandler.h> 51 52define VM_MIN_ADDRESS VM_MIN_ADDRESS 53define VM_MAXUSER_ADDRESS VM_MAXUSER_ADDRESS 54define VM_MAXKERN_ADDRESS VM_MAXKERN_ADDRESS 55define PROCESS_PAGE_TBLS_BASE PROCESS_PAGE_TBLS_BASE 56 57define UPAGES UPAGES 58define PGSHIFT PGSHIFT 59define PDSHIFT PDSHIFT 60 61define P_TRACED P_TRACED 62define P_PROFIL P_PROFIL 63define P_ADDR offsetof(struct proc, p_addr) 64define P_BACK offsetof(struct proc, p_back) 65define P_FORW offsetof(struct proc, p_forw) 66define P_PRIORITY offsetof(struct proc, p_priority) 67define P_STAT offsetof(struct proc, p_stat) 68define P_WCHAN offsetof(struct proc, p_wchan) 69define P_VMSPACE offsetof(struct proc, p_vmspace) 70define P_FLAG offsetof(struct proc, p_flag) 71define P_SIGLIST offsetof(struct proc, p_sigctx) + offsetof(struct sigctx, ps_siglist) 72define P_SIGMASK offsetof(struct proc, p_sigctx) + offsetof(struct sigctx, ps_sigmask) 73define P_USRPRI offsetof(struct proc, p_usrpri) 74 75define SONPROC SONPROC 76 77define PCB_PAGEDIR offsetof(struct pcb, pcb_pagedir) 78define PCB_FLAGS offsetof(struct pcb, pcb_flags) 79define PCB_R8 offsetof(struct pcb, pcb_r8) 80define PCB_R9 offsetof(struct pcb, pcb_r9) 81define PCB_R10 offsetof(struct pcb, pcb_r10) 82define PCB_R11 offsetof(struct pcb, pcb_r11) 83define PCB_R12 offsetof(struct pcb, pcb_r12) 84define PCB_SP offsetof(struct pcb, pcb_sp) 85define PCB_LR offsetof(struct pcb, pcb_lr) 86define PCB_PC offsetof(struct pcb, pcb_pc) 87define PCB_UND_SP offsetof(struct pcb, pcb_und_sp) 88define PCB_ONFAULT offsetof(struct pcb, pcb_onfault) 89 90define USER_SIZE sizeof(struct user) 91 92define V_TRAP offsetof(struct uvmexp, traps) 93define V_INTR offsetof(struct uvmexp, intrs) 94define V_SOFT offsetof(struct uvmexp, softs) 95 96define VM_MAP offsetof(struct vmspace, vm_map) 97define VM_PMAP offsetof(struct vmspace, vm_map.pmap) 98 99define PR_BASE offsetof(struct uprof, pr_base) 100define PR_SIZE offsetof(struct uprof, pr_size) 101define PR_OFF offsetof(struct uprof, pr_off) 102define PR_SCALE offsetof(struct uprof, pr_scale) 103 104define IH_FUNC offsetof(irqhandler_t, ih_func) 105define IH_ARG offsetof(irqhandler_t, ih_arg) 106define IH_LEVEL offsetof(irqhandler_t, ih_level) 107define IH_NUM offsetof(irqhandler_t, ih_num) 108define IH_FLAGS offsetof(irqhandler_t, ih_flags) 109define IH_MASKADDR offsetof(irqhandler_t, ih_maskaddr) 110define IH_MASKBITS offsetof(irqhandler_t, ih_maskbits) 111define IH_NEXT offsetof(irqhandler_t, ih_next) 112 113define FH_FUNC offsetof(fiqhandler_t, fh_func) 114define FH_MASK offsetof(fiqhandler_t, fh_mask) 115define FH_R8 offsetof(fiqhandler_t, fh_r8) 116define FH_R9 offsetof(fiqhandler_t, fh_r9) 117define FH_R10 offsetof(fiqhandler_t, fh_r10) 118define FH_R11 offsetof(fiqhandler_t, fh_r11) 119define FH_R12 offsetof(fiqhandler_t, fh_r12) 120define FH_R13 offsetof(fiqhandler_t, fh_r13) 121 122define SIGF_HANDLER offsetof(struct sigframe, sf_handler) 123define SIGF_SC offsetof(struct sigframe, sf_sc) 124 125define SIGTRAP SIGTRAP 126define SIGEMT SIGEMT 127 128define TF_R0 offsetof(struct trapframe, tf_r0) 129define TF_R10 offsetof(struct trapframe, tf_r10) 130define TF_PC offsetof(struct trapframe, tf_pc) 131 132define PROCSIZE sizeof(struct proc) 133define TRAPFRAMESIZE sizeof(struct trapframe) 134 135define CF_CACHE_PURGE_ID offsetof(struct cpu_functions, cf_cache_purgeID) 136define CF_CONTEXT_SWITCH offsetof(struct cpu_functions, cf_context_switch) 137define CF_SLEEP offsetof(struct cpu_functions, cf_sleep) 138 139define CI_CURPRIORITY offsetof(struct cpu_info, ci_schedstate.spc_curpriority) 140