blob: d5256aa8266afd624f2ca76ae836da0ae5c451fb [file] [log] [blame]
Bill Richardsonf5db4b82010-05-27 11:15:14 -07001// 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
3// found in the LICENSE file.
4//
5// Constants describing the kernel blob content.
6
7#ifndef VBOOT_REFERENCE_KERNEL_BLOB_H_
8#define VBOOT_REFERENCE_KERNEL_BLOB_H_
9
10
11// Maximum kernel command-line size
12#define CROS_CONFIG_SIZE 4096
13
14// Size of the x86 zeropage table
15#define CROS_PARAMS_SIZE 4096
16
17// Alignment of various chunks within the kernel blob
18#define CROS_ALIGN 4096
19
20// RAM address where the 32-bit kernel expects to be started
21#define CROS_32BIT_ENTRY_ADDR 0x100000
22
23// Simplified version of the vmlinuz file header
24struct linux_kernel_header
25{
26 uint8_t pad0[0x01f1 - 0x0];
27 uint8_t setup_sects; // 1f1
28 uint8_t pad1[0x0230 - 0x1f2];
29} __attribute__ ((packed));
30
31
32// Simplified version of the x86 kernel zeropage table
33struct linux_kernel_params
34{
35 uint8_t pad0[0x01f1 - 0x0];
36 uint8_t setup_sects; // 1f1
37 uint8_t pad1[0x1fe - 0x1f2];
38 uint16_t boot_flag; // 1fe
39 uint8_t pad2[0x210 - 0x200];
40 uint8_t type_of_loader; // 210
41 uint8_t pad3[0x218 - 0x211];
42 uint32_t ramdisk_image; // 218
43 uint32_t ramdisk_size; // 21c
44 uint8_t pad4[0x228 - 0x220];
45 uint32_t cmd_line_ptr; // 228
46 uint8_t pad5[0x0cd0 - 0x22c];
47} __attribute__ ((packed));
48
49
50#endif // VBOOT_REFERENCE_KERNEL_BLOB_H_