genassym.cf revision 1.3
11.3Sgwr#	$NetBSD: genassym.cf,v 1.3 1997/05/13 18:01:11 gwr Exp $
21.1Smycroft
31.1Smycroft#
41.1Smycroft# Copyright (c) 1982, 1990, 1993
51.1Smycroft#	The Regents of the University of California.  All rights reserved.
61.1Smycroft#
71.1Smycroft# Redistribution and use in source and binary forms, with or without
81.1Smycroft# modification, are permitted provided that the following conditions
91.1Smycroft# are met:
101.1Smycroft# 1. Redistributions of source code must retain the above copyright
111.1Smycroft#    notice, this list of conditions and the following disclaimer.
121.1Smycroft# 2. Redistributions in binary form must reproduce the above copyright
131.1Smycroft#    notice, this list of conditions and the following disclaimer in the
141.1Smycroft#    documentation and/or other materials provided with the distribution.
151.1Smycroft# 3. All advertising materials mentioning features or use of this software
161.1Smycroft#    must display the following acknowledgement:
171.1Smycroft#	This product includes software developed by the University of
181.1Smycroft#	California, Berkeley and its contributors.
191.1Smycroft# 4. Neither the name of the University nor the names of its contributors
201.1Smycroft#    may be used to endorse or promote products derived from this software
211.1Smycroft#    without specific prior written permission.
221.1Smycroft#
231.1Smycroft# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
241.1Smycroft# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
251.1Smycroft# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
261.1Smycroft# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
271.1Smycroft# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
281.1Smycroft# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
291.1Smycroft# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
301.1Smycroft# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
311.1Smycroft# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
321.1Smycroft# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
331.1Smycroft# SUCH DAMAGE.
341.1Smycroft#
351.1Smycroft#	@(#)genassym.c	8.3 (Berkeley) 1/4/94
361.1Smycroft#
371.1Smycroft
381.1Smycroftinclude <sys/param.h>
391.1Smycroftinclude <sys/buf.h>
401.1Smycroftinclude <sys/map.h>
411.1Smycroftinclude <sys/proc.h>
421.1Smycroftinclude <sys/mbuf.h>
431.1Smycroftinclude <sys/msgbuf.h>
441.1Smycroftinclude <sys/syscall.h>
451.1Smycroftinclude <sys/user.h>
461.1Smycroft
471.1Smycroftinclude <vm/vm.h>
481.1Smycroft
491.1Smycroftinclude <machine/cpu.h>
501.1Smycroftinclude <machine/psl.h>
511.1Smycroftinclude <machine/reg.h>
521.1Smycroftinclude <machine/prom.h>
531.1Smycroftinclude <machine/pte.h>
541.1Smycroftinclude <mvme68k/mvme68k/clockreg.h>
551.1Smycroft
561.1Smycroftdefine	__XXX_BUG_FODDER	0
571.1Smycroft
581.1Smycroft# CPU options
591.1Smycroftifdef M68020
601.1Smycroftdefine	M68020			1
611.1Smycroftendif
621.1Smycroftifdef M68030
631.1Smycroftdefine	M68030			1
641.1Smycroftendif
651.1Smycroftifdef M68040
661.1Smycroftdefine	M68040			1
671.1Smycroftendif
681.1Smycroftifdef M68060
691.1Smycroftdefine	M68060			1
701.1Smycroftendif
711.1Smycroft
721.1Smycroft# MMU options
731.1Smycroftdefine	M68K_MMU_MOTOROLA	1
741.1Smycroft
751.1Smycroft# values for mmutype
761.1Smycroftdefine	MMU_68060		MMU_68060
771.1Smycroftdefine	MMU_68040		MMU_68040
781.1Smycroftdefine	MMU_68030		MMU_68030
791.1Smycroftdefine	MMU_68851		MMU_68851
801.1Smycroft
811.1Smycroft# values for cputype
821.1Smycroftdefine	CPU_68020		CPU_68020
831.1Smycroftdefine	CPU_68030		CPU_68030
841.1Smycroftdefine	CPU_68040		CPU_68040
851.1Smycroftdefine	CPU_68060		CPU_68060
861.1Smycroft
871.1Smycroft# values for machineid
881.1Smycroftdefine	MVME_147		MVME_147
891.1Smycroftdefine	MVME_162		MVME_162
901.1Smycroftdefine	MVME_166		MVME_166
911.1Smycroftdefine	MVME_167		MVME_167
921.1Smycroftdefine	MVME_172		MVME_172
931.1Smycroftdefine	MVME_177		MVME_177
941.1Smycroft
951.1Smycroft# values for ectype
961.1Smycroftdefine	EC_PHYS			EC_PHYS
971.1Smycroftdefine	EC_NONE			EC_NONE
981.1Smycroftdefine	EC_VIRT			EC_VIRT
991.1Smycroft
1001.1Smycroftdefine	UPAGES			UPAGES
1011.1Smycroftdefine	USPACE			USPACE
1021.1Smycroftdefine	NBPG			NBPG
1031.1Smycroftdefine	PGSHIFT			PGSHIFT
1041.1Smycroftdefine	USRSTACK		USRSTACK
1051.1Smycroft
1061.1Smycroft# boot stuff
1071.1Smycroftdefine	RB_SBOOT		RB_SBOOT
1081.1Smycroft
1091.1Smycroft# Bug stuff
1101.1Smycroftdefine	MVMEPROM_EXIT		MVMEPROM_EXIT
1111.1Smycroftdefine	MVMEPROM_GETBRDID	MVMEPROM_GETBRDID
1121.1Smycroftdefine	MVMEPROM_OUTSTRCRLF	MVMEPROM_OUTSTRCRLF
1131.1Smycroftdefine	MVMEPROM_BRDID_SIZE	sizeof(struct mvmeprom_brdid)
1141.1Smycroftdefine	MVMEPROM_BRDID_MODEL_OFFSET	offsetof(struct mvmeprom_brdid, model)
1151.1Smycroft
1161.1Smycroft# proc fields and values
1171.1Smycroftdefine	P_FORW			offsetof(struct proc, p_forw)
1181.1Smycroftdefine	P_BACK			offsetof(struct proc, p_back)
1191.1Smycroftdefine	P_VMSPACE		offsetof(struct proc, p_vmspace)
1201.1Smycroftdefine	P_ADDR			offsetof(struct proc, p_addr)
1211.1Smycroftdefine	P_PRIORITY		offsetof(struct proc, p_priority)
1221.1Smycroftdefine	P_STAT			offsetof(struct proc, p_stat)
1231.1Smycroftdefine	P_WCHAN			offsetof(struct proc, p_wchan)
1241.1Smycroftdefine	P_FLAG			offsetof(struct proc, p_flag)
1251.1Smycroftdefine	P_MD_FLAGS		offsetof(struct proc, p_md.md_flags)
1261.1Smycroftdefine	P_MD_REGS		offsetof(struct proc, p_md.md_regs)
1271.1Smycroft
1281.1Smycroftdefine	SSLEEP			SSLEEP
1291.1Smycroftdefine	SRUN			SRUN
1301.1Smycroft
1311.1Smycroft# VM structure fields
1321.3Sgwrdefine	VM_PMAP			offsetof(struct vmspace, vm_map.pmap)
1331.1Smycroftdefine	PM_STCHG		offsetof(struct pmap, pm_stchanged)
1341.1Smycroft
1351.1Smycroft# interrupt/fault metering
1361.1Smycroftdefine	V_INTR			offsetof(struct vmmeter, v_intr)
1371.1Smycroft
1381.1Smycroft# PSL values (should just include psl.h?)
1391.1Smycroftdefine	PSL_S			PSL_S
1401.1Smycroftdefine	PSL_IPL7		PSL_IPL7
1411.1Smycroftdefine	PSL_LOWIPL		PSL_LOWIPL
1421.1Smycroftdefine	PSL_HIGHIPL		PSL_HIGHIPL
1431.1Smycroftdefine	PSL_USER		PSL_USER
1441.1Smycroftdefine	SPL1			PSL_S | PSL_IPL1
1451.1Smycroftdefine	SPL2			PSL_S | PSL_IPL2
1461.1Smycroftdefine	SPL3			PSL_S | PSL_IPL3
1471.1Smycroftdefine	SPL4			PSL_S | PSL_IPL4
1481.1Smycroftdefine	SPL5			PSL_S | PSL_IPL5
1491.1Smycroftdefine	SPL6			PSL_S | PSL_IPL6
1501.1Smycroft
1511.1Smycroft# magic
1521.1Smycroftdefine	FC_USERD		FC_USERD
1531.1Smycroftdefine	INTIOBASE		INTIOBASE
1541.1Smycroftdefine	IIOMAPSIZE		IIOMAPSIZE
1551.1Smycroftdefine	CACHE_ON		CACHE_ON
1561.1Smycroftdefine	CACHE_OFF		CACHE_OFF
1571.1Smycroftdefine	CACHE_CLR		CACHE_CLR
1581.1Smycroftdefine	IC_CLEAR		IC_CLEAR
1591.1Smycroftdefine	DC_CLEAR		DC_CLEAR
1601.1Smycroft
1611.1Smycroft# pte/ste bits
1621.1Smycroftdefine	PG_V			PG_V
1631.1Smycroftdefine	PG_NV			PG_NV
1641.1Smycroftdefine	PG_RO			PG_RO
1651.1Smycroftdefine	PG_RW			PG_RW
1661.1Smycroftdefine	PG_CI			PG_CI
1671.1Smycroftdefine	PG_PROT			PG_PROT
1681.1Smycroftdefine	PG_FRAME		PG_FRAME
1691.1Smycroftdefine	SG_V			SG_V
1701.1Smycroftdefine	SG_NV			SG_NV
1711.1Smycroftdefine	SG_RW			SG_RW
1721.1Smycroftdefine	SG_FRAME		SG_FRAME
1731.1Smycroftdefine	SG_ISHIFT		SG_ISHIFT
1741.1Smycroft
1751.1Smycroft# pcb fields
1761.1Smycroftdefine	PCB_PS			offsetof(struct pcb, pcb_ps)
1771.1Smycroftdefine	PCB_USTP		offsetof(struct pcb, pcb_ustp)
1781.1Smycroftdefine	PCB_USP			offsetof(struct pcb, pcb_usp)
1791.1Smycroftdefine	PCB_REGS		offsetof(struct pcb, pcb_regs)
1801.1Smycroftdefine	PCB_ONFAULT		offsetof(struct pcb, pcb_onfault)
1811.1Smycroftdefine	PCB_FPCTX		offsetof(struct pcb, pcb_fpregs)
1821.1Smycroftdefine	SIZEOF_PCB		sizeof(struct pcb)
1831.1Smycroft
1841.1Smycroft# exception frame offset/sizes
1851.1Smycroftdefine	FR_SP			offsetof(struct frame, f_regs[15])
1861.1Smycroftdefine	FR_HW			offsetof(struct frame, f_sr)
1871.1Smycroftdefine	FR_ADJ			offsetof(struct frame, f_stackadj)
1881.1Smycroft
1891.1Smycroft# system calls
1901.1Smycroftdefine	SYS_exit		SYS_exit
1911.1Smycroftdefine	SYS_execve		SYS_execve
1921.1Smycroftdefine	SYS_sigreturn		SYS_sigreturn
1931.1Smycroft
1941.1Smycroft# errno
1951.1Smycroftdefine	EFAULT			EFAULT
1961.1Smycroftdefine	ENAMETOOLONG		ENAMETOOLONG
197