genassym.cf revision 1.45
11.45Sthorpej#	$NetBSD: genassym.cf,v 1.45 2024/01/09 04:16:25 thorpej 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.32Stsutsui# 3. Neither the name of the University nor the names of its contributors
161.1Sscottr#    may be used to endorse or promote products derived from this software
171.1Sscottr#    without specific prior written permission.
181.1Sscottr#
191.1Sscottr# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
201.1Sscottr# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
211.1Sscottr# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
221.1Sscottr# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
231.1Sscottr# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
241.1Sscottr# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
251.1Sscottr# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
261.1Sscottr# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
271.1Sscottr# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
281.1Sscottr# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
291.1Sscottr# SUCH DAMAGE.
301.1Sscottr#
311.1Sscottr#	@(#)genassym.c	7.8 (Berkeley) 5/7/91
321.1Sscottr#
331.1Sscottr
341.1Sscottrinclude	<sys/param.h>
351.1Sscottrinclude	<sys/buf.h>
361.1Sscottrinclude	<sys/mbuf.h>
371.1Sscottrinclude	<sys/msgbuf.h>
381.8Sscottrinclude	<sys/proc.h>
391.1Sscottrinclude	<sys/syscall.h>
401.9Sscottr
411.9Sscottrinclude <uvm/uvm_extern.h>
421.1Sscottr
431.1Sscottrinclude	<machine/cpu.h>
441.43Sthorpejinclude <machine/fcode.h>
451.1Sscottrinclude	<machine/psl.h>
461.36Srmindinclude	<machine/pcb.h>
471.1Sscottrinclude	<machine/pte.h>
481.1Sscottr
491.8Sscottr# machine class
501.8Sscottrdefine	CPUINFO_CLASS		offsetof(struct cpu_model_info, class)
511.8Sscottrdefine	MACH_CLASSAV		MACH_CLASSAV
521.8Sscottr
531.8Sscottr# values for mmutype
541.8Sscottrdefine	MMU_68851		MMU_68851
551.8Sscottrdefine	MMU_68030		MMU_68030
561.8Sscottrdefine	MMU_68040		MMU_68040
571.8Sscottr
581.8Sscottr# values for cputype
591.8Sscottrdefine	CPU_68020		CPU_68020
601.8Sscottrdefine	CPU_68030		CPU_68030
611.8Sscottrdefine	CPU_68040		CPU_68040
621.8Sscottr
631.8Sscottr# values for fputype
641.8Sscottrdefine	FPU_68881		FPU_68881
651.8Sscottrdefine	FPU_68882		FPU_68882
661.8Sscottrdefine	FPU_68040		FPU_68040
671.8Sscottr
681.8Sscottr# general constants
691.8Sscottrdefine	UPAGES			UPAGES
701.8Sscottrdefine	USPACE			USPACE
711.8Sscottrdefine	P1PAGES 		P1PAGES
721.25Sthorpejdefine	PAGE_SIZE		PAGE_SIZE
731.8Sscottrdefine	NPTEPG			NPTEPG
741.8Sscottrdefine	PGSHIFT 		PGSHIFT
751.8Sscottrdefine	USRIOSIZE		USRIOSIZE
761.8Sscottrdefine	USRSTACK		USRSTACK
771.8Sscottr
781.42Sthorpej# MMU configuration constants (from pmap.h)
791.42Sthorpejexport	MMU51_SRP_BITS
801.42Sthorpejexport	MMU51_CRP_BITS
811.42Sthorpejexport	MMU51_TCR_BITS
821.42Sthorpejexport	MMU40_TCR_BITS
831.42Sthorpej
841.45Sthorpejdefine	M68K_MMU_MOTOROLA	1
851.45Sthorpej
861.44Sthorpej# Transparent translation register values (from pmap.h)
871.44Sthorpejexport	MAC68K_TT_GET_PTE
881.44Sthorpej
891.24Sthorpej# lwp & proc fields and values
901.34Srminddefine	L_PCB			offsetof(struct lwp, l_addr)
911.24Sthorpejdefine	L_PROC			offsetof(struct lwp, l_proc)
921.24Sthorpejdefine	L_MD_REGS		offsetof(struct lwp, l_md.md_regs)
931.24Sthorpejdefine	L_MD_FLAGS		offsetof(struct lwp, l_md.md_flags)
941.24Sthorpejdefine	P_FLAG			offsetof(struct proc, p_flag)
951.27Sdsldefine	P_RASLIST		offsetof(struct proc, p_raslist)
961.1Sscottrdefine	P_VMSPACE		offsetof(struct proc, p_vmspace)
971.24Sthorpej
981.8Sscottr# interrupt/fault metering
991.35Smattdefine	CI_NINTR		offsetof(struct cpu_info, ci_data.cpu_nintr)
1001.1Sscottr
1011.24Sthorpej#mE PSL values (should just include psl.h?)
1021.1Sscottrdefine	PSL_S			PSL_S
1031.1Sscottrdefine	PSL_IPL7		PSL_IPL7
1041.1Sscottrdefine	PSL_LOWIPL		PSL_LOWIPL
1051.1Sscottrdefine	PSL_HIGHIPL		PSL_HIGHIPL
1061.1Sscottrdefine	PSL_USER		PSL_USER
1071.16Sscottrdefine	PSL_TS			(PSL_T | PSL_S)
1081.1Sscottrdefine	SPL1			(PSL_S | PSL_IPL1)
1091.1Sscottrdefine	SPL2			(PSL_S | PSL_IPL2)
1101.1Sscottrdefine	SPL3			(PSL_S | PSL_IPL3)
1111.1Sscottrdefine	SPL4			(PSL_S | PSL_IPL4)
1121.1Sscottrdefine	SPL5			(PSL_S | PSL_IPL5)
1131.1Sscottrdefine	SPL6			(PSL_S | PSL_IPL6)
1141.29Stsutsuidefine	IPL_CLOCK		IPL_CLOCK
1151.1Sscottr
1161.8Sscottr# magic
1171.1Sscottrdefine	FC_USERD		FC_USERD
1181.1Sscottrdefine	FC_SUPERD		FC_SUPERD
1191.1Sscottrdefine	CACHE_ON		CACHE_ON
1201.1Sscottrdefine	CACHE_OFF		CACHE_OFF
1211.1Sscottrdefine	CACHE_CLR		CACHE_CLR
1221.1Sscottrdefine	CACHE40_ON		CACHE40_ON
1231.1Sscottrdefine	CACHE40_OFF		CACHE40_OFF
1241.1Sscottrdefine	IC_CLEAR		IC_CLEAR
1251.1Sscottrdefine	DC_CLEAR		DC_CLEAR
1261.1Sscottr
1271.8Sscottr# pte/ste bits
1281.1Sscottrdefine	PG_FRAME		PG_FRAME
1291.1Sscottr
1301.8Sscottr# pcb fields
1311.1Sscottrdefine	SIZEOF_PCB		sizeof(struct pcb)
1321.1Sscottrdefine	PCB_FLAGS		offsetof(struct pcb, pcb_flags)
1331.1Sscottrdefine	PCB_PS			offsetof(struct pcb, pcb_ps)
1341.1Sscottrdefine	PCB_USP 		offsetof(struct pcb, pcb_usp)
1351.1Sscottrdefine	PCB_REGS		offsetof(struct pcb, pcb_regs)
1361.1Sscottrdefine	PCB_ONFAULT		offsetof(struct pcb, pcb_onfault)
1371.1Sscottrdefine	PCB_FPCTX		offsetof(struct pcb, pcb_fpregs)
1381.1Sscottrdefine	PCB_TRCB		5
1391.24Sthorpej
1401.24Sthorpej# frame offsets
1411.24Sthorpejdefine	TF_PC			offsetof(struct frame, f_pc)
1421.1Sscottr
1431.8Sscottr# exception frame offset/sizes
1441.1Sscottrdefine	FR_SP			offsetof(struct frame, f_regs[15])
1451.1Sscottrdefine	FR_HW			offsetof(struct frame, f_sr)
1461.1Sscottrdefine	FR_ADJ			offsetof(struct frame, f_stackadj)
1471.8Sscottrdefine	FR_SIZE			sizeof(struct trapframe)
1481.20Stsutsui
1491.20Stsutsui# FP frame offsets
1501.20Stsutsuidefine	FPF_REGS		offsetof(struct fpframe, fpf_regs[0])
1511.20Stsutsuidefine	FPF_FPCR		offsetof(struct fpframe, fpf_fpcr)
1521.1Sscottr
1531.8Sscottr# system calls
1541.8Sscottrdefine	SYS_exit		SYS_exit
1551.8Sscottrdefine	SYS_execve		SYS_execve
1561.26Scldefine	SYS_compat_16___sigreturn14	SYS_compat_16___sigreturn14
1571.11Sthorpejdefine	SYS_compat_13_sigreturn13 SYS_compat_13_sigreturn13
1581.1Sscottr
1591.8Sscottr# errno
1601.1Sscottrdefine	ENOENT			ENOENT
1611.1Sscottrdefine	EFAULT			EFAULT
1621.1Sscottrdefine	ENAMETOOLONG		ENAMETOOLONG
1631.13Skleink
1641.37Sjklos# machine ids
1651.37Sjklosdefine MACH_MACC610		MACH_MACC610
1661.37Sjklosdefine MACH_MACQ610		MACH_MACQ610
1671.37Sjklosdefine MACH_MACC650		MACH_MACC650
1681.37Sjklosdefine MACH_MACQ650		MACH_MACQ650
1691.37Sjklosdefine MACH_MACQ800		MACH_MACQ800
170