1N/A/*
1N/A * GRUB -- GRand Unified Bootloader
1N/A * Copyright (C) 1999,2000,2002,2004 Free Software Foundation, Inc.
1N/A *
1N/A * This program is free software; you can redistribute it and/or modify
1N/A * it under the terms of the GNU General Public License as published by
1N/A * the Free Software Foundation; either version 2 of the License, or
1N/A * (at your option) any later version.
1N/A *
1N/A * This program is distributed in the hope that it will be useful,
1N/A * but WITHOUT ANY WARRANTY; without even the implied warranty of
1N/A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1N/A * GNU General Public License for more details.
1N/A *
1N/A * You should have received a copy of the GNU General Public License
1N/A * along with this program; if not, write to the Free Software
1N/A * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
1N/A */
1N/A
1N/A#ifndef STAGE1_HEADER
1N/A#define STAGE1_HEADER 1
1N/A
1N/A
1N/A/* Define the version numbers here, so that Stage 1 can know them. */
1N/A#define COMPAT_VERSION_MAJOR 3
1N/A#define COMPAT_VERSION_MINOR 2
1N/A#define COMPAT_VERSION ((COMPAT_VERSION_MINOR << 8) \
1N/A | COMPAT_VERSION_MAJOR)
1N/A
1N/A/* The signature for bootloader. */
1N/A#define STAGE1_SIGNATURE 0xaa55
1N/A
1N/A/* The offset of the end of BPB (BIOS Parameter Block). */
1N/A#define STAGE1_BPBEND 0x3e
1N/A
1N/A/* The offset of the major version. */
1N/A#define STAGE1_VER_MAJ_OFFS 0x3e
1N/A
1N/A/* The offset of BOOT_DRIVE. */
1N/A#define STAGE1_BOOT_DRIVE 0x40
1N/A
1N/A/* The offset of FORCE_LBA. */
1N/A#define STAGE1_FORCE_LBA 0x41
1N/A
1N/A/* The offset of STAGE2_ADDRESS. */
1N/A#define STAGE1_STAGE2_ADDRESS 0x42
1N/A
1N/A/* The offset of STAGE2_SECTOR. */
1N/A#define STAGE1_STAGE2_SECTOR 0x44
1N/A
1N/A/* The offset of STAGE2_SEGMENT. */
1N/A#define STAGE1_STAGE2_SEGMENT 0x48
1N/A
1N/A/* The offset of BOOT_DRIVE_CHECK. */
1N/A#define STAGE1_BOOT_DRIVE_CHECK 0x4b
1N/A
1N/A/* The offset of a magic number used by Windows NT. */
1N/A#define STAGE1_WINDOWS_NT_MAGIC 0x1b8
1N/A
1N/A/* The offset of the start of the partition table. */
1N/A#define STAGE1_PARTSTART 0x1be
1N/A
1N/A/* The offset of the end of the partition table. */
1N/A#define STAGE1_PARTEND 0x1fe
1N/A
1N/A/* The stack segment. */
1N/A#define STAGE1_STACKSEG 0x2000
1N/A
1N/A/* The segment of disk buffer. The disk buffer MUST be 32K long and
1N/A cannot straddle a 64K boundary. */
1N/A#define STAGE1_BUFFERSEG 0x7000
1N/A
1N/A/* The address of drive parameters. */
1N/A#define STAGE1_DRP_ADDR 0x7f00
1N/A
1N/A/* The size of drive parameters. */
1N/A#define STAGE1_DRP_SIZE 0x42
1N/A
1N/A/* The flag for BIOS drive number to designate a hard disk vs. a
1N/A floppy. */
1N/A#define STAGE1_BIOS_HD_FLAG 0x80
1N/A
1N/A/* The drive number of an invalid drive. */
1N/A#define GRUB_INVALID_DRIVE 0xFF
1N/A
1N/A#endif /* ! STAGE1_HEADER */