iPXE
include
ipxe
eltorito.h
Go to the documentation of this file.
1
#ifndef _IPXE_ELTORITO_H
2
#define _IPXE_ELTORITO_H
3
4
/**
5
* @file
6
*
7
* El Torito bootable CD-ROM specification
8
*
9
*/
10
11
FILE_LICENCE
( GPL2_OR_LATER_OR_UBDL );
12
13
#include <
stdint.h
>
14
#include <
ipxe/iso9660.h
>
15
16
/** An El Torito Boot Record Volume Descriptor (fixed portion) */
17
struct
eltorito_descriptor_fixed
{
18
/** Descriptor type */
19
uint8_t
type
;
20
/** Identifier ("CD001") */
21
uint8_t
id
[5];
22
/** Version, must be 1 */
23
uint8_t
version
;
24
/** Boot system indicator; must be "EL TORITO SPECIFICATION" */
25
uint8_t
system_id
[32];
26
}
__attribute__
(( packed ));
27
28
/** An El Torito Boot Record Volume Descriptor */
29
struct
eltorito_descriptor
{
30
/** Fixed portion */
31
struct
eltorito_descriptor_fixed
fixed
;
32
/** Unused */
33
uint8_t
unused
[32];
34
/** Boot catalog sector */
35
uint32_t
sector
;
36
}
__attribute__
(( packed ));
37
38
/** El Torito Boot Record Volume Descriptor block address */
39
#define ELTORITO_LBA 17
40
41
/** An El Torito Boot Catalog Validation Entry */
42
struct
eltorito_validation_entry
{
43
/** Header ID; must be 1 */
44
uint8_t
header_id
;
45
/** Platform ID
46
*
47
* 0 = 80x86
48
* 1 = PowerPC
49
* 2 = Mac
50
*/
51
uint8_t
platform_id
;
52
/** Reserved */
53
uint16_t
reserved
;
54
/** ID string */
55
uint8_t
id_string
[24];
56
/** Checksum word */
57
uint16_t
checksum
;
58
/** Signature; must be 0xaa55 */
59
uint16_t
signature
;
60
}
__attribute__
(( packed ));
61
62
/** El Torito platform IDs */
63
enum
eltorito_platform_id
{
64
ELTORITO_PLATFORM_X86
= 0x00,
65
ELTORITO_PLATFORM_POWERPC
= 0x01,
66
ELTORITO_PLATFORM_MAC
= 0x02,
67
};
68
69
/** A bootable entry in the El Torito Boot Catalog */
70
struct
eltorito_boot_entry
{
71
/** Boot indicator
72
*
73
* Must be @c ELTORITO_BOOTABLE for a bootable ISO image
74
*/
75
uint8_t
indicator
;
76
/** Media type
77
*
78
*/
79
uint8_t
media_type
;
80
/** Load segment */
81
uint16_t
load_segment
;
82
/** System type */
83
uint8_t
filesystem
;
84
/** Unused */
85
uint8_t
reserved_a
;
86
/** Sector count */
87
uint16_t
length
;
88
/** Starting sector */
89
uint32_t
start
;
90
/** Unused */
91
uint8_t
reserved_b
[20];
92
}
__attribute__
(( packed ));
93
94
/** Boot indicator for a bootable ISO image */
95
#define ELTORITO_BOOTABLE 0x88
96
97
/** El Torito media types */
98
enum
eltorito_media_type
{
99
/** No emulation */
100
ELTORITO_NO_EMULATION
= 0,
101
};
102
103
#endif
/* _IPXE_ELTORITO_H */
eltorito_descriptor_fixed::type
uint8_t type
Descriptor type.
Definition:
eltorito.h:19
uint16_t
unsigned short uint16_t
Definition:
stdint.h:11
eltorito_media_type
eltorito_media_type
El Torito media types.
Definition:
eltorito.h:98
eltorito_validation_entry::platform_id
uint8_t platform_id
Platform ID.
Definition:
eltorito.h:51
eltorito_descriptor_fixed::system_id
uint8_t system_id[32]
Boot system indicator; must be "EL TORITO SPECIFICATION".
Definition:
eltorito.h:25
eltorito_boot_entry::reserved_b
uint8_t reserved_b[20]
Unused.
Definition:
eltorito.h:91
eltorito_boot_entry
A bootable entry in the El Torito Boot Catalog.
Definition:
eltorito.h:70
eltorito_boot_entry::length
uint16_t length
Sector count.
Definition:
eltorito.h:87
eltorito_validation_entry::id_string
uint8_t id_string[24]
ID string.
Definition:
eltorito.h:55
eltorito_validation_entry::header_id
uint8_t header_id
Header ID; must be 1.
Definition:
eltorito.h:44
eltorito_validation_entry
An El Torito Boot Catalog Validation Entry.
Definition:
eltorito.h:42
eltorito_descriptor::unused
uint8_t unused[32]
Unused.
Definition:
eltorito.h:33
eltorito_platform_id
eltorito_platform_id
El Torito platform IDs.
Definition:
eltorito.h:63
ELTORITO_PLATFORM_POWERPC
Definition:
eltorito.h:65
eltorito_boot_entry::filesystem
uint8_t filesystem
System type.
Definition:
eltorito.h:83
eltorito_descriptor
An El Torito Boot Record Volume Descriptor.
Definition:
eltorito.h:29
__attribute__
enum eltorito_platform_id __attribute__
eltorito_validation_entry::signature
uint16_t signature
Signature; must be 0xaa55.
Definition:
eltorito.h:59
eltorito_descriptor_fixed
An El Torito Boot Record Volume Descriptor (fixed portion)
Definition:
eltorito.h:17
iso9660.h
ISO9660 CD-ROM specification.
FILE_LICENCE
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
eltorito_descriptor::fixed
struct eltorito_descriptor_fixed fixed
Fixed portion.
Definition:
eltorito.h:31
eltorito_descriptor::sector
uint32_t sector
Boot catalog sector.
Definition:
eltorito.h:35
eltorito_boot_entry::start
uint32_t start
Starting sector.
Definition:
eltorito.h:89
uint8_t
unsigned char uint8_t
Definition:
stdint.h:10
uint32_t
unsigned int uint32_t
Definition:
stdint.h:12
eltorito_validation_entry::reserved
uint16_t reserved
Reserved.
Definition:
eltorito.h:53
eltorito_boot_entry::media_type
uint8_t media_type
Media type.
Definition:
eltorito.h:79
stdint.h
ELTORITO_PLATFORM_X86
Definition:
eltorito.h:64
eltorito_boot_entry::load_segment
uint16_t load_segment
Load segment.
Definition:
eltorito.h:81
eltorito_boot_entry::indicator
uint8_t indicator
Boot indicator.
Definition:
eltorito.h:75
eltorito_boot_entry::reserved_a
uint8_t reserved_a
Unused.
Definition:
eltorito.h:85
eltorito_validation_entry::checksum
uint16_t checksum
Checksum word.
Definition:
eltorito.h:57
ELTORITO_NO_EMULATION
No emulation.
Definition:
eltorito.h:100
eltorito_descriptor_fixed::version
uint8_t version
Version, must be 1.
Definition:
eltorito.h:23
ELTORITO_PLATFORM_MAC
Definition:
eltorito.h:66
Generated by
1.8.15