treewide: Move "is part of the coreboot project" line in its own comment
[coreboot.git] / util / cbfstool / fv.h
blob996508d1861d4ca478f94f7e67b6fae585148c01
1 /* This file is part of the coreboot project. */
2 /*
3 * Copyright (C) 2013 Google, Inc.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; version 2 of the License.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
15 #define FV_SIGNATURE 0x4856465f
16 typedef struct {
17 uint8_t padding[16];
18 uint8_t guid[16];
19 uint64_t fv_length;
20 uint32_t signature;
21 uint32_t attributes;
22 uint16_t header_length;
23 uint16_t checksum;
24 uint16_t ext_header_offs;
25 uint8_t reserved;
26 uint8_t revision;
27 /* not used here: block map entries */
28 } firmware_volume_header_t;
30 #define FILETYPE_SEC 0x03
31 #define FILETYPE_PAD 0xf0
32 typedef struct {
33 uint8_t name[16];
34 uint16_t integrity;
35 uint8_t file_type;
36 uint8_t attributes;
37 uint8_t size[3];
38 uint8_t state;
39 } ffs_file_header_t;
41 #define SECTION_PE32 0x10
42 #define SECTION_RAW 0x19
43 typedef struct {
44 uint8_t size[3];
45 uint8_t section_type;
46 } common_section_header_t;