]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
bios_emulator: Allow a custom interrupt handler to be installed
authorSimon Glass <sjg@chromium.org>
Sat, 15 Nov 2014 03:56:41 +0000 (20:56 -0700)
committerSimon Glass <sjg@chromium.org>
Tue, 25 Nov 2014 14:11:17 +0000 (07:11 -0700)
Sometime we want to provide an interrupt handler for the ROM, Add a
function to allow this.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/bios_emulator/include/x86emu.h
drivers/bios_emulator/x86emu/sys.c

index 278f669a4bc403262575cb867eb817debdf3d579..63febe0e2913d3b094a0b526fb21114e15924fff 100644 (file)
@@ -153,6 +153,7 @@ extern "C" {                        /* Use "C" linkage when in C++ mode */
        void X86EMU_setupMemFuncs(X86EMU_memFuncs * funcs);
        void X86EMU_setupPioFuncs(X86EMU_pioFuncs * funcs);
        void X86EMU_setupIntrFuncs(X86EMU_intrFuncs funcs[]);
+       void X86EMU_setupIntrFunc(int intnum, X86EMU_intrFuncs func);
        void X86EMU_prepareForInt(int num);
 
 /* decode.c */
index 21f9730bece4f8e783c84768cc80130cedc0555c..0ba9c0c105dd14cd2c17614da5ff71e84efca7c1 100644 (file)
@@ -273,6 +273,11 @@ void X86EMU_setupPioFuncs(X86EMU_pioFuncs * funcs)
        sys_outl = funcs->outl;
 }
 
+void X86EMU_setupIntrFunc(int intnum, X86EMU_intrFuncs func)
+{
+       _X86EMU_intrTab[intnum] = func;
+}
+
 /****************************************************************************
 PARAMETERS:
 funcs   - New interrupt vector table to make active