blob: 0ad650f1babf26d16cf12a1f46bd1dcc6d2d27d2 [file] [log] [blame]
Patrick Georgi7333a112020-05-08 20:48:04 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Stefan Reinauer543a6822013-02-04 15:39:13 -08002
3#define FV_SIGNATURE 0x4856465f
4typedef struct {
5 uint8_t padding[16];
6 uint8_t guid[16];
7 uint64_t fv_length;
8 uint32_t signature;
9 uint32_t attributes;
10 uint16_t header_length;
11 uint16_t checksum;
12 uint16_t ext_header_offs;
13 uint8_t reserved;
14 uint8_t revision;
15 /* not used here: block map entries */
16} firmware_volume_header_t;
17
18#define FILETYPE_SEC 0x03
Patrick Georgi46102472013-02-09 13:26:19 +010019#define FILETYPE_PAD 0xf0
Stefan Reinauer543a6822013-02-04 15:39:13 -080020typedef struct {
21 uint8_t name[16];
22 uint16_t integrity;
23 uint8_t file_type;
24 uint8_t attributes;
25 uint8_t size[3];
26 uint8_t state;
27} ffs_file_header_t;
28
29#define SECTION_PE32 0x10
Patrick Georgi46102472013-02-09 13:26:19 +010030#define SECTION_RAW 0x19
Stefan Reinauer543a6822013-02-04 15:39:13 -080031typedef struct {
32 uint8_t size[3];
33 uint8_t section_type;
34} common_section_header_t;
Dun Tan4a359402021-09-01 10:29:41 +080035
36typedef struct {
37 uint8_t guid[16];
38 uint32_t ext_header_size;
39} firmware_volume_ext_header_t;