Initial commit: functional for newer bzImage kernels
[wraplinux.git] / setup.h
1 #ifndef SETUP_H
2 #define SETUP_H
3
4 #include <stdint.h>
5
6 struct startup_info {
7         uint32_t rd_addr;
8         uint32_t rd_len;
9         uint32_t rd_maxaddr;
10         uint32_t setup_addr;
11         uint32_t cmdline_addr;
12 };
13
14 struct setup_header {
15         uint8_t  setup_sects;
16         uint16_t root_flags;
17         uint32_t syssize;
18         uint16_t ram_size;
19 #define RAMDISK_IMAGE_START_MASK        0x07FF
20 #define RAMDISK_PROMPT_FLAG             0x8000
21 #define RAMDISK_LOAD_FLAG               0x4000
22         uint16_t vid_mode;
23         uint16_t root_dev;
24         uint16_t boot_flag;
25         uint16_t jump;
26         uint32_t header;
27         uint16_t version;
28         uint32_t realmode_swtch;
29         uint16_t start_sys;
30         uint16_t kernel_version;
31         uint8_t  type_of_loader;
32         uint8_t  loadflags;
33 #define LOADED_HIGH     (1<<0)
34 #define KEEP_SEGMENTS   (1<<6)
35 #define CAN_USE_HEAP    (1<<7)
36         uint16_t setup_move_size;
37         uint32_t code32_start;
38         uint32_t ramdisk_image;
39         uint32_t ramdisk_size;
40         uint32_t bootsect_kludge;
41         uint16_t heap_end_ptr;
42         uint16_t _pad1;
43         uint32_t cmd_line_ptr;
44         uint32_t initrd_addr_max;
45         uint32_t kernel_alignment;
46         uint8_t  relocatable_kernel;
47         uint8_t  _pad2[3];
48         uint32_t cmdline_size;
49         uint32_t hardware_subarch;
50         uint64_t hardware_subarch_data;
51 } __attribute__((packed));
52
53 #endif  /* SETUP_H */