YABEL: Common API to register interrupt handlers

Provide (mostly) the same API for registering
interrupt handlers as with x86emu.

Change-Id: I1364b08d9043039550786a1758508ae088813aa3
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/1558
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Patrick Georgi 2012-08-16 15:39:35 +02:00 committed by Stefan Reinauer
parent 1ee8b45740
commit f3a163a127
2 changed files with 7 additions and 0 deletions

View File

@ -44,6 +44,12 @@ static X86EMU_pioFuncs my_pio_funcs = {
/* interrupt function override array (see biosemu.h) */ /* interrupt function override array (see biosemu.h) */
yabel_handleIntFunc yabel_intFuncArray[256]; yabel_handleIntFunc yabel_intFuncArray[256];
void
mainboard_interrupt_handlers(int interrupt, yabel_handleIntFunc func)
{
yabel_intFuncArray[interrupt] = func;
}
/* main entry into YABEL biosemu, arguments are: /* main entry into YABEL biosemu, arguments are:
* *biosmem = pointer to virtual memory * *biosmem = pointer to virtual memory
* biosmem_size = size of the virtual memory * biosmem_size = size of the virtual memory

View File

@ -45,6 +45,7 @@
* the function pointer is NULL */ * the function pointer is NULL */
typedef int (* yabel_handleIntFunc)(void); typedef int (* yabel_handleIntFunc)(void);
extern yabel_handleIntFunc yabel_intFuncArray[256]; extern yabel_handleIntFunc yabel_intFuncArray[256];
void mainboard_interrupt_handlers(int, yabel_handleIntFunc);
struct device; struct device;