2 * GRUB -- GRand Unified Bootloader
3 * Copyright (C) 2002,2003,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/>.
19 #ifndef KERNEL_MACHINE_HEADER
20 #define KERNEL_MACHINE_HEADER 1
22 /* The offset of GRUB_TOTAL_MODULE_SIZE. */
23 #define GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE 0x8
25 /* The offset of GRUB_KERNEL_IMAGE_SIZE. */
26 #define GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE 0xc
28 /* The offset of GRUB_COMPRESSED_SIZE. */
29 #define GRUB_KERNEL_MACHINE_COMPRESSED_SIZE 0x10
31 /* The offset of GRUB_INSTALL_DOS_PART. */
32 #define GRUB_KERNEL_MACHINE_INSTALL_DOS_PART 0x14
34 /* The offset of GRUB_INSTALL_BSD_PART. */
35 #define GRUB_KERNEL_MACHINE_INSTALL_BSD_PART 0x18
37 /* The offset of GRUB_PREFIX. */
38 #define GRUB_KERNEL_MACHINE_PREFIX 0x1c
40 /* End of the data section. */
41 #define GRUB_KERNEL_MACHINE_DATA_END 0x5c
43 /* The size of the first region which won't be compressed. */
44 #define GRUB_KERNEL_MACHINE_RAW_SIZE (GRUB_KERNEL_MACHINE_DATA_END + 0x5F0)
46 /* Enable LZMA compression */
51 #include <grub/symbol.h>
52 #include <grub/types.h>
54 /* The size of kernel image. */
55 extern grub_int32_t grub_kernel_image_size
;
57 /* The total size of module images following the kernel. */
58 extern grub_int32_t grub_total_module_size
;
60 /* The DOS partition number of the installed partition. */
61 extern grub_int32_t grub_install_dos_part
;
63 /* The BSD partition number of the installed partition. */
64 extern grub_int32_t grub_install_bsd_part
;
66 /* The prefix which points to the directory where GRUB modules and its
67 configuration file are located. */
68 extern char grub_prefix
[];
70 /* The boot BIOS drive number. */
71 extern grub_uint8_t
EXPORT_VAR(grub_boot_drive
);
73 #endif /* ! ASM_FILE */
75 #endif /* ! KERNEL_MACHINE_HEADER */