genassym.cf revision 1.6
11.6Sthorpej#	$NetBSD: genassym.cf,v 1.6 2001/11/23 16:50:48 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.1Schris
471.1Schrisinclude <machine/pmap.h>
481.1Schrisinclude <machine/frame.h>
491.1Schrisinclude <machine/vmparam.h>
501.3Smattinclude <machine/intr.h>
511.6Sthorpej
521.6Sthorpejdefine	__PROG32		1
531.1Schris
541.1Schrisdefine	VM_MIN_ADDRESS		VM_MIN_ADDRESS
551.1Schrisdefine	VM_MAXUSER_ADDRESS	VM_MAXUSER_ADDRESS
561.1Schrisdefine	VM_MAXKERN_ADDRESS	VM_MAXKERN_ADDRESS
571.1Schrisdefine	PROCESS_PAGE_TBLS_BASE	PROCESS_PAGE_TBLS_BASE
581.1Schris
591.1Schrisdefine	UPAGES			UPAGES
601.1Schrisdefine	PGSHIFT			PGSHIFT
611.1Schrisdefine	PDSHIFT			PDSHIFT
621.1Schris
631.1Schrisdefine	P_TRACED		P_TRACED
641.1Schrisdefine	P_PROFIL		P_PROFIL
651.1Schrisdefine	P_ADDR			offsetof(struct proc, p_addr)
661.1Schrisdefine	P_BACK			offsetof(struct proc, p_back)
671.1Schrisdefine	P_FORW			offsetof(struct proc, p_forw)
681.1Schrisdefine	P_PRIORITY		offsetof(struct proc, p_priority)
691.1Schrisdefine	P_STAT			offsetof(struct proc, p_stat)
701.1Schrisdefine	P_WCHAN			offsetof(struct proc, p_wchan)
711.1Schrisdefine	P_VMSPACE		offsetof(struct proc, p_vmspace)
721.1Schrisdefine	P_FLAG			offsetof(struct proc, p_flag)
731.1Schrisdefine	P_SIGLIST		offsetof(struct proc, p_sigctx) + offsetof(struct sigctx, ps_siglist)
741.1Schrisdefine	P_SIGMASK		offsetof(struct proc, p_sigctx) + offsetof(struct sigctx, ps_sigmask)
751.1Schrisdefine	P_USRPRI		offsetof(struct proc, p_usrpri)
761.1Schris
771.1Schrisdefine	SONPROC			SONPROC
781.1Schris
791.1Schrisdefine	PCB_PAGEDIR		offsetof(struct pcb, pcb_pagedir)
801.1Schrisdefine	PCB_FLAGS		offsetof(struct pcb, pcb_flags)
811.5Stoshiidefine	PCB_R8			offsetof(struct pcb, pcb_un.un_32.pcb32_r8)
821.5Stoshiidefine	PCB_R9			offsetof(struct pcb, pcb_un.un_32.pcb32_r9)
831.5Stoshiidefine	PCB_R10			offsetof(struct pcb, pcb_un.un_32.pcb32_r10)
841.5Stoshiidefine	PCB_R11			offsetof(struct pcb, pcb_un.un_32.pcb32_r11)
851.5Stoshiidefine	PCB_R12			offsetof(struct pcb, pcb_un.un_32.pcb32_r12)
861.5Stoshiidefine	PCB_SP			offsetof(struct pcb, pcb_un.un_32.pcb32_sp)
871.5Stoshiidefine	PCB_LR			offsetof(struct pcb, pcb_un.un_32.pcb32_lr)
881.5Stoshiidefine	PCB_PC			offsetof(struct pcb, pcb_un.un_32.pcb32_pc)
891.5Stoshiidefine	PCB_UND_SP		offsetof(struct pcb, pcb_un.un_32.pcb32_und_sp)
901.1Schrisdefine	PCB_ONFAULT		offsetof(struct pcb, pcb_onfault)
911.1Schris
921.1Schrisdefine	USER_SIZE		sizeof(struct user)
931.1Schris
941.1Schrisdefine	V_TRAP			offsetof(struct uvmexp, traps)
951.1Schrisdefine	V_INTR			offsetof(struct uvmexp, intrs)
961.1Schrisdefine	V_SOFT			offsetof(struct uvmexp, softs)
971.1Schris
981.1Schrisdefine	VM_MAP			offsetof(struct vmspace, vm_map)
991.1Schrisdefine	VM_PMAP			offsetof(struct vmspace, vm_map.pmap)
1001.1Schris
1011.1Schrisdefine	PR_BASE			offsetof(struct uprof, pr_base)
1021.1Schrisdefine	PR_SIZE			offsetof(struct uprof, pr_size)
1031.1Schrisdefine	PR_OFF			offsetof(struct uprof, pr_off)
1041.1Schrisdefine	PR_SCALE		offsetof(struct uprof, pr_scale)
1051.1Schris
1061.3Smattdefine	IH_FUNC			offsetof(struct irqhandler, ih_func)
1071.3Smattdefine	IH_ARG			offsetof(struct irqhandler, ih_arg)
1081.4Smattdefine	IH_FLAGS		offsetof(struct irqhandler, ih_flags)
1091.4Smattifndef NEWINTR
1101.3Smattdefine	IH_LEVEL		offsetof(struct irqhandler, ih_level)
1111.3Smattdefine	IH_NUM			offsetof(struct irqhandler, ih_num)
1121.3Smattdefine	IH_MASKADDR		offsetof(struct irqhandler, ih_maskaddr)
1131.3Smattdefine	IH_MASKBITS		offsetof(struct irqhandler, ih_maskbits)
1141.3Smattdefine	IH_NEXT			offsetof(struct irqhandler, ih_next)
1151.4Smattendif
1161.3Smatt
1171.3Smattdefine	FH_FUNC			offsetof(struct fiqhandler, fh_func)
1181.3Smattdefine	FH_R8			offsetof(struct fiqhandler, fh_r8)
1191.3Smattdefine	FH_R9			offsetof(struct fiqhandler, fh_r9)
1201.3Smattdefine	FH_R10			offsetof(struct fiqhandler, fh_r10)
1211.3Smattdefine	FH_R11			offsetof(struct fiqhandler, fh_r11)
1221.3Smattdefine	FH_R12			offsetof(struct fiqhandler, fh_r12)
1231.3Smattdefine	FH_R13			offsetof(struct fiqhandler, fh_r13)
1241.4Smattifndef NEWINTR
1251.4Smattdefine	FH_MASK			offsetof(struct fiqhandler, fh_mask)
1261.4Smattendif
1271.1Schris
1281.1Schrisdefine	SIGF_HANDLER		offsetof(struct sigframe, sf_handler)
1291.1Schrisdefine	SIGF_SC			offsetof(struct sigframe, sf_sc)
1301.1Schris
1311.1Schrisdefine	SIGTRAP			SIGTRAP
1321.1Schrisdefine	SIGEMT			SIGEMT
1331.1Schris
1341.1Schrisdefine	TF_R0			offsetof(struct trapframe, tf_r0)
1351.1Schrisdefine	TF_R10			offsetof(struct trapframe, tf_r10)
1361.1Schrisdefine	TF_PC			offsetof(struct trapframe, tf_pc)
1371.1Schris
1381.1Schrisdefine	PROCSIZE		sizeof(struct proc)
1391.1Schrisdefine	TRAPFRAMESIZE		sizeof(struct trapframe)
1401.1Schris
1411.1Schrisdefine	CF_CACHE_PURGE_ID	offsetof(struct cpu_functions, cf_cache_purgeID)
1421.1Schrisdefine	CF_CONTEXT_SWITCH	offsetof(struct cpu_functions, cf_context_switch)
1431.1Schrisdefine	CF_SLEEP		offsetof(struct cpu_functions, cf_sleep)
1441.1Schris
1451.1Schrisdefine	CI_CURPRIORITY		offsetof(struct cpu_info, ci_schedstate.spc_curpriority)
146