/*
 * $Header: /smsa/bsd:include/arm/trap.h:bsd  1.6  $
 * $Source: /smsa/bsd:include/arm/trap.h: $
 *
 * Copyright (c) 1988 Acorn Computers Ltd., Cambridge, England
 *
 */
/*
 * Copyright (c) 1982, 1986 Regents of the University of California.
 * All rights reserved.  The Berkeley software License Agreement
 * specifies the terms and conditions for redistribution.
 *
 *	@(#)trap.h	7.1 (Berkeley) 6/5/86
 */

#ifndef __arm_trap_h
#define __arm_trap_h
#define __machine_trap_h	"arm"

/*
 * Trap type values
 */

/* The first three constant values are known to the real world <signal.h> */
#define	T_RESADFLT	0		/* reserved addressing fault */
/* #defineT_PRIVINFLT	1 */		/* privileged instruction fault */
#define	T_RESOPFLT	2		/* reserved operand fault */
/* End of known constants */
#define	T_BPTFLT	3		/* bpt instruction fault */
#define	T_XFCFLT	4		/* xfc instruction fault */
#define	T_SYSCALL	5		/* chmk instruction (syscall trap) */
#define	T_ARITHTRAP	6		/* arithmetic trap */
#define	T_ASTFLT	7		/* software level 2 trap (ast deliv) */
#define	T_SEGFLT	8		/* segmentation fault */
#define	T_PROTFLT	9		/* protection fault */
#define	T_TRCTRAP	10		/* trace trap */
#define	T_COMPATFLT	11		/* compatibility mode fault */
#define	T_PAGEFLT	12		/* page fault */
#define	T_TABLEFLT	13		/* page table fault */

#define	T_INSFLT	2		/* illegal instruction fault ARM */
#define	T_FPEINSFLT	3		/* 'fpe' returned INSFLT */
#define	T_FPEFPEFLT	4		/* 'fpe' returned FPEFLT */
#define	T_PREFETCHFLT	14		/* pre-fetch fault ARM */
#define	T_DATAFLT	15		/* data fault ARM */
#define	T_ADDRFLT	16		/* address exception ARM */
#define	T_FPDISABLEDFLT	17		/* FP not enabled fault */

#define	T_USER		040		/* user mode flag */

/* Fields in SWI numbers */
#define SWI_OS		0x00f00000	/* Operating system id field */
#define SWI_OS_ARTHUR	0x00000000	/* Arthur is OS 0 */
#define SWI_OS_UNIX	0x00100000	/* Unix is OS 1 */
#define SWI_PTRACE	0x00080000	/* Flag for bpt and single-step SWIs */
#define SWI_SYSCALLNO	0x0007ffff	/* Unix system call number field */

#endif/*__arm_trap_h*/

/* EOF trap.h */
