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