summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/include/bzimage.h
diff options
context:
space:
mode:
authorMichael Brown2007-01-14 05:27:25 +0100
committerMichael Brown2007-01-14 05:27:25 +0100
commitb07161f397c3a29af4c891268f0fe7f1b08aefc5 (patch)
tree152760e5d4bdde8d257e09b8905d45bc7c2a9a17 /src/arch/i386/include/bzimage.h
parentReplace image->entry with image->priv. (diff)
downloadipxe-b07161f397c3a29af4c891268f0fe7f1b08aefc5.tar.gz
ipxe-b07161f397c3a29af4c891268f0fe7f1b08aefc5.tar.xz
ipxe-b07161f397c3a29af4c891268f0fe7f1b08aefc5.zip
Placeholder bzImage support
Diffstat (limited to 'src/arch/i386/include/bzimage.h')
-rw-r--r--src/arch/i386/include/bzimage.h73
1 files changed, 73 insertions, 0 deletions
diff --git a/src/arch/i386/include/bzimage.h b/src/arch/i386/include/bzimage.h
new file mode 100644
index 00000000..4b6c1cf3
--- /dev/null
+++ b/src/arch/i386/include/bzimage.h
@@ -0,0 +1,73 @@
+#ifndef _BZIMAGE_H
+#define _BZIMAGE_H
+
+#include <stdint.h>
+
+/**
+ * A bzImage header
+ *
+ * As documented in Documentation/i386/boot.txt
+ */
+struct bzimage_header {
+ /** The size of the setup in sectors
+ *
+ * If this field contains 0, assume it contains 4.
+ */
+ uint8_t setup_sects;
+ /** If set, the root is mounted readonly */
+ uint16_t root_flags;
+ /** DO NOT USE - for bootsect.S use only */
+ uint16_t syssize;
+ /** DO NOT USE - obsolete */
+ uint16_t swap_dev;
+ /** DO NOT USE - for bootsect.S use only */
+ uint16_t ram_size;
+ /** Video mode control */
+ uint16_t vid_mode;
+ /** Default root device number */
+ uint16_t root_dev;
+ /** 0xAA55 magic number */
+ uint16_t boot_flag;
+ /** Jump instruction */
+ uint16_t jump;
+ /** Magic signature "HdrS" */
+ uint32_t header;
+ /** Boot protocol version supported */
+ uint16_t version;
+ /** Boot loader hook (see below) */
+ uint32_t realmode_swtch;
+ /** The load-low segment (0x1000) (obsolete) */
+ uint16_t start_sys;
+ /** Pointer to kernel version string */
+ uint16_t kernel_version;
+ /** Boot loader identifier */
+ uint8_t type_of_loader;
+ /** Boot protocol option flags */
+ uint8_t loadflags;
+ /** Move to high memory size (used with hooks) */
+ uint16_t setup_move_size;
+ /** Boot loader hook (see below) */
+ uint32_t code32_start;
+ /** initrd load address (set by boot loader) */
+ uint32_t ramdisk_image;
+ /** initrd size (set by boot loader) */
+ uint32_t ramdisk_size;
+ /** DO NOT USE - for bootsect.S use only */
+ uint32_t bootsect_kludge;
+ /** Free memory after setup end */
+ uint16_t heap_end_ptr;
+ /** Unused */
+ uint16_t pad1;
+ /** 32-bit pointer to the kernel command line */
+ uint32_t cmd_line_ptr;
+ /** Highest legal initrd address */
+ uint32_t initrd_addr_max;
+} __attribute__ (( packed ));
+
+/** Offset of bzImage header within kernel image */
+#define BZHDR_OFFSET 0x1f1
+
+/** bzImage magic signature value */
+#define BZIMAGE_SIGNATURE 0x53726448
+
+#endif /* _BZIMAGE_H */