2014-06-08 10:13:29 +04:00
|
|
|
/* This file is part of ToaruOS and is released under the terms
|
|
|
|
* of the NCSA / University of Illinois License - see LICENSE.md
|
|
|
|
* Copyright (C) 2011-2014 Kevin Lange
|
2011-12-11 03:34:10 +04:00
|
|
|
*
|
|
|
|
* Interrupt Services Requests
|
|
|
|
*/
|
2011-01-16 06:41:17 +03:00
|
|
|
#include <system.h>
|
2011-12-27 05:23:58 +04:00
|
|
|
#include <logging.h>
|
2011-01-16 06:41:17 +03:00
|
|
|
|
2014-04-13 13:01:56 +04:00
|
|
|
extern irq_handler_t isrs_routines[256];
|
2013-06-06 10:10:36 +04:00
|
|
|
extern void fault_error(struct regs *r);
|
2011-01-21 04:49:35 +03:00
|
|
|
|
2013-06-07 05:04:13 +04:00
|
|
|
void fault_handler(struct regs *r) {
|
2013-06-06 10:10:36 +04:00
|
|
|
irq_handler_t handler;
|
2011-03-30 06:08:56 +04:00
|
|
|
handler = isrs_routines[r->int_no];
|
|
|
|
if (handler) {
|
|
|
|
handler(r);
|
|
|
|
} else {
|
2013-06-06 10:10:36 +04:00
|
|
|
fault_error(r);
|
2011-01-16 06:41:17 +03:00
|
|
|
}
|
|
|
|
}
|