2 * GRUB -- GRand Unified Bootloader
3 * Copyright (C) 2009 Free Software Foundation, Inc.
5 * GRUB is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * GRUB is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef GRUB_INTERRUPT_MACHINE_HEADER
20 #define GRUB_INTERRUPT_MACHINE_HEADER 1
22 #include <grub/symbol.h>
23 #include <grub/types.h>
25 struct grub_bios_int_registers
39 #define GRUB_CPU_INT_FLAGS_CARRY 0x1
40 #define GRUB_CPU_INT_FLAGS_PARITY 0x4
41 #define GRUB_CPU_INT_FLAGS_ADJUST 0x10
42 #define GRUB_CPU_INT_FLAGS_ZERO 0x40
43 #define GRUB_CPU_INT_FLAGS_SIGN 0x80
44 #define GRUB_CPU_INT_FLAGS_TRAP 0x100
45 #define GRUB_CPU_INT_FLAGS_INTERRUPT 0x200
46 #define GRUB_CPU_INT_FLAGS_DIRECTION 0x400
47 #define GRUB_CPU_INT_FLAGS_OVERFLOW 0x800
48 #ifdef GRUB_MACHINE_PCBIOS
49 #define GRUB_CPU_INT_FLAGS_DEFAULT GRUB_CPU_INT_FLAGS_INTERRUPT
51 #define GRUB_CPU_INT_FLAGS_DEFAULT 0
54 void EXPORT_FUNC (grub_bios_interrupt
) (grub_uint8_t intno
,
55 struct grub_bios_int_registers
*regs
);
60 } __attribute__ ((packed
));
62 #ifdef GRUB_MACHINE_PCBIOS
63 extern struct grub_i386_idt
*EXPORT_VAR(grub_realidt
);