openrisc_exc.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * (C) Copyright 2011, Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License as
  6. * published by the Free Software Foundation; either version 2 of
  7. * the License, or (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  17. * MA 02111-1307 USA
  18. */
  19. #ifndef _OPENRISC_EXC_H_
  20. #define _OPENRISC_EXC_H_
  21. #define EXC_RESET 0x01
  22. #define EXC_BUS_ERROR 0x02
  23. #define EXC_DATA_PAGE_FAULT 0x03
  24. #define EXC_INSTR_PAGE_FAULT 0x04
  25. #define EXC_TIMER 0x05
  26. #define EXC_ALIGNMENT 0x06
  27. #define EXC_ILLEGAL_INSTR 0x07
  28. #define EXC_EXT_IRQ 0x08
  29. #define EXC_DTLB_MISS 0x09
  30. #define EXC_ITLB_MISS 0x0a
  31. #define EXC_RANGE 0x0b
  32. #define EXC_SYSCALL 0x0c
  33. #define EXC_FLOAT_POINT 0x0d
  34. #define EXC_TRAP 0x0e
  35. void exception_install_handler(int exception, void (*handler)(void));
  36. void exception_free_handler(int exception);
  37. #endif