From f3a163a1274de16771ed84d51119457ba3a2881d Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Thu, 16 Aug 2012 15:39:35 +0200 Subject: 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 Reviewed-on: http://review.coreboot.org/1558 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/devices/oprom/yabel/biosemu.c | 6 ++++++ src/devices/oprom/yabel/biosemu.h | 1 + 2 files changed, 7 insertions(+) (limited to 'src') diff --git a/src/devices/oprom/yabel/biosemu.c b/src/devices/oprom/yabel/biosemu.c index 8d7795971f..2a2ca312cb 100644 --- a/src/devices/oprom/yabel/biosemu.c +++ b/src/devices/oprom/yabel/biosemu.c @@ -44,6 +44,12 @@ static X86EMU_pioFuncs my_pio_funcs = { /* interrupt function override array (see biosemu.h) */ 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: * *biosmem = pointer to virtual memory * biosmem_size = size of the virtual memory diff --git a/src/devices/oprom/yabel/biosemu.h b/src/devices/oprom/yabel/biosemu.h index 39cc0a9b0e..4f5c4aaa5b 100644 --- a/src/devices/oprom/yabel/biosemu.h +++ b/src/devices/oprom/yabel/biosemu.h @@ -45,6 +45,7 @@ * the function pointer is NULL */ typedef int (* yabel_handleIntFunc)(void); extern yabel_handleIntFunc yabel_intFuncArray[256]; +void mainboard_interrupt_handlers(int, yabel_handleIntFunc); struct device; -- cgit v1.2.3