2 * GRUB -- GRand Unified Bootloader
3 * Copyright (C) 1999,2000,2001,2002,2003,2005,2006,2007,2008,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/>.
20 #include <grub/symbol.h>
21 #include <grub/machine/memory.h>
22 #include <grub/machine/boot.h>
23 #include <grub/machine/kernel.h>
29 /* Disable interrupts. */
34 . = _start + GRUB_BOOT_MACHINE_CORE_ENTRY_ADDR
35 VARIABLE(grub_core_entry_addr)
39 /* Process VGA rom. */
42 /* Set up %ds, %ss, and %es. */
48 /* Set up the real mode stack. */
49 movl $GRUB_MEMORY_MACHINE_REAL_STACK, %esp
51 /* Transition to protected mode. We use pushl to force generation
52 of a flat return address. */
54 DATA32 jmp real_to_prot
57 movl grub_core_entry_addr, %edx
60 #include "../../../kern/i386/realmode.S"
62 /* Intel, in its infinite wisdom, decided to put the i8086 entry point
63 *right here* and this is why we need this kludge. */
65 . = GRUB_BOOT_MACHINE_SIZE - 16
67 . = GRUB_BOOT_MACHINE_SIZE