]> git.proxmox.com Git - grub2.git/blame - include/grub/i386/pc/kernel.h
2009-06-16 Pavel Roskin <proski@gnu.org>
[grub2.git] / include / grub / i386 / pc / kernel.h
CommitLineData
6a161fa9 1/*
4b13b216 2 * GRUB -- GRand Unified Bootloader
9be6b98b 3 * Copyright (C) 2002,2003,2007,2008 Free Software Foundation, Inc.
6a161fa9 4 *
5a79f472 5 * GRUB is free software: you can redistribute it and/or modify
6a161fa9 6 * it under the terms of the GNU General Public License as published by
5a79f472 7 * the Free Software Foundation, either version 3 of the License, or
6a161fa9 8 * (at your option) any later version.
9 *
5a79f472 10 * GRUB is distributed in the hope that it will be useful,
6a161fa9 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.
14 *
15 * You should have received a copy of the GNU General Public License
5a79f472 16 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
6a161fa9 17 */
18
19#ifndef KERNEL_MACHINE_HEADER
20#define KERNEL_MACHINE_HEADER 1
21
4b13b216 22/* The offset of GRUB_TOTAL_MODULE_SIZE. */
23#define GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE 0x8
6a161fa9 24
4b13b216 25/* The offset of GRUB_KERNEL_IMAGE_SIZE. */
26#define GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE 0xc
6a161fa9 27
4b13b216 28/* The offset of GRUB_COMPRESSED_SIZE. */
29#define GRUB_KERNEL_MACHINE_COMPRESSED_SIZE 0x10
1f5ab428 30
4b13b216 31/* The offset of GRUB_INSTALL_DOS_PART. */
32#define GRUB_KERNEL_MACHINE_INSTALL_DOS_PART 0x14
a5ffe966 33
4b13b216 34/* The offset of GRUB_INSTALL_BSD_PART. */
35#define GRUB_KERNEL_MACHINE_INSTALL_BSD_PART 0x18
a5ffe966 36
4b13b216 37/* The offset of GRUB_PREFIX. */
3bd0a12a 38#define GRUB_KERNEL_MACHINE_PREFIX 0x1c
1f5ab428 39
bf697e28 40/* End of the data section. */
3bd0a12a 41#define GRUB_KERNEL_MACHINE_DATA_END 0x5c
bf697e28 42
1f5ab428 43/* The size of the first region which won't be compressed. */
aa24b516 44#if defined(ENABLE_LZO)
c5e3cfba 45#define GRUB_KERNEL_MACHINE_RAW_SIZE (GRUB_KERNEL_MACHINE_DATA_END + 0x450)
aa24b516 46#elif defined(ENABLE_LZMA)
47#define GRUB_KERNEL_MACHINE_RAW_SIZE (GRUB_KERNEL_MACHINE_DATA_END + 0x5F0)
48#endif
1f5ab428 49
50#ifndef ASM_FILE
51
ffd36e34 52#include <grub/symbol.h>
4b13b216 53#include <grub/types.h>
a5ffe966 54
55a581dc 55/* The size of kernel image. */
56extern grub_int32_t grub_kernel_image_size;
57
58/* The total size of module images following the kernel. */
59extern grub_int32_t grub_total_module_size;
60
a5ffe966 61/* The DOS partition number of the installed partition. */
4b13b216 62extern grub_int32_t grub_install_dos_part;
a5ffe966 63
64/* The BSD partition number of the installed partition. */
4b13b216 65extern grub_int32_t grub_install_bsd_part;
a5ffe966 66
4b13b216 67/* The prefix which points to the directory where GRUB modules and its
a5ffe966 68 configuration file are located. */
4b13b216 69extern char grub_prefix[];
a5ffe966 70
71/* The boot BIOS drive number. */
96b1619a 72extern grub_uint8_t EXPORT_VAR(grub_boot_drive);
a5ffe966 73
1f5ab428 74#endif /* ! ASM_FILE */
75
6a161fa9 76#endif /* ! KERNEL_MACHINE_HEADER */