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/i386/pc/memory.h>
22
#include <grub/machine/memory.h>
23
#include <grub/machine/boot.h>
24
#include <grub/machine/kernel.h>
30
/* Disable interrupts. */
35
. = _start + GRUB_BOOT_I386_QEMU_CORE_ENTRY_ADDR
36
VARIABLE(grub_core_entry_addr)
40
/* Set up %ds, %ss, and %es. */
46
/* Set up the real mode stack. */
47
movl $GRUB_MEMORY_MACHINE_REAL_STACK, %esp
49
/* Transition to protected mode. We use pushl to force generation
50
of a flat return address. */
52
DATA32 jmp real_to_prot
55
movl grub_core_entry_addr, %edx
58
#include "../../../kern/i386/realmode.S"
60
/* Intel, in its infinite wisdom, decided to put the i8086 entry point
61
*right here* and this is why we need this kludge. */
63
. = GRUB_BOOT_MACHINE_SIZE - 16
68
. = GRUB_BOOT_MACHINE_SIZE