diff options
author | jake <jake@FreeBSD.org> | 2001-08-10 04:22:24 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2001-08-10 04:22:24 +0000 |
commit | 46fd39a86697e1ce34cb9c0437329d1befec1ceb (patch) | |
tree | 44192be2daa8775c5d0713f5d34a82bdccee4570 | |
parent | 636a22e19d1dd9c8a0746bc8195a5d37de6c1a15 (diff) | |
download | FreeBSD-src-46fd39a86697e1ce34cb9c0437329d1befec1ceb.zip FreeBSD-src-46fd39a86697e1ce34cb9c0437329d1befec1ceb.tar.gz |
Add trap types for interrupts. Ad definitions to get the interrupt level
from the trap type.
-rw-r--r-- | sys/sparc64/include/trap.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/sys/sparc64/include/trap.h b/sys/sparc64/include/trap.h index fcd4ee6..769a3eb 100644 --- a/sys/sparc64/include/trap.h +++ b/sys/sparc64/include/trap.h @@ -50,19 +50,31 @@ #define T_ALIGN_LDDF 0x12 #define T_ALIGN_STDF 0x13 #define T_PRIV_ACTION 0x14 -#define T_INTERRUPT 0x15 +#define T_INTR 0x15 #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 -#define T_SPILL 0x1c -#define T_FILL 0x1d -#define T_BREAKPOINT 0x1e - +#define T_CLOCK 0x1c +#define T_SPILL 0x1d +#define T_FILL 0x1e +#define T_BREAKPOINT 0x1f #define T_KERNEL 0x20 +#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) + #ifndef LOCORE extern const char *trap_msg[]; #endif |