| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
#ifndef VBOOT_REFERENCE_KERNEL_BLOB_H_ |
| 9 |
#define VBOOT_REFERENCE_KERNEL_BLOB_H_ |
| 10 |
|
| 11 |
|
| 12 |
#define VMLINUZ_HEADER_SIG 0x53726448 |
| 13 |
|
| 14 |
|
| 15 |
#define CROS_CONFIG_SIZE 4096 |
| 16 |
|
| 17 |
|
| 18 |
#define CROS_PARAMS_SIZE 4096 |
| 19 |
|
| 20 |
|
| 21 |
#define CROS_ALIGN 4096 |
| 22 |
|
| 23 |
|
| 24 |
#define CROS_NO_ENTRY_ADDR (~0) |
| 25 |
|
| 26 |
|
| 27 |
#define CROS_32BIT_ENTRY_ADDR 0x100000 |
| 28 |
|
| 29 |
|
| 30 |
#define E820_ENTRY_MAX 128 |
| 31 |
#define E820_TYPE_RAM 1 |
| 32 |
#define E820_TYPE_RESERVED 2 |
| 33 |
|
| 34 |
struct linux_kernel_e820entry { |
| 35 |
uint64_t start_addr; |
| 36 |
uint64_t segment_size; |
| 37 |
uint32_t segment_type; |
| 38 |
} __attribute__((packed)); |
| 39 |
|
| 40 |
|
| 41 |
struct linux_kernel_params { |
| 42 |
uint8_t pad0[0x1e8 - 0x0]; |
| 43 |
uint8_t n_e820_entry; |
| 44 |
uint8_t pad1[0x1f1 - 0x1e9]; |
| 45 |
uint8_t setup_sects; |
| 46 |
uint8_t pad2[0x1fe - 0x1f2]; |
| 47 |
uint16_t boot_flag; |
| 48 |
uint16_t jump; |
| 49 |
uint32_t header; |
| 50 |
uint16_t version; |
| 51 |
uint8_t pad3[0x210 - 0x208]; |
| 52 |
uint8_t type_of_loader; |
| 53 |
uint8_t pad4[0x218 - 0x211]; |
| 54 |
uint32_t ramdisk_image; |
| 55 |
uint32_t ramdisk_size; |
| 56 |
uint8_t pad5[0x228 - 0x220]; |
| 57 |
uint32_t cmd_line_ptr; |
| 58 |
uint32_t ramdisk_max; |
| 59 |
uint32_t kernel_alignment; |
| 60 |
uint8_t relocatable_kernel; |
| 61 |
uint8_t min_alignment; |
| 62 |
uint8_t pad6[0x2d0 - 0x236]; |
| 63 |
struct linux_kernel_e820entry |
| 64 |
e820_entries[E820_ENTRY_MAX]; |
| 65 |
} __attribute__((packed)); |
| 66 |
|
| 67 |
#endif |