OLD | NEW |
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // Constants describing the kernel blob content. | 5 // Constants describing the kernel blob content. |
6 | 6 |
7 #ifndef VBOOT_REFERENCE_KERNEL_BLOB_H_ | 7 #ifndef VBOOT_REFERENCE_KERNEL_BLOB_H_ |
8 #define VBOOT_REFERENCE_KERNEL_BLOB_H_ | 8 #define VBOOT_REFERENCE_KERNEL_BLOB_H_ |
9 | 9 |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 #define CROS_32BIT_ENTRY_ADDR 0x100000 | 21 #define CROS_32BIT_ENTRY_ADDR 0x100000 |
22 | 22 |
23 // Simplified version of the vmlinuz file header | 23 // Simplified version of the vmlinuz file header |
24 struct linux_kernel_header | 24 struct linux_kernel_header |
25 { | 25 { |
26 uint8_t pad0[0x01f1 - 0x0]; | 26 uint8_t pad0[0x01f1 - 0x0]; |
27 uint8_t setup_sects; // 1f1 | 27 uint8_t setup_sects; // 1f1 |
28 uint8_t pad1[0x0230 - 0x1f2]; | 28 uint8_t pad1[0x0230 - 0x1f2]; |
29 } __attribute__ ((packed)); | 29 } __attribute__ ((packed)); |
30 | 30 |
| 31 // Simplified version of x86 kernel e820 memory map entries |
| 32 #define E820_ENTRY_MAX 128 |
| 33 #define E820_TYPE_RAM 1 |
| 34 #define E820_TYPE_RESERVED 2 |
| 35 |
| 36 struct linux_kernel_e820entry { |
| 37 uint64_t start_addr; |
| 38 uint64_t segment_size; |
| 39 uint32_t segment_type; |
| 40 } __attribute__((packed)); |
31 | 41 |
32 // Simplified version of the x86 kernel zeropage table | 42 // Simplified version of the x86 kernel zeropage table |
33 struct linux_kernel_params | 43 struct linux_kernel_params |
34 { | 44 { |
35 uint8_t pad0[0x01f1 - 0x0]; | 45 uint8_t pad0[0x1e8 - 0x0]; |
| 46 uint8_t n_e820_entry; // 1e8 |
| 47 uint8_t pad1[0x1f1 - 0x1e9]; |
36 uint8_t setup_sects; // 1f1 | 48 uint8_t setup_sects; // 1f1 |
37 uint8_t pad1[0x1fe - 0x1f2]; | 49 uint8_t pad2[0x1fe - 0x1f2]; |
38 uint16_t boot_flag; // 1fe | 50 uint16_t boot_flag; // 1fe |
39 uint8_t pad2[0x210 - 0x200]; | 51 uint8_t pad3[0x210 - 0x200]; |
40 uint8_t type_of_loader; // 210 | 52 uint8_t type_of_loader; // 210 |
41 uint8_t pad3[0x218 - 0x211]; | 53 uint8_t pad4[0x218 - 0x211]; |
42 uint32_t ramdisk_image; // 218 | 54 uint32_t ramdisk_image; // 218 |
43 uint32_t ramdisk_size;» » // 21c | 55 uint32_t ramdisk_size; // 21c |
44 uint8_t pad4[0x228 - 0x220]; | 56 uint8_t pad5[0x228 - 0x220]; |
45 uint32_t cmd_line_ptr; // 228 | 57 uint32_t cmd_line_ptr; // 228 |
46 uint8_t pad5[0x0cd0 - 0x22c]; | 58 uint8_t pad6[0x2d0 - 0x22c]; |
| 59 struct linux_kernel_e820entry e820_entries[E820_ENTRY_MAX]; // 2d0 - cd0 |
47 } __attribute__ ((packed)); | 60 } __attribute__ ((packed)); |
48 | 61 |
49 | 62 |
50 #endif // VBOOT_REFERENCE_KERNEL_BLOB_H_ | 63 #endif // VBOOT_REFERENCE_KERNEL_BLOB_H_ |
OLD | NEW |