2 * GRUB -- GRand Unified Bootloader
3 * Copyright (C) 1999,2000,2001,2002,2003,2005,2006,2007,2008 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/>.
21 #include <grub/symbol.h>
22 #include <grub/machine/memory.h>
23 #include <grub/cpu/linux.h>
24 #include <grub/cpu/kernel.h>
25 #include <multiboot.h>
26 #include <multiboot2.h>
29 * Note: GRUB is compiled with the options -mrtd and -mregparm=3.
30 * So the first three arguments are passed in %eax, %edx, and %ecx,
31 * respectively, and if a function has a fixed number of arguments
32 * and the number if greater than three, the function must return
33 * with "ret $N" where N is ((the number of arguments) - 3) * 4.
45 * This is a special data area at a fixed offset from the beginning.
48 . = EXT_C(start) + GRUB_KERNEL_CPU_PREFIX
51 /* to be filled by grub-mkimage */
54 * Leave some breathing room for the prefix.
57 . = EXT_C(start) + GRUB_KERNEL_CPU_DATA_END
60 movl %eax, EXT_C(grub_ieee1275_entry_fn)
64 * This call is special... it never returns... in fact it should simply
72 * prot_to_real and associated structures (but NOT real_to_prot, that is
73 * only needed for BIOS gates).
75 #include "../realmode.S"
78 * Routines needed by Linux and Multiboot loaders.
80 #include "../loader.S"