genassym.cf revision 1.13
11.13Skleink#	$NetBSD: genassym.cf,v 1.13 1999/04/19 21:22:59 kleink Exp $
21.1Sscottr
31.1Sscottr#
41.1Sscottr# Copyright (c) 1990 The Regents of the University of California.
51.1Sscottr# All rights reserved.
61.1Sscottr#
71.1Sscottr# Redistribution and use in source and binary forms, with or without
81.1Sscottr# modification, are permitted provided that the following conditions
91.1Sscottr# are met:
101.1Sscottr# 1. Redistributions of source code must retain the above copyright
111.1Sscottr#    notice, this list of conditions and the following disclaimer.
121.1Sscottr# 2. Redistributions in binary form must reproduce the above copyright
131.1Sscottr#    notice, this list of conditions and the following disclaimer in the
141.1Sscottr#    documentation and/or other materials provided with the distribution.
151.1Sscottr# 3. All advertising materials mentioning features or use of this software
161.1Sscottr#    must display the following acknowledgement:
171.1Sscottr#	This product includes software developed by the University of
181.1Sscottr#	California, Berkeley and its contributors.
191.1Sscottr# 4. Neither the name of the University nor the names of its contributors
201.1Sscottr#    may be used to endorse or promote products derived from this software
211.1Sscottr#    without specific prior written permission.
221.1Sscottr#
231.1Sscottr# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
241.1Sscottr# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
251.1Sscottr# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
261.1Sscottr# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
271.1Sscottr# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
281.1Sscottr# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
291.1Sscottr# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
301.1Sscottr# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
311.1Sscottr# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
321.1Sscottr# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
331.1Sscottr# SUCH DAMAGE.
341.1Sscottr#
351.1Sscottr#	@(#)genassym.c	7.8 (Berkeley) 5/7/91
361.1Sscottr#
371.1Sscottr
381.13Skleinkinclude "opt_compat_svr4.h"
391.13Skleink
401.1Sscottrinclude	<sys/param.h>
411.1Sscottrinclude	<sys/buf.h>
421.8Sscottrinclude	<sys/map.h>
431.1Sscottrinclude	<sys/mbuf.h>
441.1Sscottrinclude	<sys/msgbuf.h>
451.8Sscottrinclude	<sys/proc.h>
461.1Sscottrinclude	<sys/syscall.h>
471.1Sscottrinclude	<sys/user.h>
481.1Sscottr
491.1Sscottrinclude	<vm/vm.h>
501.9Sscottr
511.9Sscottrinclude <uvm/uvm_extern.h>
521.1Sscottr
531.13Skleinkifdef COMPAT_SVR4
541.13Skleinkinclude <compat/svr4/svr4_syscalls.h>
551.13Skleinkinclude <compat/svr4/svr4_ucontext.h>
561.13Skleinkendif
571.13Skleink
581.1Sscottrinclude	<machine/cpu.h>
591.1Sscottrinclude	<machine/psl.h>
601.1Sscottrinclude	<machine/reg.h>
611.1Sscottrinclude	<machine/pte.h>
621.1Sscottr
631.8Sscottr# machine class
641.8Sscottrdefine	CPUINFO_CLASS		offsetof(struct cpu_model_info, class)
651.8Sscottrdefine	MACH_CLASSAV		MACH_CLASSAV
661.8Sscottr
671.8Sscottr# values for mmutype
681.8Sscottrdefine	MMU_68851		MMU_68851
691.8Sscottrdefine	MMU_68030		MMU_68030
701.8Sscottrdefine	MMU_68040		MMU_68040
711.8Sscottr
721.8Sscottr# values for cputype
731.8Sscottrdefine	CPU_68020		CPU_68020
741.8Sscottrdefine	CPU_68030		CPU_68030
751.8Sscottrdefine	CPU_68040		CPU_68040
761.8Sscottr
771.8Sscottr# values for fputype
781.8Sscottrdefine	FPU_68881		FPU_68881
791.8Sscottrdefine	FPU_68882		FPU_68882
801.8Sscottrdefine	FPU_68040		FPU_68040
811.8Sscottr
821.8Sscottr# general constants
831.8Sscottrdefine	UPAGES			UPAGES
841.8Sscottrdefine	USPACE			USPACE
851.8Sscottrdefine	P1PAGES 		P1PAGES
861.8Sscottrdefine	CLSIZE			CLSIZE
871.8Sscottrdefine	NBPG			NBPG
881.8Sscottrdefine	NPTEPG			NPTEPG
891.8Sscottrdefine	PGSHIFT 		PGSHIFT
901.8Sscottrdefine	SYSPTSIZE		SYSPTSIZE
911.8Sscottrdefine	USRPTSIZE		USRPTSIZE
921.8Sscottrdefine	USRIOSIZE		USRIOSIZE
931.8Sscottrdefine	USRSTACK		USRSTACK
941.8Sscottr
951.8Sscottr# proc fields and values
961.1Sscottrdefine	P_FORW			offsetof(struct proc, p_forw)
971.1Sscottrdefine	P_BACK			offsetof(struct proc, p_back)
981.1Sscottrdefine	P_VMSPACE		offsetof(struct proc, p_vmspace)
991.1Sscottrdefine	P_ADDR			offsetof(struct proc, p_addr)
1001.1Sscottrdefine	P_MD			offsetof(struct proc, p_md)
1011.1Sscottrdefine	P_PID			offsetof(struct proc, p_pid)
1021.1Sscottrdefine	P_PRIORITY		offsetof(struct proc, p_priority)
1031.1Sscottrdefine	P_STAT			offsetof(struct proc, p_stat)
1041.1Sscottrdefine	P_WCHAN 		offsetof(struct proc, p_wchan)
1051.1Sscottrdefine	P_FLAG			offsetof(struct proc, p_flag)
1061.1Sscottrdefine	P_MD_REGS		offsetof(struct proc, p_md.md_regs)
1071.1Sscottrdefine	P_MD_FLAGS		offsetof(struct proc, p_md.md_flags)
1081.1Sscottrdefine	SSLEEP			SSLEEP
1091.1Sscottrdefine	SRUN			SRUN
1101.1Sscottr
1111.8Sscottr# interrupt/fault metering
1121.8Sscottrdefine	UVMEXP_INTRS		offsetof(struct uvmexp, intrs)
1131.1Sscottr
1141.8Sscottr# PSL values (should just include psl.h?)
1151.1Sscottrdefine	PSL_S			PSL_S
1161.1Sscottrdefine	PSL_IPL7		PSL_IPL7
1171.1Sscottrdefine	PSL_LOWIPL		PSL_LOWIPL
1181.1Sscottrdefine	PSL_HIGHIPL		PSL_HIGHIPL
1191.1Sscottrdefine	PSL_USER		PSL_USER
1201.1Sscottrdefine	SPL1			(PSL_S | PSL_IPL1)
1211.1Sscottrdefine	SPL2			(PSL_S | PSL_IPL2)
1221.1Sscottrdefine	SPL3			(PSL_S | PSL_IPL3)
1231.1Sscottrdefine	SPL4			(PSL_S | PSL_IPL4)
1241.1Sscottrdefine	SPL5			(PSL_S | PSL_IPL5)
1251.1Sscottrdefine	SPL6			(PSL_S | PSL_IPL6)
1261.1Sscottr
1271.8Sscottr# magic
1281.1Sscottrdefine	FC_USERD		FC_USERD
1291.1Sscottrdefine	FC_SUPERD		FC_SUPERD
1301.1Sscottrdefine	CACHE_ON		CACHE_ON
1311.1Sscottrdefine	CACHE_OFF		CACHE_OFF
1321.1Sscottrdefine	CACHE_CLR		CACHE_CLR
1331.1Sscottrdefine	CACHE40_ON		CACHE40_ON
1341.1Sscottrdefine	CACHE40_OFF		CACHE40_OFF
1351.1Sscottrdefine	IC_CLEAR		IC_CLEAR
1361.1Sscottrdefine	DC_CLEAR		DC_CLEAR
1371.1Sscottr
1381.8Sscottr# pte/ste bits
1391.1Sscottrdefine	PG_FRAME		PG_FRAME
1401.1Sscottr
1411.8Sscottr# pcb fields
1421.1Sscottrdefine	SIZEOF_PCB		sizeof(struct pcb)
1431.1Sscottrdefine	PCB_FLAGS		offsetof(struct pcb, pcb_flags)
1441.1Sscottrdefine	PCB_PS			offsetof(struct pcb, pcb_ps)
1451.1Sscottrdefine	PCB_USP 		offsetof(struct pcb, pcb_usp)
1461.1Sscottrdefine	PCB_REGS		offsetof(struct pcb, pcb_regs)
1471.1Sscottrdefine	PCB_ONFAULT		offsetof(struct pcb, pcb_onfault)
1481.1Sscottrdefine	PCB_FPCTX		offsetof(struct pcb, pcb_fpregs)
1491.1Sscottrdefine	PCB_TRCB		5
1501.1Sscottr
1511.8Sscottr# exception frame offset/sizes
1521.1Sscottrdefine	FR_SP			offsetof(struct frame, f_regs[15])
1531.1Sscottrdefine	FR_HW			offsetof(struct frame, f_sr)
1541.1Sscottrdefine	FR_ADJ			offsetof(struct frame, f_stackadj)
1551.8Sscottrdefine	FR_SIZE			sizeof(struct trapframe)
1561.1Sscottr
1571.8Sscottr# system calls
1581.8Sscottrdefine	SYS_exit		SYS_exit
1591.8Sscottrdefine	SYS_execve		SYS_execve
1601.10Sthorpejdefine	SYS___sigreturn14	SYS___sigreturn14
1611.11Sthorpejdefine	SYS_compat_13_sigreturn13 SYS_compat_13_sigreturn13
1621.1Sscottr
1631.8Sscottr# errno
1641.1Sscottrdefine	ENOENT			ENOENT
1651.1Sscottrdefine	EFAULT			EFAULT
1661.1Sscottrdefine	ENAMETOOLONG		ENAMETOOLONG
1671.13Skleink
1681.13Skleink# SVR4 binary compatibility
1691.13Skleinkifdef COMPAT_SVR4
1701.13Skleinkdefine SVR4_SIGF_HANDLER	offsetof(struct svr4_sigframe, sf_handler)
1711.13Skleinkdefine SVR4_SIGF_UC		offsetof(struct svr4_sigframe, sf_uc)
1721.13Skleinkdefine SVR4_SYS_context		SVR4_SYS_context
1731.13Skleinkdefine SVR4_SYS_exit		SVR4_SYS_exit
1741.13Skleinkdefine SVR4_SETCONTEXT		SVR4_SETCONTEXT
1751.13Skleinkendif
176