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