blob: 1ea50e033e718d9e481b0edec3852e39a7a0d8f7 [file] [log] [blame]
Stefan Reinauer543a6822013-02-04 15:39:13 -08001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2013 Google, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#define FV_SIGNATURE 0x4856465f
21typedef struct {
22 uint8_t padding[16];
23 uint8_t guid[16];
24 uint64_t fv_length;
25 uint32_t signature;
26 uint32_t attributes;
27 uint16_t header_length;
28 uint16_t checksum;
29 uint16_t ext_header_offs;
30 uint8_t reserved;
31 uint8_t revision;
32 /* not used here: block map entries */
33} firmware_volume_header_t;
34
35#define FILETYPE_SEC 0x03
36typedef struct {
37 uint8_t name[16];
38 uint16_t integrity;
39 uint8_t file_type;
40 uint8_t attributes;
41 uint8_t size[3];
42 uint8_t state;
43} ffs_file_header_t;
44
45#define SECTION_PE32 0x10
46typedef struct {
47 uint8_t size[3];
48 uint8_t section_type;
49} common_section_header_t;