]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/IndustryStandard/ElTorito.h
Import Pal.h and Sal.h.
[mirror_edk2.git] / MdePkg / Include / IndustryStandard / ElTorito.h
CommitLineData
a7ed1e2e 1/** @file\r
2 ElTorito Partitions Format Definition.\r
3\r
4Copyright (c) 2006, Intel Corporation \r
5All rights reserved. This program and the accompanying materials \r
6are licensed and made available under the terms and conditions of the BSD License \r
7which accompanies this distribution. The full text of the license may be found at \r
8http://opensource.org/licenses/bsd-license.php \r
9 \r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
12\r
13--*/\r
14\r
15#ifndef _ELTORITO_H_\r
16#define _ELTORITO_H_\r
17\r
18//\r
19// CDROM_VOLUME_DESCRIPTOR.Types\r
20//\r
21#define CDVOL_TYPE_STANDARD 0x0\r
22#define CDVOL_TYPE_CODED 0x1\r
23#define CDVOL_TYPE_END 0xFF\r
24\r
25//\r
26// CDROM_VOLUME_DESCRIPTOR.Id\r
27//\r
28#define CDVOL_ID "CD001"\r
29\r
30//\r
31// CDROM_VOLUME_DESCRIPTOR.SystemId\r
32//\r
33#define CDVOL_ELTORITO_ID "EL TORITO SPECIFICATION"\r
34\r
35//\r
36// Indicator types\r
37//\r
38#define ELTORITO_ID_CATALOG 0x01\r
39#define ELTORITO_ID_SECTION_BOOTABLE 0x88\r
40#define ELTORITO_ID_SECTION_NOT_BOOTABLE 0x00\r
41#define ELTORITO_ID_SECTION_HEADER 0x90\r
42#define ELTORITO_ID_SECTION_HEADER_FINAL 0x91\r
43\r
44//\r
45// ELTORITO_CATALOG.Boot.MediaTypes\r
46//\r
47#define ELTORITO_NO_EMULATION 0x00\r
48#define ELTORITO_12_DISKETTE 0x01\r
49#define ELTORITO_14_DISKETTE 0x02\r
50#define ELTORITO_28_DISKETTE 0x03\r
51#define ELTORITO_HARD_DISK 0x04\r
52\r
53\r
54#pragma pack(1)\r
55\r
56//\r
57// El Torito Volume Descriptor\r
58// Note that the CDROM_VOLUME_DESCRIPTOR does not match the ISO-9660\r
59// descriptor. For some reason descriptor used by El Torito is\r
60// different, but they start the same. The El Torito descriptor\r
61// is left shifted 1 byte starting with the SystemId. (Note this\r
62// causes the field to get unaligned)\r
63//\r
64typedef struct {\r
65 UINT8 Type;\r
66 CHAR8 Id[5]; // CD001\r
67 UINT8 Version;\r
68 CHAR8 SystemId[26];\r
69 CHAR8 Unused[38];\r
70 UINT8 EltCatalog[4];\r
71 CHAR8 Unused2[5];\r
72 UINT32 VolSpaceSize[2];\r
73} CDROM_VOLUME_DESCRIPTOR;\r
74\r
75//\r
76// Catalog Entry\r
77//\r
78typedef union {\r
79 struct {\r
80 CHAR8 Reserved[0x20];\r
81 } Unknown;\r
82\r
83 //\r
84 // Catalog validation entry (Catalog header)\r
85 //\r
86 struct {\r
87 UINT8 Indicator;\r
88 UINT8 PlatformId;\r
89 UINT16 Reserved;\r
90 CHAR8 ManufacId[24];\r
91 UINT16 Checksum;\r
92 UINT16 Id55AA;\r
93 } Catalog;\r
94\r
95 //\r
96 // Initial/Default Entry or Section Entry\r
97 //\r
98 struct {\r
99 UINT8 Indicator;\r
100 UINT8 MediaType : 4;\r
101 UINT8 Reserved1 : 4;\r
102 UINT16 LoadSegment;\r
103 UINT8 SystemType;\r
104 UINT8 Reserved2;\r
105 UINT16 SectorCount;\r
106 UINT32 Lba;\r
107 } Boot;\r
108\r
109 //\r
110 // Section Header Entry\r
111 //\r
112 struct {\r
113 UINT8 Indicator;\r
114 UINT8 PlatformId;\r
115 UINT16 SectionEntries;\r
116 CHAR8 Id[28];\r
117 } Section;\r
118\r
119} ELTORITO_CATALOG;\r
120\r
121#pragma pack()\r
122\r
123#endif\r