]> git.proxmox.com Git - grub2.git/blob - include/grub/i386/pc/boot.h
2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
[grub2.git] / include / grub / i386 / pc / boot.h
1 /*
2 * GRUB -- GRand Unified Bootloader
3 * Copyright (C) 1999,2000,2002 Free Software Foundation, Inc.
4 *
5 * This program 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 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program 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.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19
20 #ifndef GRUB_BOOT_MACHINE_HEADER
21 #define GRUB_BOOT_MACHINE_HEADER 1
22
23 /* The signature for bootloader. */
24 #define GRUB_BOOT_MACHINE_SIGNATURE 0xaa55
25
26 /* The offset of the start of BPB (BIOS Parameter Block). */
27 #define GRUB_BOOT_MACHINE_BPB_START 0x3
28
29 /* The offset of the end of BPB (BIOS Parameter Block). */
30 #define GRUB_BOOT_MACHINE_BPB_END 0x3e
31
32 /* The offset of the major version. */
33 #define GRUB_BOOT_MACHINE_VER_MAJ 0x3e
34
35 /* The offset of BOOT_DRIVE. */
36 #define GRUB_BOOT_MACHINE_BOOT_DRIVE 0x40
37
38 /* The offset of FORCE_LBA. */
39 #define GRUB_BOOT_MACHINE_FORCE_LBA 0x41
40
41 /* The offset of KERNEL_ADDRESS. */
42 #define GRUB_BOOT_MACHINE_KERNEL_ADDRESS 0x42
43
44 /* The offset of KERNEL_SECTOR. */
45 #define GRUB_BOOT_MACHINE_KERNEL_SECTOR 0x44
46
47 /* The offset of KERNEL_SEGMENT. */
48 #define GRUB_BOOT_MACHINE_KERNEL_SEGMENT 0x48
49
50 /* The offset of a magic number used by Windows NT. */
51 #define GRUB_BOOT_MACHINE_WINDOWS_NT_MAGIC 0x1b8
52
53 /* The offset of the start of the partition table. */
54 #define GRUB_BOOT_MACHINE_PART_START 0x1be
55
56 /* The offset of the end of the partition table. */
57 #define GRUB_BOOT_MACHINE_PART_END 0x1fe
58
59 /* The stack segment. */
60 #define GRUB_BOOT_MACHINE_STACK_SEG 0x2000
61
62 /* The segment of disk buffer. The disk buffer MUST be 32K long and
63 cannot straddle a 64K boundary. */
64 #define GRUB_BOOT_MACHINE_BUFFER_SEG 0x7000
65
66 /* The address of drive parameters. */
67 #define GRUB_BOOT_MACHINE_DRP_ADDR 0x7f00
68
69 /* The size of drive parameters. */
70 #define GRUB_BOOT_MACHINE_DRP_SIZE 0x42
71
72 /* The flag for BIOS drive number to designate a hard disk vs. a
73 floppy. */
74 #define GRUB_BOOT_MACHINE_BIOS_HD_FLAG 0x80
75
76 /* The segment where the kernel is loaded. */
77 #define GRUB_BOOT_MACHINE_KERNEL_SEG 0x800
78
79 /* The address where the kernel is loaded. */
80 #define GRUB_BOOT_MACHINE_KERNEL_ADDR (GRUB_BOOT_MACHINE_KERNEL_SEG << 4)
81
82 /* The size of a block list used in the kernel startup code. */
83 #define GRUB_BOOT_MACHINE_LIST_SIZE 8
84
85 #endif /* ! BOOT_MACHINE_HEADER */