]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/IndustryStandard/ElTorito.h
re-defined CDROM_VOLUME_DESCRIPTOR to be a union including Boot Record Volume Descrip...
[mirror_edk2.git] / MdePkg / Include / IndustryStandard / ElTorito.h
index bfa014cf875f98b6ecd68e67ba58db92ed9eed8e..b474dc9ba14768b5475b21e7ce66d218181c9b66 100644 (file)
@@ -1,7 +1,11 @@
 /** @file\r
-  ElTorito Partitions Format Definition.\r
+  ElTorito Partitions Format Definition. \r
+  This file includes some defintions from \r
+  1. "El Torito" Bootable CD-ROM Format Specification, Version 1.0.\r
+  2. Volume and File Structure of CDROM for Information Interchange, \r
+     Standard ECMA-119. (IS0 9660)\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2008, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -10,26 +14,26 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
---*/\r
+**/\r
 \r
 #ifndef _ELTORITO_H_\r
 #define _ELTORITO_H_\r
 \r
-//\r
-// CDROM_VOLUME_DESCRIPTOR.Types\r
-//\r
+///\r
+/// CDROM_VOLUME_DESCRIPTOR.Types, defined in ISO 9660\r
+///\r
 #define CDVOL_TYPE_STANDARD 0x0\r
 #define CDVOL_TYPE_CODED    0x1\r
 #define CDVOL_TYPE_END      0xFF\r
 \r
-//\r
-// CDROM_VOLUME_DESCRIPTOR.Id\r
-//\r
+///\r
+/// CDROM_VOLUME_DESCRIPTOR.Id\r
+///\r
 #define CDVOL_ID  "CD001"\r
 \r
-//\r
-// CDROM_VOLUME_DESCRIPTOR.SystemId\r
-//\r
+///\r
+/// CDROM_VOLUME_DESCRIPTOR.SystemId\r
+///\r
 #define CDVOL_ELTORITO_ID "EL TORITO SPECIFICATION"\r
 \r
 //\r
@@ -53,36 +57,55 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #pragma pack(1)\r
 \r
-//\r
-// El Torito Volume Descriptor\r
-// Note that the CDROM_VOLUME_DESCRIPTOR does not match the ISO-9660\r
-// descriptor.  For some reason descriptor used by El Torito is\r
-// different, but they start the same.   The El Torito descriptor\r
-// is left shifted 1 byte starting with the SystemId.  (Note this\r
-// causes the field to get unaligned)\r
-//\r
-typedef struct {\r
-  UINT8   Type;\r
-  CHAR8   Id[5];  // CD001\r
-  UINT8   Version;\r
-  CHAR8   SystemId[26];\r
-  CHAR8   Unused[38];\r
-  UINT8   EltCatalog[4];\r
-  CHAR8   Unused2[5];\r
-  UINT32  VolSpaceSize[2];\r
-} CDROM_VOLUME_DESCRIPTOR;\r
+/// \r
+/// El Torito Volume Descriptor\r
+/// Note that the CDROM_VOLUME_DESCRIPTOR does not match the ISO-9660\r
+/// descriptor.  For some reason descriptor used by El Torito is\r
+/// different, but they start the same.   The El Torito descriptor\r
+/// is left shifted 1 byte starting with the SystemId.  (Note this\r
+/// causes the field to get unaligned)\r
+/// \r
+typedef union { \r
+  struct {\r
+    UINT8   Type;     \r
+    CHAR8   Id[5];           ///< "CD001"    \r
+    CHAR8   Reserved[82];\r
+  } Unknown;\r
 \r
-//\r
-// Catalog Entry\r
-//\r
+  struct {\r
+    UINT8   Type;            ///< Must be 0\r
+    CHAR8   Id[5];           ///< "CD001" \r
+    UINT8   Version;         ///< Must be 1 \r
+    CHAR8   SystemId[32];    ///< "EL TORITO SPECIFICATION" \r
+    CHAR8   Unused[32];      ///< Must be 0 \r
+    UINT8   EltCatalog[4];   ///< Absolute pointer to first sector of Boot Catalog\r
+    CHAR8   Unused2[13];     ///< Must be 0\r
+  } BootRecordVolume;\r
+\r
+  struct {\r
+    UINT8   Type; \r
+    CHAR8   Id[5];           ///< "CD001"\r
+    UINT8   Version; \r
+    UINT8   Unused;          ///< Must be 0\r
+    CHAR8   SystemId[32];    \r
+    CHAR8   VolumeId[32];    \r
+    UINT8   Unused2[8];      ///< Must be 0 \r
+    UINT32  VolSpaceSize[2]; ///< the number of Logical Blocks\r
+  } PrimaryVolume;\r
+\r
+} CDROM_VOLUME_DESCRIPTOR; \r
+\r
+///\r
+/// Catalog Entry\r
+///\r
 typedef union {\r
   struct {\r
     CHAR8       Reserved[0x20];\r
   } Unknown;\r
 \r
-  //\r
-  // Catalog validation entry (Catalog header)\r
-  //\r
+  ///\r
+  /// Catalog validation entry (Catalog header)\r
+  ///\r
   struct {\r
     UINT8   Indicator;\r
     UINT8   PlatformId;\r
@@ -92,9 +115,9 @@ typedef union {
     UINT16  Id55AA;\r
   } Catalog;\r
 \r
-  //\r
-  // Initial/Default Entry or Section Entry\r
-  //\r
+  ///\r
+  /// Initial/Default Entry or Section Entry\r
+  ///\r
   struct {\r
     UINT8   Indicator;\r
     UINT8   MediaType : 4;\r
@@ -106,9 +129,9 @@ typedef union {
     UINT32  Lba;\r
   } Boot;\r
 \r
-  //\r
-  // Section Header Entry\r
-  //\r
+  ///\r
+  /// Section Header Entry\r
+  ///\r
   struct {\r
     UINT8   Indicator;\r
     UINT8   PlatformId;\r