1 /* ----------------------------------------------------------------------- *
3 * Copyright 2009-2010 Shao Miller - All Rights Reserved
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8 * Boston MA 02111-1307, USA; either version 2 of the License, or
9 * (at your option) any later version; incorporated herein by reference.
11 * ----------------------------------------------------------------------- */
16 * EDD-4 El Torito structures and debugging routines
21 /* EDD-4 Bootable Optical Disc Drive Boot Volume Descriptor */
24 uint8_t boot_rec_ind
; /* Boot Record Indicator */
25 uint8_t iso9660_id
[5]; /* ISO9660 ID */
26 uint8_t ver
; /* Descriptor Version */
27 uint8_t eltorito
[32]; /* "EL TORITO" etc. */
28 uint8_t res1
[32]; /* Reserved */
29 uint32_t boot_cat
; /* Boot catalog sector */
30 uint8_t res2
[1973]; /* Reserved */
31 } MEMDISK_PACKED_POSTFIX
;
34 struct validation_entry
{
35 uint8_t header_id
; /* Header ID */
36 uint8_t platform_id
; /* Platform ID */
37 uint16_t res1
; /* Reserved */
38 uint8_t id_string
[24]; /* Manufacturer */
39 uint16_t checksum
; /* Sums with whole record to zero */
40 uint8_t key55
; /* Key byte 0x55 */
41 uint8_t keyAA
; /* Key byte 0xAA */
42 } MEMDISK_PACKED_POSTFIX
;
45 struct initial_entry
{
46 uint8_t header_id
; /* Header ID */
47 uint8_t media_type
; /* Media type */
48 uint16_t load_seg
; /* Load segment */
49 uint8_t system_type
; /* (Filesystem ID) */
50 uint8_t res1
; /* Reserved */
51 uint16_t sect_count
; /* Emulated sectors to load */
52 uint32_t load_block
; /* Starting sector of image */
53 uint8_t res2
[4]; /* Reserved */
54 } MEMDISK_PACKED_POSTFIX
;
56 /* EDD-4 Bootable Optical Disc Drive Boot Catalog (fixed-size portions) */
59 struct validation_entry validation_entry
;
60 struct initial_entry initial_entry
;
61 } MEMDISK_PACKED_POSTFIX
;
63 /* EDD-4 CD Specification Packet */
66 uint8_t size
; /* Packet size */
67 uint8_t type
; /* Boot media type (flags) */
68 uint8_t driveno
; /* INT 13h drive number */
69 uint8_t controller
; /* Controller index */
70 uint32_t start
; /* Starting LBA of image */
71 uint16_t devno
; /* Device number */
72 uint16_t userbuf
; /* User buffer segment */
73 uint16_t load_seg
; /* Load segment */
74 uint16_t sect_count
; /* Emulated sectors to load */
75 uint8_t geom1
; /* Cylinders bits 0 thru 7 */
76 uint8_t geom2
; /* Sects/track 0 thru 5, cyls 8, 9 */
77 uint8_t geom3
; /* Heads */
78 } MEMDISK_PACKED_POSTFIX
;