Path: blob/master/arch/mn10300/include/asm/exceptions.h
15126 views
/* MN10300 Microcontroller core exceptions1*2* Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.3* Written by David Howells ([email protected])4*5* This program is free software; you can redistribute it and/or6* modify it under the terms of the GNU General Public Licence7* as published by the Free Software Foundation; either version8* 2 of the Licence, or (at your option) any later version.9*/10#ifndef _ASM_EXCEPTIONS_H11#define _ASM_EXCEPTIONS_H1213#include <linux/linkage.h>1415/*16* define the breakpoint instruction opcode to use17* - note that the JTAG unit steals 0xFF, so you can't use JTAG and GDBSTUB at18* the same time.19*/20#define GDBSTUB_BKPT 0xFF2122#ifndef __ASSEMBLY__2324/*25* enumeration of exception codes (as extracted from TBR MSW)26*/27enum exception_code {28EXCEP_RESET = 0x000000, /* reset */2930/* MMU exceptions */31EXCEP_ITLBMISS = 0x000100, /* instruction TLB miss */32EXCEP_DTLBMISS = 0x000108, /* data TLB miss */33EXCEP_IAERROR = 0x000110, /* instruction address */34EXCEP_DAERROR = 0x000118, /* data address */3536/* system exceptions */37EXCEP_TRAP = 0x000128, /* program interrupt (PI instruction) */38EXCEP_ISTEP = 0x000130, /* single step */39EXCEP_IBREAK = 0x000150, /* instruction breakpoint */40EXCEP_OBREAK = 0x000158, /* operand breakpoint */41EXCEP_PRIVINS = 0x000160, /* privileged instruction execution */42EXCEP_UNIMPINS = 0x000168, /* unimplemented instruction execution */43EXCEP_UNIMPEXINS = 0x000170, /* unimplemented extended instruction execution */44EXCEP_MEMERR = 0x000178, /* illegal memory access */45EXCEP_MISALIGN = 0x000180, /* misalignment */46EXCEP_BUSERROR = 0x000188, /* bus error */47EXCEP_ILLINSACC = 0x000190, /* illegal instruction access */48EXCEP_ILLDATACC = 0x000198, /* illegal data access */49EXCEP_IOINSACC = 0x0001a0, /* I/O space instruction access */50EXCEP_PRIVINSACC = 0x0001a8, /* privileged space instruction access */51EXCEP_PRIVDATACC = 0x0001b0, /* privileged space data access */52EXCEP_DATINSACC = 0x0001b8, /* data space instruction access */53EXCEP_DOUBLE_FAULT = 0x000200, /* double fault */5455/* FPU exceptions */56EXCEP_FPU_DISABLED = 0x0001c0, /* FPU disabled */57EXCEP_FPU_UNIMPINS = 0x0001c8, /* FPU unimplemented operation */58EXCEP_FPU_OPERATION = 0x0001d0, /* FPU operation */5960/* interrupts */61EXCEP_WDT = 0x000240, /* watchdog timer overflow */62EXCEP_NMI = 0x000248, /* non-maskable interrupt */63EXCEP_IRQ_LEVEL0 = 0x000280, /* level 0 maskable interrupt */64EXCEP_IRQ_LEVEL1 = 0x000288, /* level 1 maskable interrupt */65EXCEP_IRQ_LEVEL2 = 0x000290, /* level 2 maskable interrupt */66EXCEP_IRQ_LEVEL3 = 0x000298, /* level 3 maskable interrupt */67EXCEP_IRQ_LEVEL4 = 0x0002a0, /* level 4 maskable interrupt */68EXCEP_IRQ_LEVEL5 = 0x0002a8, /* level 5 maskable interrupt */69EXCEP_IRQ_LEVEL6 = 0x0002b0, /* level 6 maskable interrupt */7071/* system calls */72EXCEP_SYSCALL0 = 0x000300, /* system call 0 */73EXCEP_SYSCALL1 = 0x000308, /* system call 1 */74EXCEP_SYSCALL2 = 0x000310, /* system call 2 */75EXCEP_SYSCALL3 = 0x000318, /* system call 3 */76EXCEP_SYSCALL4 = 0x000320, /* system call 4 */77EXCEP_SYSCALL5 = 0x000328, /* system call 5 */78EXCEP_SYSCALL6 = 0x000330, /* system call 6 */79EXCEP_SYSCALL7 = 0x000338, /* system call 7 */80EXCEP_SYSCALL8 = 0x000340, /* system call 8 */81EXCEP_SYSCALL9 = 0x000348, /* system call 9 */82EXCEP_SYSCALL10 = 0x000350, /* system call 10 */83EXCEP_SYSCALL11 = 0x000358, /* system call 11 */84EXCEP_SYSCALL12 = 0x000360, /* system call 12 */85EXCEP_SYSCALL13 = 0x000368, /* system call 13 */86EXCEP_SYSCALL14 = 0x000370, /* system call 14 */87EXCEP_SYSCALL15 = 0x000378, /* system call 15 */88};8990extern void __set_intr_stub(enum exception_code code, void *handler);91extern void set_intr_stub(enum exception_code code, void *handler);9293struct pt_regs;9495extern asmlinkage void __common_exception(void);96extern asmlinkage void itlb_miss(void);97extern asmlinkage void dtlb_miss(void);98extern asmlinkage void itlb_aerror(void);99extern asmlinkage void dtlb_aerror(void);100extern asmlinkage void raw_bus_error(void);101extern asmlinkage void double_fault(void);102extern asmlinkage int system_call(struct pt_regs *);103extern asmlinkage void nmi(struct pt_regs *, enum exception_code);104extern asmlinkage void uninitialised_exception(struct pt_regs *,105enum exception_code);106extern asmlinkage void irq_handler(void);107extern asmlinkage void profile_handler(void);108extern asmlinkage void nmi_handler(void);109extern asmlinkage void misalignment(struct pt_regs *, enum exception_code);110111extern void die(const char *, struct pt_regs *, enum exception_code)112ATTRIB_NORET;113114extern int die_if_no_fixup(const char *, struct pt_regs *, enum exception_code);115116#define NUM2EXCEP_IRQ_LEVEL(num) (EXCEP_IRQ_LEVEL0 + (num) * 8)117118#endif /* __ASSEMBLY__ */119120#endif /* _ASM_EXCEPTIONS_H */121122123