]> git.proxmox.com Git - grub2.git/blame - include/grub/i386/pc/boot.h
2009-06-16 Pavel Roskin <proski@gnu.org>
[grub2.git] / include / grub / i386 / pc / boot.h
CommitLineData
6a161fa9 1/*
4b13b216 2 * GRUB -- GRand Unified Bootloader
9be6b98b 3 * Copyright (C) 1999,2000,2002,2005,2006,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
4b13b216 19#ifndef GRUB_BOOT_MACHINE_HEADER
20#define GRUB_BOOT_MACHINE_HEADER 1
6a161fa9 21
22/* The signature for bootloader. */
4b13b216 23#define GRUB_BOOT_MACHINE_SIGNATURE 0xaa55
6a161fa9 24
1cc73a62 25/* The offset of the start of BPB (BIOS Parameter Block). */
4b13b216 26#define GRUB_BOOT_MACHINE_BPB_START 0x3
1cc73a62 27
6a161fa9 28/* The offset of the end of BPB (BIOS Parameter Block). */
4b13b216 29#define GRUB_BOOT_MACHINE_BPB_END 0x3e
6a161fa9 30
31/* The offset of the major version. */
4b13b216 32#define GRUB_BOOT_MACHINE_VER_MAJ 0x3e
6a161fa9 33
34/* The offset of BOOT_DRIVE. */
524a1e6a 35#define GRUB_BOOT_MACHINE_BOOT_DRIVE 0x4c
6a161fa9 36
37/* The offset of KERNEL_ADDRESS. */
524a1e6a 38#define GRUB_BOOT_MACHINE_KERNEL_ADDRESS 0x40
6a161fa9 39
40/* The offset of KERNEL_SECTOR. */
4b13b216 41#define GRUB_BOOT_MACHINE_KERNEL_SECTOR 0x44
6a161fa9 42
43/* The offset of KERNEL_SEGMENT. */
524a1e6a 44#define GRUB_BOOT_MACHINE_KERNEL_SEGMENT 0x42
6a161fa9 45
f806d18e 46/* The offset of BOOT_DRIVE_CHECK. */
3ef17a2e 47#define GRUB_BOOT_MACHINE_DRIVE_CHECK 0x4e
f806d18e 48
6a161fa9 49/* The offset of a magic number used by Windows NT. */
4b13b216 50#define GRUB_BOOT_MACHINE_WINDOWS_NT_MAGIC 0x1b8
6a161fa9 51
52/* The offset of the start of the partition table. */
4b13b216 53#define GRUB_BOOT_MACHINE_PART_START 0x1be
6a161fa9 54
55/* The offset of the end of the partition table. */
4b13b216 56#define GRUB_BOOT_MACHINE_PART_END 0x1fe
6a161fa9 57
58/* The stack segment. */
4b13b216 59#define GRUB_BOOT_MACHINE_STACK_SEG 0x2000
6a161fa9 60
61/* The segment of disk buffer. The disk buffer MUST be 32K long and
62 cannot straddle a 64K boundary. */
4b13b216 63#define GRUB_BOOT_MACHINE_BUFFER_SEG 0x7000
6a161fa9 64
6a161fa9 65/* The flag for BIOS drive number to designate a hard disk vs. a
66 floppy. */
4b13b216 67#define GRUB_BOOT_MACHINE_BIOS_HD_FLAG 0x80
6a161fa9 68
69/* The segment where the kernel is loaded. */
4b13b216 70#define GRUB_BOOT_MACHINE_KERNEL_SEG 0x800
6a161fa9 71
72/* The address where the kernel is loaded. */
4b13b216 73#define GRUB_BOOT_MACHINE_KERNEL_ADDR (GRUB_BOOT_MACHINE_KERNEL_SEG << 4)
6a161fa9 74
75/* The size of a block list used in the kernel startup code. */
524a1e6a 76#define GRUB_BOOT_MACHINE_LIST_SIZE 12
6a161fa9 77
78#endif /* ! BOOT_MACHINE_HEADER */