X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FInclude%2FIndustryStandard%2FElTorito.h;h=6d1ce2aafa23c88054c9a70cc7398443f0803a7a;hp=bfa014cf875f98b6ecd68e67ba58db92ed9eed8e;hb=9095d37b8fe5bfc3d02adad6ba7fd7359ebc0107;hpb=e0759a83b9e6f60ebe42b20ac268474736e03572 diff --git a/MdePkg/Include/IndustryStandard/ElTorito.h b/MdePkg/Include/IndustryStandard/ElTorito.h index bfa014cf87..6d1ce2aafa 100644 --- a/MdePkg/Include/IndustryStandard/ElTorito.h +++ b/MdePkg/Include/IndustryStandard/ElTorito.h @@ -1,35 +1,39 @@ /** @file 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) -Copyright (c) 2006, Intel Corporation -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. +Copyright (c) 2006 - 2018, Intel Corporation. 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. + +**/ #ifndef _ELTORITO_H_ #define _ELTORITO_H_ // -// CDROM_VOLUME_DESCRIPTOR.Types +// CDROM_VOLUME_DESCRIPTOR.Types, defined in ISO 9660 // #define CDVOL_TYPE_STANDARD 0x0 #define CDVOL_TYPE_CODED 0x1 #define CDVOL_TYPE_END 0xFF -// -// CDROM_VOLUME_DESCRIPTOR.Id -// +/// +/// CDROM_VOLUME_DESCRIPTOR.Id +/// #define CDVOL_ID "CD001" -// -// CDROM_VOLUME_DESCRIPTOR.SystemId -// +/// +/// CDROM_VOLUME_DESCRIPTOR.SystemId +/// #define CDVOL_ELTORITO_ID "EL TORITO SPECIFICATION" // @@ -53,38 +57,58 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #pragma pack(1) -// -// 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) -// -typedef struct { - UINT8 Type; - CHAR8 Id[5]; // CD001 - UINT8 Version; - CHAR8 SystemId[26]; - CHAR8 Unused[38]; - UINT8 EltCatalog[4]; - CHAR8 Unused2[5]; - UINT32 VolSpaceSize[2]; +/// +/// CD-ROM Volume Descriptor +/// +typedef union { + struct { + UINT8 Type; + CHAR8 Id[5]; ///< "CD001" + CHAR8 Reserved[82]; + } Unknown; + + /// + /// Boot Record Volume Descriptor, defined in "El Torito" Specification. + /// + 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; + + /// + /// Primary Volumn Descriptor, defined in ISO 9660. + /// + 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; -// -// Catalog Entry -// +/// +/// Catalog Entry +/// typedef union { struct { CHAR8 Reserved[0x20]; } Unknown; - // - // Catalog validation entry (Catalog header) - // + /// + /// Catalog validation entry (Catalog header) + /// struct { - UINT8 Indicator; + UINT8 Indicator; ///< Must be 01 UINT8 PlatformId; UINT16 Reserved; CHAR8 ManufacId[24]; @@ -92,27 +116,27 @@ typedef union { UINT16 Id55AA; } Catalog; - // - // Initial/Default Entry or Section Entry - // + /// + /// Initial/Default Entry or Section Entry + /// struct { - UINT8 Indicator; + UINT8 Indicator; ///< 88 = Bootable, 00 = Not Bootable UINT8 MediaType : 4; - UINT8 Reserved1 : 4; + UINT8 Reserved1 : 4; ///< Must be 0 UINT16 LoadSegment; UINT8 SystemType; - UINT8 Reserved2; + UINT8 Reserved2; ///< Must be 0 UINT16 SectorCount; UINT32 Lba; } Boot; - // - // Section Header Entry - // + /// + /// Section Header Entry + /// struct { - UINT8 Indicator; + UINT8 Indicator; ///< 90 - Header, more header follw, 91 - Final Header UINT8 PlatformId; - UINT16 SectionEntries; + UINT16 SectionEntries; ///< Number of section entries following this header CHAR8 Id[28]; } Section;