iPXE
biosint.h
Go to the documentation of this file.
00001 #ifndef BIOSINT_H
00002 #define BIOSINT_H
00003 
00004 /**
00005  * @file BIOS interrupts
00006  *
00007  */
00008 
00009 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
00010 
00011 #include <realmode.h>
00012 
00013 struct segoff;
00014 
00015 /**
00016  * Hooked interrupt count
00017  *
00018  * At exit, after unhooking all possible interrupts, this counter
00019  * should be examined.  If it is non-zero, it means that we failed to
00020  * unhook at least one interrupt vector, and so must not free up the
00021  * memory we are using.  (Note that this also implies that we should
00022  * re-hook INT 15 in order to hide ourselves from the memory map).
00023  */
00024 extern uint16_t __text16 ( hooked_bios_interrupts );
00025 #define hooked_bios_interrupts __use_text16 ( hooked_bios_interrupts )
00026 
00027 extern void hook_bios_interrupt ( unsigned int interrupt, unsigned int handler,
00028                                   struct segoff *chain_vector );
00029 extern int unhook_bios_interrupt ( unsigned int interrupt,
00030                                    unsigned int handler,
00031                                    struct segoff *chain_vector );
00032 extern void check_bios_interrupts ( void );
00033 
00034 #endif /* BIOSINT_H */