summaryrefslogtreecommitdiff
path: root/memdisk/eltorito.h
diff options
context:
space:
mode:
Diffstat (limited to 'memdisk/eltorito.h')
-rw-r--r--memdisk/eltorito.h28
1 files changed, 12 insertions, 16 deletions
diff --git a/memdisk/eltorito.h b/memdisk/eltorito.h
index 7d46e1d9..27b570da 100644
--- a/memdisk/eltorito.h
+++ b/memdisk/eltorito.h
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------- *
*
- * Copyright 2009 Shao Miller - All Rights Reserved
+ * Copyright 2009-2010 Shao Miller - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -18,17 +18,8 @@
#include <stdint.h>
-/*
- * Uncomment for El Torito debugging
- *
- * #define DBG_ELTORITO 1
- */
-
-#ifdef DBG_ELTORITO
-extern void eltorito_dump(uint32_t);
-#endif
-
/* EDD-4 Bootable Optical Disc Drive Boot Volume Descriptor */
+MEMDISK_PACKED_PREFIX
struct edd4_bvd {
uint8_t boot_rec_ind; /* Boot Record Indicator */
uint8_t iso9660_id[5]; /* ISO9660 ID */
@@ -37,8 +28,9 @@ struct edd4_bvd {
uint8_t res1[32]; /* Reserved */
uint32_t boot_cat; /* Boot catalog sector */
uint8_t res2[1973]; /* Reserved */
-} __attribute__ ((packed));
+} MEMDISK_PACKED_POSTFIX;
+MEMDISK_PACKED_PREFIX
struct validation_entry {
uint8_t header_id; /* Header ID */
uint8_t platform_id; /* Platform ID */
@@ -47,8 +39,9 @@ struct validation_entry {
uint16_t checksum; /* Sums with whole record to zero */
uint8_t key55; /* Key byte 0x55 */
uint8_t keyAA; /* Key byte 0xAA */
-} __attribute__ ((packed));
+} MEMDISK_PACKED_POSTFIX;
+MEMDISK_PACKED_PREFIX
struct initial_entry {
uint8_t header_id; /* Header ID */
uint8_t media_type; /* Media type */
@@ -58,15 +51,17 @@ struct initial_entry {
uint16_t sect_count; /* Emulated sectors to load */
uint32_t load_block; /* Starting sector of image */
uint8_t res2[4]; /* Reserved */
-} __attribute__ ((packed));
+} MEMDISK_PACKED_POSTFIX;
/* EDD-4 Bootable Optical Disc Drive Boot Catalog (fixed-size portions) */
+MEMDISK_PACKED_PREFIX
struct edd4_bootcat {
struct validation_entry validation_entry;
struct initial_entry initial_entry;
-} __attribute__ ((packed));
+} MEMDISK_PACKED_POSTFIX;
/* EDD-4 CD Specification Packet */
+MEMDISK_PACKED_PREFIX
struct edd4_cd_pkt {
uint8_t size; /* Packet size */
uint8_t type; /* Boot media type (flags) */
@@ -80,4 +75,5 @@ struct edd4_cd_pkt {
uint8_t geom1; /* Cylinders bits 0 thru 7 */
uint8_t geom2; /* Sects/track 0 thru 5, cyls 8, 9 */
uint8_t geom3; /* Heads */
-} __attribute__ ((packed));
+} MEMDISK_PACKED_POSTFIX;
+