2001-07-31 06:05:05 +00:00
|
|
|
/*-
|
|
|
|
* Copyright (c) 2001 Jake Burkholder.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
*
|
2001-08-09 02:09:34 +00:00
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
2001-07-31 06:05:05 +00:00
|
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
2001-08-09 02:09:34 +00:00
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
2001-07-31 06:05:05 +00:00
|
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
* SUCH DAMAGE.
|
|
|
|
*
|
|
|
|
* $FreeBSD$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _MACHINE_TRAP_H_
|
|
|
|
#define _MACHINE_TRAP_H_
|
|
|
|
|
|
|
|
#define T_RESERVED 0x0
|
|
|
|
#define T_POWER_ON 0x1
|
|
|
|
#define T_WATCHDOG 0x2
|
|
|
|
#define T_RESET_EXT 0x3
|
|
|
|
#define T_RESET_SOFT 0x4
|
|
|
|
#define T_RED_STATE 0x5
|
|
|
|
#define T_INSN_EXCPTN 0x6
|
|
|
|
#define T_INSN_ERROR 0x7
|
|
|
|
#define T_INSN_ILLEGAL 0x8
|
|
|
|
#define T_PRIV_OPCODE 0x9
|
|
|
|
#define T_FP_DISABLED 0xa
|
|
|
|
#define T_FP_IEEE 0xb
|
|
|
|
#define T_FP_OTHER 0xc
|
|
|
|
#define T_TAG_OVFLW 0xd
|
|
|
|
#define T_DIVIDE 0xe
|
|
|
|
#define T_DATA_EXCPTN 0xf
|
|
|
|
#define T_DATA_ERROR 0x10
|
|
|
|
#define T_ALIGN 0x11
|
|
|
|
#define T_ALIGN_LDDF 0x12
|
|
|
|
#define T_ALIGN_STDF 0x13
|
|
|
|
#define T_PRIV_ACTION 0x14
|
2001-08-10 04:22:24 +00:00
|
|
|
#define T_INTR 0x15
|
2001-07-31 06:05:05 +00:00
|
|
|
#define T_WATCH_PHYS 0x16
|
|
|
|
#define T_WATCH_VIRT 0x17
|
|
|
|
#define T_ECC 0x18
|
|
|
|
#define T_IMMU_MISS 0x19
|
|
|
|
#define T_DMMU_MISS 0x1a
|
|
|
|
#define T_DMMU_PROT 0x1b
|
2001-08-10 04:22:24 +00:00
|
|
|
#define T_CLOCK 0x1c
|
|
|
|
#define T_SPILL 0x1d
|
|
|
|
#define T_FILL 0x1e
|
|
|
|
#define T_BREAKPOINT 0x1f
|
2001-07-31 06:05:05 +00:00
|
|
|
#define T_KERNEL 0x20
|
|
|
|
|
2001-08-10 04:22:24 +00:00
|
|
|
#define T_TYPE_SHIFT 0
|
|
|
|
#define T_TYPE_SIZE 6
|
|
|
|
#define T_TYPE_MASK (((1 << T_TYPE_SIZE) - 1) << T_TYPE_SHIFT)
|
|
|
|
#define T_TYPE(type) \
|
|
|
|
(((type) & T_TYPE_MASK) >> T_TYPE_SHIFT)
|
|
|
|
|
|
|
|
#define T_LEVEL_SHIFT T_TYPE_SIZE
|
|
|
|
#define T_LEVEL_SIZE 4
|
|
|
|
#define T_LEVEL_MASK (((1 << T_LEVEL_SIZE) - 1) << T_LEVEL_SHIFT)
|
|
|
|
#define T_LEVEL(type) \
|
|
|
|
(((type) & T_LEVEL_MASK) >> T_LEVEL_SHIFT)
|
|
|
|
|
2001-07-31 06:05:05 +00:00
|
|
|
#ifndef LOCORE
|
|
|
|
extern const char *trap_msg[];
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* !_MACHINE_TRAP_H_ */
|