2 * GRUB -- GRand Unified Bootloader
3 * Copyright (C) 2002,2003,2004,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/>.
19 #ifndef GRUB_MULTIBOOT_CPU_HEADER
20 #define GRUB_MULTIBOOT_CPU_HEADER 1
22 #define MULTIBOOT2_INITIAL_STATE { .eax = MULTIBOOT2_BOOTLOADER_MAGIC, \
25 /* Set esp to some random location in low memory to avoid breaking */ \
26 /* non-compliant kernels. */ \
29 #define MULTIBOOT_INITIAL_STATE { .eax = MULTIBOOT_BOOTLOADER_MAGIC, \
32 /* Set esp to some random location in low memory to avoid breaking */ \
33 /* non-compliant kernels. */ \
36 #define MULTIBOOT_ENTRY_REGISTER eip
37 #define MULTIBOOT_MBI_REGISTER ebx
38 #define MULTIBOOT2_ARCHITECTURE_CURRENT MULTIBOOT2_ARCHITECTURE_I386
40 #ifdef GRUB_MACHINE_EFI
42 #define MULTIBOOT_EFI_INITIAL_STATE { .rax = MULTIBOOT_BOOTLOADER_MAGIC, \
46 #define MULTIBOOT_EFI_ENTRY_REGISTER rip
47 #define MULTIBOOT_EFI_MBI_REGISTER rbx
51 #define MULTIBOOT_ELF32_MACHINE EM_386
52 #define MULTIBOOT_ELF64_MACHINE EM_X86_64
54 #endif /* ! GRUB_MULTIBOOT_CPU_HEADER */