]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/IndustryStandard/ElTorito.h
Update the copyright notice format
[mirror_edk2.git] / MdePkg / Include / IndustryStandard / ElTorito.h
CommitLineData
a7ed1e2e 1/** @file\r
3052ec6b 2 ElTorito Partitions Format Definition. \r
3 This file includes some defintions from \r
4 1. "El Torito" Bootable CD-ROM Format Specification, Version 1.0.\r
5 2. Volume and File Structure of CDROM for Information Interchange, \r
6 Standard ECMA-119. (IS0 9660)\r
a7ed1e2e 7\r
9df063a0
HT
8Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
9This program and the accompanying materials \r
a7ed1e2e 10are licensed and made available under the terms and conditions of the BSD License \r
11which accompanies this distribution. The full text of the license may be found at \r
12http://opensource.org/licenses/bsd-license.php \r
13 \r
14THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
15WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
16\r
67e66cd5 17**/\r
a7ed1e2e 18\r
19#ifndef _ELTORITO_H_\r
20#define _ELTORITO_H_\r
21\r
a2461f6b 22//\r
23// CDROM_VOLUME_DESCRIPTOR.Types, defined in ISO 9660\r
24//\r
a7ed1e2e 25#define CDVOL_TYPE_STANDARD 0x0\r
26#define CDVOL_TYPE_CODED 0x1\r
27#define CDVOL_TYPE_END 0xFF\r
28\r
1bc5d021 29///\r
30/// CDROM_VOLUME_DESCRIPTOR.Id\r
31///\r
a7ed1e2e 32#define CDVOL_ID "CD001"\r
33\r
1bc5d021 34///\r
35/// CDROM_VOLUME_DESCRIPTOR.SystemId\r
36///\r
a7ed1e2e 37#define CDVOL_ELTORITO_ID "EL TORITO SPECIFICATION"\r
38\r
39//\r
40// Indicator types\r
41//\r
42#define ELTORITO_ID_CATALOG 0x01\r
43#define ELTORITO_ID_SECTION_BOOTABLE 0x88\r
44#define ELTORITO_ID_SECTION_NOT_BOOTABLE 0x00\r
45#define ELTORITO_ID_SECTION_HEADER 0x90\r
46#define ELTORITO_ID_SECTION_HEADER_FINAL 0x91\r
47\r
48//\r
49// ELTORITO_CATALOG.Boot.MediaTypes\r
50//\r
51#define ELTORITO_NO_EMULATION 0x00\r
52#define ELTORITO_12_DISKETTE 0x01\r
53#define ELTORITO_14_DISKETTE 0x02\r
54#define ELTORITO_28_DISKETTE 0x03\r
55#define ELTORITO_HARD_DISK 0x04\r
56\r
57\r
766f4bc1 58#pragma pack(1)\r
59\r
3052ec6b 60/// \r
13c31065 61/// CD-ROM Volume Descriptor\r
3052ec6b 62/// \r
63typedef union { \r
64 struct {\r
65 UINT8 Type; \r
66 CHAR8 Id[5]; ///< "CD001" \r
67 CHAR8 Reserved[82];\r
68 } Unknown;\r
69\r
1833218d 70 ///\r
71 /// Boot Record Volume Descriptor, defined in "El Torito" Specification.\r
72 ///\r
3052ec6b 73 struct {\r
74 UINT8 Type; ///< Must be 0\r
75 CHAR8 Id[5]; ///< "CD001" \r
76 UINT8 Version; ///< Must be 1 \r
77 CHAR8 SystemId[32]; ///< "EL TORITO SPECIFICATION" \r
78 CHAR8 Unused[32]; ///< Must be 0 \r
79 UINT8 EltCatalog[4]; ///< Absolute pointer to first sector of Boot Catalog\r
80 CHAR8 Unused2[13]; ///< Must be 0\r
81 } BootRecordVolume;\r
1833218d 82 \r
83 ///\r
84 /// Primary Volumn Descriptor, defined in ISO 9660.\r
85 ///\r
3052ec6b 86 struct {\r
87 UINT8 Type; \r
88 CHAR8 Id[5]; ///< "CD001"\r
89 UINT8 Version; \r
90 UINT8 Unused; ///< Must be 0\r
91 CHAR8 SystemId[32]; \r
92 CHAR8 VolumeId[32]; \r
93 UINT8 Unused2[8]; ///< Must be 0 \r
94 UINT32 VolSpaceSize[2]; ///< the number of Logical Blocks\r
95 } PrimaryVolume;\r
96\r
97} CDROM_VOLUME_DESCRIPTOR; \r
a7ed1e2e 98\r
1bc5d021 99///\r
100/// Catalog Entry\r
101///\r
a7ed1e2e 102typedef union {\r
103 struct {\r
104 CHAR8 Reserved[0x20];\r
105 } Unknown;\r
106\r
1bc5d021 107 ///\r
108 /// Catalog validation entry (Catalog header)\r
109 ///\r
a7ed1e2e 110 struct {\r
1833218d 111 UINT8 Indicator; ///< Must be 01\r
a7ed1e2e 112 UINT8 PlatformId;\r
113 UINT16 Reserved;\r
114 CHAR8 ManufacId[24];\r
115 UINT16 Checksum;\r
116 UINT16 Id55AA;\r
117 } Catalog;\r
118\r
1bc5d021 119 ///\r
120 /// Initial/Default Entry or Section Entry\r
121 ///\r
a7ed1e2e 122 struct {\r
1833218d 123 UINT8 Indicator; ///< 88 = Bootable, 00 = Not Bootable\r
a7ed1e2e 124 UINT8 MediaType : 4;\r
1833218d 125 UINT8 Reserved1 : 4; ///< Must be 0\r
a7ed1e2e 126 UINT16 LoadSegment;\r
127 UINT8 SystemType;\r
1833218d 128 UINT8 Reserved2; ///< Must be 0\r
a7ed1e2e 129 UINT16 SectorCount;\r
130 UINT32 Lba;\r
131 } Boot;\r
132\r
1bc5d021 133 ///\r
134 /// Section Header Entry\r
135 ///\r
a7ed1e2e 136 struct {\r
1833218d 137 UINT8 Indicator; ///< 90 - Header, more header follw, 91 - Final Header\r
a7ed1e2e 138 UINT8 PlatformId;\r
1833218d 139 UINT16 SectionEntries; ///< Number of section entries following this header\r
a7ed1e2e 140 CHAR8 Id[28];\r
141 } Section;\r
142\r
143} ELTORITO_CATALOG;\r
144\r
766f4bc1 145#pragma pack()\r
146\r
a7ed1e2e 147#endif\r