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