blob: 04a34e31089820ad22abe7d7b6ba704b58f738d5 [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.
Stefan Reinauer543a6822013-02-04 15:39:13 -080014 */
15
16#define FV_SIGNATURE 0x4856465f
17typedef struct {
18 uint8_t padding[16];
19 uint8_t guid[16];
20 uint64_t fv_length;
21 uint32_t signature;
22 uint32_t attributes;
23 uint16_t header_length;
24 uint16_t checksum;
25 uint16_t ext_header_offs;
26 uint8_t reserved;
27 uint8_t revision;
28 /* not used here: block map entries */
29} firmware_volume_header_t;
30
31#define FILETYPE_SEC 0x03
Patrick Georgi46102472013-02-09 13:26:19 +010032#define FILETYPE_PAD 0xf0
Stefan Reinauer543a6822013-02-04 15:39:13 -080033typedef struct {
34 uint8_t name[16];
35 uint16_t integrity;
36 uint8_t file_type;
37 uint8_t attributes;
38 uint8_t size[3];
39 uint8_t state;
40} ffs_file_header_t;
41
42#define SECTION_PE32 0x10
Patrick Georgi46102472013-02-09 13:26:19 +010043#define SECTION_RAW 0x19
Stefan Reinauer543a6822013-02-04 15:39:13 -080044typedef struct {
45 uint8_t size[3];
46 uint8_t section_type;
47} common_section_header_t;