]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/IndustryStandard/ElTorito.h
added EFI_SIGNATURE_XX in Base.h, and updated the industry header files to use them.
[mirror_edk2.git] / MdePkg / Include / IndustryStandard / ElTorito.h
index d26200a80a1a4ac281570ade861ec9adc0b4a337..12375015ef1ec0ce549d1c6a557ce345409fb3b0 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,14 +14,14 @@ 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
@@ -53,24 +57,38 @@ 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
+/// CD-ROM Volume Descriptor\r
+/// \r
+typedef union { \r
+  struct {\r
+    UINT8   Type;     \r
+    CHAR8   Id[5];           ///< "CD001"    \r
+    CHAR8   Reserved[82];\r
+  } Unknown;\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