]>
Commit | Line | Data |
---|---|---|
6a161fa9 | 1 | /* |
4b13b216 | 2 | * GRUB -- GRand Unified Bootloader |
3a73dcb6 | 3 | * Copyright (C) 1999,2000,2002,2005,2006,2007,2008,2010 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 | |
614be3f1 VS |
22 | #define MACHINE I386_PC |
23 | #include <grub/offsets.h> | |
24 | ||
6a161fa9 | 25 | /* The signature for bootloader. */ |
4b13b216 | 26 | #define GRUB_BOOT_MACHINE_SIGNATURE 0xaa55 |
6a161fa9 | 27 | |
1cc73a62 | 28 | /* The offset of the start of BPB (BIOS Parameter Block). */ |
4b13b216 | 29 | #define GRUB_BOOT_MACHINE_BPB_START 0x3 |
1cc73a62 | 30 | |
6a161fa9 | 31 | /* The offset of the end of BPB (BIOS Parameter Block). */ |
fde24e10 | 32 | #define GRUB_BOOT_MACHINE_BPB_END 0x5a |
6a161fa9 | 33 | |
6a161fa9 | 34 | /* The offset of KERNEL_SECTOR. */ |
fde24e10 | 35 | #define GRUB_BOOT_MACHINE_KERNEL_SECTOR 0x5c |
6a161fa9 | 36 | |
20591577 | 37 | /* The offset of BOOT_DRIVE. */ |
fde24e10 | 38 | #define GRUB_BOOT_MACHINE_BOOT_DRIVE 0x64 |
6a161fa9 | 39 | |
f806d18e | 40 | /* The offset of BOOT_DRIVE_CHECK. */ |
fde24e10 | 41 | #define GRUB_BOOT_MACHINE_DRIVE_CHECK 0x66 |
f806d18e | 42 | |
6a161fa9 | 43 | /* The offset of a magic number used by Windows NT. */ |
4b13b216 | 44 | #define GRUB_BOOT_MACHINE_WINDOWS_NT_MAGIC 0x1b8 |
6a161fa9 | 45 | |
46 | /* The offset of the start of the partition table. */ | |
4b13b216 | 47 | #define GRUB_BOOT_MACHINE_PART_START 0x1be |
6a161fa9 | 48 | |
49 | /* The offset of the end of the partition table. */ | |
4b13b216 | 50 | #define GRUB_BOOT_MACHINE_PART_END 0x1fe |
6a161fa9 | 51 | |
52 | /* The stack segment. */ | |
4b13b216 | 53 | #define GRUB_BOOT_MACHINE_STACK_SEG 0x2000 |
6a161fa9 | 54 | |
55 | /* The segment of disk buffer. The disk buffer MUST be 32K long and | |
56 | cannot straddle a 64K boundary. */ | |
4b13b216 | 57 | #define GRUB_BOOT_MACHINE_BUFFER_SEG 0x7000 |
6a161fa9 | 58 | |
6a161fa9 | 59 | /* The flag for BIOS drive number to designate a hard disk vs. a |
60 | floppy. */ | |
4b13b216 | 61 | #define GRUB_BOOT_MACHINE_BIOS_HD_FLAG 0x80 |
6a161fa9 | 62 | |
6a161fa9 | 63 | /* The address where the kernel is loaded. */ |
4b13b216 | 64 | #define GRUB_BOOT_MACHINE_KERNEL_ADDR (GRUB_BOOT_MACHINE_KERNEL_SEG << 4) |
6a161fa9 | 65 | |
66 | /* The size of a block list used in the kernel startup code. */ | |
524a1e6a | 67 | #define GRUB_BOOT_MACHINE_LIST_SIZE 12 |
6a161fa9 | 68 | |
3973a59a RM |
69 | #define GRUB_BOOT_MACHINE_PXE_DL 0x7f |
70 | ||
3a73dcb6 | 71 | /* This is the blocklist used in the diskboot image. */ |
614be3f1 | 72 | #define grub_boot_blocklist grub_pc_bios_boot_blocklist |
3a73dcb6 | 73 | |
6a161fa9 | 74 | #endif /* ! BOOT_MACHINE_HEADER */ |