]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/IndustryStandard/ElTorito.h
remove un-necessary #pragma pack(1) and clean up doxgen 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
3052ec6b 8Copyright (c) 2006 - 2008, Intel Corporation \r
a7ed1e2e 9All rights reserved. This program and the accompanying materials \r
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
55c11cc8 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
3052ec6b 58/// \r
13c31065 59/// CD-ROM Volume Descriptor\r
3052ec6b 60/// \r
61typedef union { \r
62 struct {\r
63 UINT8 Type; \r
64 CHAR8 Id[5]; ///< "CD001" \r
65 CHAR8 Reserved[82];\r
66 } Unknown;\r
67\r
68 struct {\r
69 UINT8 Type; ///< Must be 0\r
70 CHAR8 Id[5]; ///< "CD001" \r
71 UINT8 Version; ///< Must be 1 \r
72 CHAR8 SystemId[32]; ///< "EL TORITO SPECIFICATION" \r
73 CHAR8 Unused[32]; ///< Must be 0 \r
74 UINT8 EltCatalog[4]; ///< Absolute pointer to first sector of Boot Catalog\r
75 CHAR8 Unused2[13]; ///< Must be 0\r
76 } BootRecordVolume;\r
77\r
78 struct {\r
79 UINT8 Type; \r
80 CHAR8 Id[5]; ///< "CD001"\r
81 UINT8 Version; \r
82 UINT8 Unused; ///< Must be 0\r
83 CHAR8 SystemId[32]; \r
84 CHAR8 VolumeId[32]; \r
85 UINT8 Unused2[8]; ///< Must be 0 \r
86 UINT32 VolSpaceSize[2]; ///< the number of Logical Blocks\r
87 } PrimaryVolume;\r
88\r
89} CDROM_VOLUME_DESCRIPTOR; \r
a7ed1e2e 90\r
1bc5d021 91///\r
92/// Catalog Entry\r
93///\r
a7ed1e2e 94typedef union {\r
95 struct {\r
96 CHAR8 Reserved[0x20];\r
97 } Unknown;\r
98\r
1bc5d021 99 ///\r
100 /// Catalog validation entry (Catalog header)\r
101 ///\r
a7ed1e2e 102 struct {\r
103 UINT8 Indicator;\r
104 UINT8 PlatformId;\r
105 UINT16 Reserved;\r
106 CHAR8 ManufacId[24];\r
107 UINT16 Checksum;\r
108 UINT16 Id55AA;\r
109 } Catalog;\r
110\r
1bc5d021 111 ///\r
112 /// Initial/Default Entry or Section Entry\r
113 ///\r
a7ed1e2e 114 struct {\r
115 UINT8 Indicator;\r
116 UINT8 MediaType : 4;\r
117 UINT8 Reserved1 : 4;\r
118 UINT16 LoadSegment;\r
119 UINT8 SystemType;\r
120 UINT8 Reserved2;\r
121 UINT16 SectorCount;\r
122 UINT32 Lba;\r
123 } Boot;\r
124\r
1bc5d021 125 ///\r
126 /// Section Header Entry\r
127 ///\r
a7ed1e2e 128 struct {\r
129 UINT8 Indicator;\r
130 UINT8 PlatformId;\r
131 UINT16 SectionEntries;\r
132 CHAR8 Id[28];\r
133 } Section;\r
134\r
135} ELTORITO_CATALOG;\r
136\r
a7ed1e2e 137#endif\r