2007-06-19 12:39:04 +02:00
|
|
|
/** @file
|
2008-10-27 04:34:58 +01:00
|
|
|
ElTorito Partitions Format Definition.
|
|
|
|
This file includes some defintions from
|
|
|
|
1. "El Torito" Bootable CD-ROM Format Specification, Version 1.0.
|
|
|
|
2. Volume and File Structure of CDROM for Information Interchange,
|
|
|
|
Standard ECMA-119. (IS0 9660)
|
2007-06-19 12:39:04 +02:00
|
|
|
|
2008-10-27 04:34:58 +01:00
|
|
|
Copyright (c) 2006 - 2008, Intel Corporation
|
2007-06-19 12:39:04 +02:00
|
|
|
All rights reserved. This program and the accompanying materials
|
|
|
|
are licensed and made available under the terms and conditions of the BSD License
|
|
|
|
which accompanies this distribution. The full text of the license may be found at
|
|
|
|
http://opensource.org/licenses/bsd-license.php
|
|
|
|
|
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
|
2008-10-24 06:30:32 +02:00
|
|
|
**/
|
2007-06-19 12:39:04 +02:00
|
|
|
|
|
|
|
#ifndef _ELTORITO_H_
|
|
|
|
#define _ELTORITO_H_
|
|
|
|
|
2008-10-27 04:34:58 +01:00
|
|
|
///
|
|
|
|
/// CDROM_VOLUME_DESCRIPTOR.Types, defined in ISO 9660
|
|
|
|
///
|
2007-06-19 12:39:04 +02:00
|
|
|
#define CDVOL_TYPE_STANDARD 0x0
|
|
|
|
#define CDVOL_TYPE_CODED 0x1
|
|
|
|
#define CDVOL_TYPE_END 0xFF
|
|
|
|
|
2008-08-14 05:21:03 +02:00
|
|
|
///
|
|
|
|
/// CDROM_VOLUME_DESCRIPTOR.Id
|
|
|
|
///
|
2007-06-19 12:39:04 +02:00
|
|
|
#define CDVOL_ID "CD001"
|
|
|
|
|
2008-08-14 05:21:03 +02:00
|
|
|
///
|
|
|
|
/// CDROM_VOLUME_DESCRIPTOR.SystemId
|
|
|
|
///
|
2007-06-19 12:39:04 +02:00
|
|
|
#define CDVOL_ELTORITO_ID "EL TORITO SPECIFICATION"
|
|
|
|
|
|
|
|
//
|
|
|
|
// Indicator types
|
|
|
|
//
|
|
|
|
#define ELTORITO_ID_CATALOG 0x01
|
|
|
|
#define ELTORITO_ID_SECTION_BOOTABLE 0x88
|
|
|
|
#define ELTORITO_ID_SECTION_NOT_BOOTABLE 0x00
|
|
|
|
#define ELTORITO_ID_SECTION_HEADER 0x90
|
|
|
|
#define ELTORITO_ID_SECTION_HEADER_FINAL 0x91
|
|
|
|
|
|
|
|
//
|
|
|
|
// ELTORITO_CATALOG.Boot.MediaTypes
|
|
|
|
//
|
|
|
|
#define ELTORITO_NO_EMULATION 0x00
|
|
|
|
#define ELTORITO_12_DISKETTE 0x01
|
|
|
|
#define ELTORITO_14_DISKETTE 0x02
|
|
|
|
#define ELTORITO_28_DISKETTE 0x03
|
|
|
|
#define ELTORITO_HARD_DISK 0x04
|
|
|
|
|
|
|
|
|
|
|
|
#pragma pack(1)
|
|
|
|
|
2008-10-27 04:34:58 +01:00
|
|
|
///
|
2008-08-14 05:21:03 +02:00
|
|
|
/// El Torito Volume Descriptor
|
|
|
|
/// Note that the CDROM_VOLUME_DESCRIPTOR does not match the ISO-9660
|
|
|
|
/// descriptor. For some reason descriptor used by El Torito is
|
|
|
|
/// different, but they start the same. The El Torito descriptor
|
|
|
|
/// is left shifted 1 byte starting with the SystemId. (Note this
|
|
|
|
/// causes the field to get unaligned)
|
2008-10-27 04:34:58 +01:00
|
|
|
///
|
|
|
|
typedef union {
|
|
|
|
struct {
|
|
|
|
UINT8 Type;
|
|
|
|
CHAR8 Id[5]; ///< "CD001"
|
|
|
|
CHAR8 Reserved[82];
|
|
|
|
} Unknown;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
UINT8 Type; ///< Must be 0
|
|
|
|
CHAR8 Id[5]; ///< "CD001"
|
|
|
|
UINT8 Version; ///< Must be 1
|
|
|
|
CHAR8 SystemId[32]; ///< "EL TORITO SPECIFICATION"
|
|
|
|
CHAR8 Unused[32]; ///< Must be 0
|
|
|
|
UINT8 EltCatalog[4]; ///< Absolute pointer to first sector of Boot Catalog
|
|
|
|
CHAR8 Unused2[13]; ///< Must be 0
|
|
|
|
} BootRecordVolume;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
UINT8 Type;
|
|
|
|
CHAR8 Id[5]; ///< "CD001"
|
|
|
|
UINT8 Version;
|
|
|
|
UINT8 Unused; ///< Must be 0
|
|
|
|
CHAR8 SystemId[32];
|
|
|
|
CHAR8 VolumeId[32];
|
|
|
|
UINT8 Unused2[8]; ///< Must be 0
|
|
|
|
UINT32 VolSpaceSize[2]; ///< the number of Logical Blocks
|
|
|
|
} PrimaryVolume;
|
|
|
|
|
|
|
|
} CDROM_VOLUME_DESCRIPTOR;
|
2007-06-19 12:39:04 +02:00
|
|
|
|
2008-08-14 05:21:03 +02:00
|
|
|
///
|
|
|
|
/// Catalog Entry
|
|
|
|
///
|
2007-06-19 12:39:04 +02:00
|
|
|
typedef union {
|
|
|
|
struct {
|
|
|
|
CHAR8 Reserved[0x20];
|
|
|
|
} Unknown;
|
|
|
|
|
2008-08-14 05:21:03 +02:00
|
|
|
///
|
|
|
|
/// Catalog validation entry (Catalog header)
|
|
|
|
///
|
2007-06-19 12:39:04 +02:00
|
|
|
struct {
|
|
|
|
UINT8 Indicator;
|
|
|
|
UINT8 PlatformId;
|
|
|
|
UINT16 Reserved;
|
|
|
|
CHAR8 ManufacId[24];
|
|
|
|
UINT16 Checksum;
|
|
|
|
UINT16 Id55AA;
|
|
|
|
} Catalog;
|
|
|
|
|
2008-08-14 05:21:03 +02:00
|
|
|
///
|
|
|
|
/// Initial/Default Entry or Section Entry
|
|
|
|
///
|
2007-06-19 12:39:04 +02:00
|
|
|
struct {
|
|
|
|
UINT8 Indicator;
|
|
|
|
UINT8 MediaType : 4;
|
|
|
|
UINT8 Reserved1 : 4;
|
|
|
|
UINT16 LoadSegment;
|
|
|
|
UINT8 SystemType;
|
|
|
|
UINT8 Reserved2;
|
|
|
|
UINT16 SectorCount;
|
|
|
|
UINT32 Lba;
|
|
|
|
} Boot;
|
|
|
|
|
2008-08-14 05:21:03 +02:00
|
|
|
///
|
|
|
|
/// Section Header Entry
|
|
|
|
///
|
2007-06-19 12:39:04 +02:00
|
|
|
struct {
|
|
|
|
UINT8 Indicator;
|
|
|
|
UINT8 PlatformId;
|
|
|
|
UINT16 SectionEntries;
|
|
|
|
CHAR8 Id[28];
|
|
|
|
} Section;
|
|
|
|
|
|
|
|
} ELTORITO_CATALOG;
|
|
|
|
|
|
|
|
#pragma pack()
|
|
|
|
|
|
|
|
#endif
|