]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OldMdePkg/Include/IndustryStandard/ElTorito.h
Moved the MdePkg to OldMdePkg so that new code in MdePkg does not break existing...
[mirror_edk2.git] / OldMdePkg / Include / IndustryStandard / ElTorito.h
diff --git a/OldMdePkg/Include/IndustryStandard/ElTorito.h b/OldMdePkg/Include/IndustryStandard/ElTorito.h
new file mode 100644 (file)
index 0000000..bfa014c
--- /dev/null
@@ -0,0 +1,123 @@
+/** @file\r
+  ElTorito Partitions Format Definition.\r
+\r
+Copyright (c) 2006, 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
+http://opensource.org/licenses/bsd-license.php                                            \r
+                                                                                          \r
+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
+#ifndef _ELTORITO_H_\r
+#define _ELTORITO_H_\r
+\r
+//\r
+// CDROM_VOLUME_DESCRIPTOR.Types\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
+#define CDVOL_ID  "CD001"\r
+\r
+//\r
+// CDROM_VOLUME_DESCRIPTOR.SystemId\r
+//\r
+#define CDVOL_ELTORITO_ID "EL TORITO SPECIFICATION"\r
+\r
+//\r
+// Indicator types\r
+//\r
+#define ELTORITO_ID_CATALOG               0x01\r
+#define ELTORITO_ID_SECTION_BOOTABLE      0x88\r
+#define ELTORITO_ID_SECTION_NOT_BOOTABLE  0x00\r
+#define ELTORITO_ID_SECTION_HEADER        0x90\r
+#define ELTORITO_ID_SECTION_HEADER_FINAL  0x91\r
+\r
+//\r
+// ELTORITO_CATALOG.Boot.MediaTypes\r
+//\r
+#define ELTORITO_NO_EMULATION 0x00\r
+#define ELTORITO_12_DISKETTE  0x01\r
+#define ELTORITO_14_DISKETTE  0x02\r
+#define ELTORITO_28_DISKETTE  0x03\r
+#define ELTORITO_HARD_DISK    0x04\r
+\r
+\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
+//\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
+  struct {\r
+    UINT8   Indicator;\r
+    UINT8   PlatformId;\r
+    UINT16  Reserved;\r
+    CHAR8   ManufacId[24];\r
+    UINT16  Checksum;\r
+    UINT16  Id55AA;\r
+  } Catalog;\r
+\r
+  //\r
+  // Initial/Default Entry or Section Entry\r
+  //\r
+  struct {\r
+    UINT8   Indicator;\r
+    UINT8   MediaType : 4;\r
+    UINT8   Reserved1 : 4;\r
+    UINT16  LoadSegment;\r
+    UINT8   SystemType;\r
+    UINT8   Reserved2;\r
+    UINT16  SectorCount;\r
+    UINT32  Lba;\r
+  } Boot;\r
+\r
+  //\r
+  // Section Header Entry\r
+  //\r
+  struct {\r
+    UINT8   Indicator;\r
+    UINT8   PlatformId;\r
+    UINT16  SectionEntries;\r
+    CHAR8   Id[28];\r
+  } Section;\r
+\r
+} ELTORITO_CATALOG;\r
+\r
+#pragma pack()\r
+\r
+#endif\r