Upgraded GRUB2 to 2.00 release.
[AROS.git] / arch / all-pc / boot / grub2-aros / include / grub / i386 / pc / int.h
blob44e7f52bbb225560e41d173efe5676531194f732
1 /*
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
27 grub_uint32_t eax;
28 grub_uint16_t es;
29 grub_uint16_t ds;
30 grub_uint16_t flags;
31 grub_uint16_t dummy;
32 grub_uint32_t ebx;
33 grub_uint32_t ecx;
34 grub_uint32_t edi;
35 grub_uint32_t esi;
36 grub_uint32_t edx;
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
50 #else
51 #define GRUB_CPU_INT_FLAGS_DEFAULT 0
52 #endif
54 void EXPORT_FUNC (grub_bios_interrupt) (grub_uint8_t intno,
55 struct grub_bios_int_registers *regs);
56 struct grub_i386_idt
58 grub_uint16_t limit;
59 grub_uint32_t base;
60 } __attribute__ ((packed));
62 #ifdef GRUB_MACHINE_PCBIOS
63 extern struct grub_i386_idt *EXPORT_VAR(grub_realidt);
64 #endif
66 #endif