]> git.proxmox.com Git - grub2.git/blame - include/grub/i386/pc/boot.h
2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
[grub2.git] / include / grub / i386 / pc / boot.h
CommitLineData
6a161fa9 1/*
2 * PUPA -- Preliminary Universal Programming Architecture for GRUB
3 * Copyright (C) 1999, 2000 Free Software Foundation, Inc.
4 * Copyright (C) 2002 Yoshinori K. Okuji <okuji@enbug.org>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20
21#ifndef PUPA_BOOT_MACHINE_HEADER
22#define PUPA_BOOT_MACHINE_HEADER 1
23
24/* The signature for bootloader. */
25#define PUPA_BOOT_MACHINE_SIGNATURE 0xaa55
26
1cc73a62 27/* The offset of the start of BPB (BIOS Parameter Block). */
28#define PUPA_BOOT_MACHINE_BPB_START 0x3
29
6a161fa9 30/* The offset of the end of BPB (BIOS Parameter Block). */
1cc73a62 31#define PUPA_BOOT_MACHINE_BPB_END 0x3e
6a161fa9 32
33/* The offset of the major version. */
34#define PUPA_BOOT_MACHINE_VER_MAJ 0x3e
35
36/* The offset of BOOT_DRIVE. */
37#define PUPA_BOOT_MACHINE_BOOT_DRIVE 0x40
38
39/* The offset of FORCE_LBA. */
40#define PUPA_BOOT_MACHINE_FORCE_LBA 0x41
41
42/* The offset of KERNEL_ADDRESS. */
43#define PUPA_BOOT_MACHINE_KERNEL_ADDRESS 0x42
44
45/* The offset of KERNEL_SECTOR. */
46#define PUPA_BOOT_MACHINE_KERNEL_SECTOR 0x44
47
48/* The offset of KERNEL_SEGMENT. */
49#define PUPA_BOOT_MACHINE_KERNEL_SEGMENT 0x48
50
51/* The offset of a magic number used by Windows NT. */
52#define PUPA_BOOT_MACHINE_WINDOWS_NT_MAGIC 0x1b8
53
54/* The offset of the start of the partition table. */
55#define PUPA_BOOT_MACHINE_PART_START 0x1be
56
57/* The offset of the end of the partition table. */
58#define PUPA_BOOT_MACHINE_PART_END 0x1fe
59
60/* The stack segment. */
61#define PUPA_BOOT_MACHINE_STACK_SEG 0x2000
62
63/* The segment of disk buffer. The disk buffer MUST be 32K long and
64 cannot straddle a 64K boundary. */
65#define PUPA_BOOT_MACHINE_BUFFER_SEG 0x7000
66
67/* The address of drive parameters. */
68#define PUPA_BOOT_MACHINE_DRP_ADDR 0x7f00
69
70/* The size of drive parameters. */
71#define PUPA_BOOT_MACHINE_DRP_SIZE 0x42
72
73/* The flag for BIOS drive number to designate a hard disk vs. a
74 floppy. */
75#define PUPA_BOOT_MACHINE_BIOS_HD_FLAG 0x80
76
77/* The segment where the kernel is loaded. */
78#define PUPA_BOOT_MACHINE_KERNEL_SEG 0x800
79
80/* The address where the kernel is loaded. */
81#define PUPA_BOOT_MACHINE_KERNEL_ADDR (PUPA_BOOT_MACHINE_KERNEL_SEG << 4)
82
83/* The size of a block list used in the kernel startup code. */
84#define PUPA_BOOT_MACHINE_LIST_SIZE 8
85
86#endif /* ! BOOT_MACHINE_HEADER */