iPXE
biosint.h
Go to the documentation of this file.
1#ifndef BIOSINT_H
2#define BIOSINT_H
3
4/**
5 * @file BIOS interrupts
6 *
7 */
8
9FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
10
11#include <realmode.h>
12
13struct segoff;
14
15/**
16 * Hooked interrupt count
17 *
18 * At exit, after unhooking all possible interrupts, this counter
19 * should be examined. If it is non-zero, it means that we failed to
20 * unhook at least one interrupt vector, and so must not free up the
21 * memory we are using. (Note that this also implies that we should
22 * re-hook INT 15 in order to hide ourselves from the memory map).
23 */
25#define hooked_bios_interrupts __use_text16 ( hooked_bios_interrupts )
26
27extern void hook_bios_interrupt ( unsigned int interrupt, unsigned int handler,
28 struct segoff *chain_vector );
29extern int unhook_bios_interrupt ( unsigned int interrupt,
30 unsigned int handler,
31 struct segoff *chain_vector );
32extern void check_bios_interrupts ( void );
33
34#endif /* BIOSINT_H */
unsigned short uint16_t
Definition stdint.h:11
#define hooked_bios_interrupts
Definition biosint.h:25
void hook_bios_interrupt(unsigned int interrupt, unsigned int handler, struct segoff *chain_vector)
Hook INT vector.
Definition biosint.c:25
int unhook_bios_interrupt(unsigned int interrupt, unsigned int handler, struct segoff *chain_vector)
Unhook INT vector.
Definition biosint.c:70
void check_bios_interrupts(void)
Dump changes to interrupt vector table (for debugging)
Definition biosint.c:99
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define __text16(variable)
Definition libkir.h:18
void interrupt(int intr, struct interrupt_frame32 *frame32, struct interrupt_frame64 *frame64)
Interrupt handler.
Definition librm_mgmt.c:251