Patrick Georgi | 7333a11 | 2020-05-08 20:48:04 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Ronald G. Minnich | 5d01ec0 | 2009-03-31 11:57:36 +0000 | [diff] [blame] | 2 | |
Stefan Reinauer | 6321758 | 2012-10-29 16:52:36 -0700 | [diff] [blame] | 3 | #ifndef __CBFS_H |
| 4 | #define __CBFS_H |
| 5 | |
Patrick Georgi | 89f2034 | 2015-10-01 15:54:04 +0200 | [diff] [blame] | 6 | #include "common.h" |
Patrick Georgi | b7b56dd8 | 2009-09-14 13:29:27 +0000 | [diff] [blame] | 7 | #include <stdint.h> |
Ronald G. Minnich | a8a133d | 2013-12-30 13:16:18 -0800 | [diff] [blame] | 8 | |
Patrick Georgi | 89f2034 | 2015-10-01 15:54:04 +0200 | [diff] [blame] | 9 | #include <vb2_api.h> |
| 10 | |
Patrick Georgi | 2c61506 | 2015-07-15 20:49:00 +0200 | [diff] [blame] | 11 | /* cbfstool will fail when trying to build a cbfs_file header that's larger |
| 12 | * than MAX_CBFS_FILE_HEADER_BUFFER. 1K should give plenty of room. */ |
| 13 | #define MAX_CBFS_FILE_HEADER_BUFFER 1024 |
| 14 | |
Ronald G. Minnich | a8a133d | 2013-12-30 13:16:18 -0800 | [diff] [blame] | 15 | /* create a magic number in host-byte order. |
| 16 | * b3 is the high order byte. |
| 17 | * in the coreboot tools, we go with the 32-bit |
| 18 | * magic number convention. |
| 19 | * This was an inline func but that breaks anything |
| 20 | * that uses it in a case statement. |
| 21 | */ |
| 22 | |
| 23 | #define makemagic(b3, b2, b1, b0)\ |
| 24 | (((b3)<<24) | ((b2) << 16) | ((b1) << 8) | (b0)) |
Ronald G. Minnich | 5d01ec0 | 2009-03-31 11:57:36 +0000 | [diff] [blame] | 25 | |
Patrick Georgi | 2062473 | 2015-07-17 21:35:46 +0200 | [diff] [blame] | 26 | /* To make CBFS more friendly to ROM, fill -1 (0xFF) instead of zero. */ |
| 27 | #define CBFS_CONTENT_DEFAULT_VALUE (-1) |
| 28 | |
Sol Boucher | 67a0a86 | 2015-03-18 12:36:27 -0700 | [diff] [blame] | 29 | // Alignment (in bytes) to be used when no master header is present |
| 30 | #define CBFS_ENTRY_ALIGNMENT 64 |
| 31 | |
David Hendricks | 90ca3b6 | 2012-11-16 14:48:22 -0800 | [diff] [blame] | 32 | #define CBFS_HEADER_MAGIC 0x4F524243 |
| 33 | #define CBFS_HEADPTR_ADDR_X86 0xFFFFFFFC |
Hung-Te Lin | 086842a | 2013-01-04 12:33:03 +0800 | [diff] [blame] | 34 | #define CBFS_HEADER_VERSION1 0x31313131 |
| 35 | #define CBFS_HEADER_VERSION2 0x31313132 |
| 36 | #define CBFS_HEADER_VERSION CBFS_HEADER_VERSION2 |
David Hendricks | 90ca3b6 | 2012-11-16 14:48:22 -0800 | [diff] [blame] | 37 | |
Patrick Georgi | 45acb34 | 2015-07-14 22:18:23 +0200 | [diff] [blame] | 38 | #define CBFS_ALIGNMENT 64 |
| 39 | |
Patrick Georgi | b7b56dd8 | 2009-09-14 13:29:27 +0000 | [diff] [blame] | 40 | struct cbfs_header { |
| 41 | uint32_t magic; |
| 42 | uint32_t version; |
| 43 | uint32_t romsize; |
| 44 | uint32_t bootblocksize; |
Patrick Georgi | 45acb34 | 2015-07-14 22:18:23 +0200 | [diff] [blame] | 45 | uint32_t align; /* hard coded to 64 byte */ |
Patrick Georgi | b7b56dd8 | 2009-09-14 13:29:27 +0000 | [diff] [blame] | 46 | uint32_t offset; |
David Hendricks | 90ca3b6 | 2012-11-16 14:48:22 -0800 | [diff] [blame] | 47 | uint32_t architecture; /* Version 2 */ |
| 48 | uint32_t pad[1]; |
Stefan Reinauer | 6a00113 | 2017-07-13 02:20:27 +0200 | [diff] [blame] | 49 | } __packed; |
Ronald G. Minnich | 5d01ec0 | 2009-03-31 11:57:36 +0000 | [diff] [blame] | 50 | |
David Hendricks | 90ca3b6 | 2012-11-16 14:48:22 -0800 | [diff] [blame] | 51 | #define CBFS_ARCHITECTURE_UNKNOWN 0xFFFFFFFF |
| 52 | #define CBFS_ARCHITECTURE_X86 0x00000001 |
Gabe Black | 51edd54 | 2013-09-30 23:00:33 -0700 | [diff] [blame] | 53 | #define CBFS_ARCHITECTURE_ARM 0x00000010 |
Ronald G. Minnich | 5f43184 | 2013-11-12 09:03:33 -0800 | [diff] [blame] | 54 | #define CBFS_ARCHITECTURE_AARCH64 0x0000aa64 |
Julius Werner | f96d905 | 2019-08-16 15:35:39 -0700 | [diff] [blame] | 55 | #define CBFS_ARCHITECTURE_MIPS 0x00000100 /* deprecated */ |
Ronald G. Minnich | 833bf20 | 2014-10-16 10:55:39 +0000 | [diff] [blame] | 56 | #define CBFS_ARCHITECTURE_RISCV 0xc001d0de |
Ronald G. Minnich | ed4aa04 | 2015-12-11 18:19:52 +0000 | [diff] [blame] | 57 | #define CBFS_ARCHITECTURE_PPC64 0x407570ff |
David Hendricks | 90ca3b6 | 2012-11-16 14:48:22 -0800 | [diff] [blame] | 58 | |
Hung-Te Lin | eab2c81 | 2013-01-29 01:56:17 +0800 | [diff] [blame] | 59 | #define CBFS_FILE_MAGIC "LARCHIVE" |
| 60 | |
Patrick Georgi | b7b56dd8 | 2009-09-14 13:29:27 +0000 | [diff] [blame] | 61 | struct cbfs_file { |
Stefan Reinauer | a1e4824 | 2011-10-21 14:24:57 -0700 | [diff] [blame] | 62 | uint8_t magic[8]; |
Patrick Georgi | 5dc01ac | 2015-07-15 16:40:44 +0200 | [diff] [blame] | 63 | /* length of file data */ |
Patrick Georgi | b7b56dd8 | 2009-09-14 13:29:27 +0000 | [diff] [blame] | 64 | uint32_t len; |
| 65 | uint32_t type; |
Patrick Georgi | 2c61506 | 2015-07-15 20:49:00 +0200 | [diff] [blame] | 66 | /* offset to struct cbfs_file_attribute or 0 */ |
Patrick Georgi | 0d618af | 2015-07-15 18:28:23 +0200 | [diff] [blame] | 67 | uint32_t attributes_offset; |
Patrick Georgi | 5dc01ac | 2015-07-15 16:40:44 +0200 | [diff] [blame] | 68 | /* length of header incl. variable data */ |
Patrick Georgi | b7b56dd8 | 2009-09-14 13:29:27 +0000 | [diff] [blame] | 69 | uint32_t offset; |
Patrick Georgi | c569b8b | 2015-07-15 16:42:38 +0200 | [diff] [blame] | 70 | char filename[]; |
Stefan Reinauer | 6a00113 | 2017-07-13 02:20:27 +0200 | [diff] [blame] | 71 | } __packed; |
Patrick Georgi | b7b56dd8 | 2009-09-14 13:29:27 +0000 | [diff] [blame] | 72 | |
Patrick Georgi | ab5754d | 2015-09-01 18:20:20 +0200 | [diff] [blame] | 73 | #if defined __GNUC__ && (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 |
Patrick Georgi | 5dc01ac | 2015-07-15 16:40:44 +0200 | [diff] [blame] | 74 | _Static_assert(sizeof(struct cbfs_file) == 24, "cbfs_file size mismatch"); |
Patrick Georgi | 57c67e5 | 2015-09-01 12:37:41 +0200 | [diff] [blame] | 75 | #endif |
Patrick Georgi | 5dc01ac | 2015-07-15 16:40:44 +0200 | [diff] [blame] | 76 | |
Patrick Georgi | c6a8da7 | 2015-07-22 21:32:03 +0200 | [diff] [blame] | 77 | /* The common fields of extended cbfs file attributes. |
| 78 | Attributes are expected to start with tag/len, then append their |
| 79 | specific fields. */ |
| 80 | struct cbfs_file_attribute { |
| 81 | uint32_t tag; |
| 82 | /* len covers the whole structure, incl. tag and len */ |
| 83 | uint32_t len; |
| 84 | uint8_t data[0]; |
Stefan Reinauer | 6a00113 | 2017-07-13 02:20:27 +0200 | [diff] [blame] | 85 | } __packed; |
Patrick Georgi | c6a8da7 | 2015-07-22 21:32:03 +0200 | [diff] [blame] | 86 | |
Patrick Georgi | 2c61506 | 2015-07-15 20:49:00 +0200 | [diff] [blame] | 87 | /* Depending on how the header was initialized, it may be backed with 0x00 or |
| 88 | * 0xff. Support both. */ |
| 89 | #define CBFS_FILE_ATTR_TAG_UNUSED 0 |
| 90 | #define CBFS_FILE_ATTR_TAG_UNUSED2 0xffffffff |
Daisuke Nojiri | 8984a63 | 2015-07-09 15:07:45 -0700 | [diff] [blame] | 91 | #define CBFS_FILE_ATTR_TAG_COMPRESSION 0x42435a4c |
Patrick Georgi | 89f2034 | 2015-10-01 15:54:04 +0200 | [diff] [blame] | 92 | #define CBFS_FILE_ATTR_TAG_HASH 0x68736148 |
Daisuke Nojiri | ff906fb | 2017-10-30 17:38:04 -0700 | [diff] [blame] | 93 | #define CBFS_FILE_ATTR_TAG_POSITION 0x42435350 /* PSCB */ |
Werner Zeh | e9995f1 | 2016-01-14 13:22:37 +0100 | [diff] [blame] | 94 | #define CBFS_FILE_ATTR_TAG_ALIGNMENT 0x42434c41 /* ALCB */ |
Daisuke Nojiri | ff906fb | 2017-10-30 17:38:04 -0700 | [diff] [blame] | 95 | #define CBFS_FILE_ATTR_TAG_PADDING 0x47444150 /* PDNG */ |
Philipp Deppenwiese | 7ba5871 | 2018-11-20 13:54:49 +0100 | [diff] [blame] | 96 | #define CBFS_FILE_ATTR_TAG_IBB 0x32494242 /* Initial BootBlock */ |
Daisuke Nojiri | 8984a63 | 2015-07-09 15:07:45 -0700 | [diff] [blame] | 97 | |
| 98 | struct cbfs_file_attr_compression { |
| 99 | uint32_t tag; |
| 100 | uint32_t len; |
| 101 | /* whole file compression format. 0 if no compression. */ |
| 102 | uint32_t compression; |
| 103 | uint32_t decompressed_size; |
Stefan Reinauer | 6a00113 | 2017-07-13 02:20:27 +0200 | [diff] [blame] | 104 | } __packed; |
Patrick Georgi | 2c61506 | 2015-07-15 20:49:00 +0200 | [diff] [blame] | 105 | |
Patrick Georgi | 89f2034 | 2015-10-01 15:54:04 +0200 | [diff] [blame] | 106 | struct cbfs_file_attr_hash { |
| 107 | uint32_t tag; |
| 108 | uint32_t len; |
| 109 | uint32_t hash_type; |
| 110 | /* hash_data is len - sizeof(struct) bytes */ |
| 111 | uint8_t hash_data[]; |
Stefan Reinauer | 6a00113 | 2017-07-13 02:20:27 +0200 | [diff] [blame] | 112 | } __packed; |
Patrick Georgi | 89f2034 | 2015-10-01 15:54:04 +0200 | [diff] [blame] | 113 | |
Werner Zeh | e9995f1 | 2016-01-14 13:22:37 +0100 | [diff] [blame] | 114 | struct cbfs_file_attr_position { |
| 115 | uint32_t tag; |
| 116 | uint32_t len; |
| 117 | uint32_t position; |
Stefan Reinauer | 6a00113 | 2017-07-13 02:20:27 +0200 | [diff] [blame] | 118 | } __packed; |
Werner Zeh | e9995f1 | 2016-01-14 13:22:37 +0100 | [diff] [blame] | 119 | |
| 120 | struct cbfs_file_attr_align { |
| 121 | uint32_t tag; |
| 122 | uint32_t len; |
| 123 | uint32_t alignment; |
Stefan Reinauer | 6a00113 | 2017-07-13 02:20:27 +0200 | [diff] [blame] | 124 | } __packed; |
Werner Zeh | e9995f1 | 2016-01-14 13:22:37 +0100 | [diff] [blame] | 125 | |
Patrick Georgi | b7b56dd8 | 2009-09-14 13:29:27 +0000 | [diff] [blame] | 126 | struct cbfs_stage { |
Stefan Reinauer | a1e4824 | 2011-10-21 14:24:57 -0700 | [diff] [blame] | 127 | uint32_t compression; |
| 128 | uint64_t entry; |
| 129 | uint64_t load; |
| 130 | uint32_t len; |
| 131 | uint32_t memlen; |
Stefan Reinauer | 6a00113 | 2017-07-13 02:20:27 +0200 | [diff] [blame] | 132 | } __packed; |
Patrick Georgi | b7b56dd8 | 2009-09-14 13:29:27 +0000 | [diff] [blame] | 133 | |
Ronald G. Minnich | a8a133d | 2013-12-30 13:16:18 -0800 | [diff] [blame] | 134 | #define PAYLOAD_SEGMENT_CODE makemagic('C', 'O', 'D', 'E') |
| 135 | #define PAYLOAD_SEGMENT_DATA makemagic('D', 'A', 'T', 'A') |
Wei Hu | 2ad6ee9 | 2014-04-16 22:52:59 -0700 | [diff] [blame] | 136 | #define PAYLOAD_SEGMENT_BSS makemagic('B', 'S', 'S', ' ') |
Ronald G. Minnich | a8a133d | 2013-12-30 13:16:18 -0800 | [diff] [blame] | 137 | #define PAYLOAD_SEGMENT_PARAMS makemagic('P', 'A', 'R', 'A') |
| 138 | #define PAYLOAD_SEGMENT_ENTRY makemagic('E', 'N', 'T', 'R') |
Patrick Georgi | b7b56dd8 | 2009-09-14 13:29:27 +0000 | [diff] [blame] | 139 | |
| 140 | struct cbfs_payload_segment { |
Stefan Reinauer | a1e4824 | 2011-10-21 14:24:57 -0700 | [diff] [blame] | 141 | uint32_t type; |
| 142 | uint32_t compression; |
| 143 | uint32_t offset; |
| 144 | uint64_t load_addr; |
| 145 | uint32_t len; |
| 146 | uint32_t mem_len; |
Stefan Reinauer | 6a00113 | 2017-07-13 02:20:27 +0200 | [diff] [blame] | 147 | } __packed; |
Patrick Georgi | b7b56dd8 | 2009-09-14 13:29:27 +0000 | [diff] [blame] | 148 | |
| 149 | struct cbfs_payload { |
| 150 | struct cbfs_payload_segment segments; |
Stefan Reinauer | 6a00113 | 2017-07-13 02:20:27 +0200 | [diff] [blame] | 151 | } __packed; |
Ronald G. Minnich | 5d01ec0 | 2009-03-31 11:57:36 +0000 | [diff] [blame] | 152 | |
| 153 | /** These are standard component types for well known |
| 154 | components (i.e - those that coreboot needs to consume. |
| 155 | Users are welcome to use any other value for their |
| 156 | components */ |
| 157 | |
Patrick Georgi | 239c742 | 2015-09-09 20:11:26 +0200 | [diff] [blame] | 158 | #define CBFS_COMPONENT_BOOTBLOCK 0x01 |
| 159 | #define CBFS_COMPONENT_CBFSHEADER 0x02 |
Stefan Reinauer | 800379f | 2010-03-01 08:34:19 +0000 | [diff] [blame] | 160 | #define CBFS_COMPONENT_STAGE 0x10 |
Patrick Rudolph | 4f5bed5 | 2018-05-02 09:44:08 +0200 | [diff] [blame] | 161 | #define CBFS_COMPONENT_SELF 0x20 |
Patrick Rudolph | 7ee05ed | 2018-04-26 09:35:13 +0200 | [diff] [blame] | 162 | #define CBFS_COMPONENT_FIT 0x21 |
Stefan Reinauer | 800379f | 2010-03-01 08:34:19 +0000 | [diff] [blame] | 163 | #define CBFS_COMPONENT_OPTIONROM 0x30 |
| 164 | #define CBFS_COMPONENT_BOOTSPLASH 0x40 |
| 165 | #define CBFS_COMPONENT_RAW 0x50 |
| 166 | #define CBFS_COMPONENT_VSA 0x51 |
| 167 | #define CBFS_COMPONENT_MBI 0x52 |
| 168 | #define CBFS_COMPONENT_MICROCODE 0x53 |
Martin Roth | dde307c | 2015-03-24 15:54:20 -0600 | [diff] [blame] | 169 | #define CBFS_COMPONENT_FSP 0x60 |
| 170 | #define CBFS_COMPONENT_MRC 0x61 |
Pratik Prajapati | fb12873 | 2015-09-02 13:46:30 -0700 | [diff] [blame] | 171 | #define CBFS_COMPONENT_MMA 0x62 |
| 172 | #define CBFS_COMPONENT_EFI 0x63 |
Julius Werner | f975e55 | 2016-08-19 15:43:06 -0700 | [diff] [blame] | 173 | #define CBFS_COMPONENT_STRUCT 0x70 |
Patrick Georgi | a865b17 | 2011-01-14 07:40:24 +0000 | [diff] [blame] | 174 | #define CBFS_COMPONENT_CMOS_DEFAULT 0xaa |
Martin Roth | dde307c | 2015-03-24 15:54:20 -0600 | [diff] [blame] | 175 | #define CBFS_COMPONENT_SPD 0xab |
| 176 | #define CBFS_COMPONENT_MRC_CACHE 0xac |
Patrick Georgi | 2447937 | 2011-01-18 13:56:36 +0000 | [diff] [blame] | 177 | #define CBFS_COMPONENT_CMOS_LAYOUT 0x01aa |
Ronald G. Minnich | 5d01ec0 | 2009-03-31 11:57:36 +0000 | [diff] [blame] | 178 | |
Ronald G. Minnich | 83b8f0c | 2009-05-08 19:23:00 +0000 | [diff] [blame] | 179 | /* The deleted type is chosen to be a value |
| 180 | * that can be written in a FLASH from all other |
Stefan Reinauer | 14e2277 | 2010-04-27 06:56:47 +0000 | [diff] [blame] | 181 | * values. |
Ronald G. Minnich | 83b8f0c | 2009-05-08 19:23:00 +0000 | [diff] [blame] | 182 | */ |
| 183 | #define CBFS_COMPONENT_DELETED 0 |
| 184 | |
Stefan Reinauer | 14e2277 | 2010-04-27 06:56:47 +0000 | [diff] [blame] | 185 | /* for all known FLASH, this value can be changed |
| 186 | * to all other values. This allows NULL files to be |
Ronald G. Minnich | 83b8f0c | 2009-05-08 19:23:00 +0000 | [diff] [blame] | 187 | * changed without a block erase |
| 188 | */ |
Peter Stuge | 1d862de | 2009-04-14 00:08:34 +0000 | [diff] [blame] | 189 | #define CBFS_COMPONENT_NULL 0xFFFFFFFF |
Ronald G. Minnich | 5d01ec0 | 2009-03-31 11:57:36 +0000 | [diff] [blame] | 190 | |
Patrick Georgi | dc37dab | 2015-09-09 16:46:00 +0200 | [diff] [blame] | 191 | static struct typedesc_t filetypes[] unused = { |
Patrick Georgi | 239c742 | 2015-09-09 20:11:26 +0200 | [diff] [blame] | 192 | {CBFS_COMPONENT_BOOTBLOCK, "bootblock"}, |
| 193 | {CBFS_COMPONENT_CBFSHEADER, "cbfs header"}, |
Patrick Georgi | dc37dab | 2015-09-09 16:46:00 +0200 | [diff] [blame] | 194 | {CBFS_COMPONENT_STAGE, "stage"}, |
Ronald G. Minnich | c6d1349 | 2018-05-15 18:05:07 -0700 | [diff] [blame] | 195 | {CBFS_COMPONENT_SELF, "simple elf"}, |
Patrick Rudolph | 7ee05ed | 2018-04-26 09:35:13 +0200 | [diff] [blame] | 196 | {CBFS_COMPONENT_FIT, "fit"}, |
Patrick Georgi | dc37dab | 2015-09-09 16:46:00 +0200 | [diff] [blame] | 197 | {CBFS_COMPONENT_OPTIONROM, "optionrom"}, |
| 198 | {CBFS_COMPONENT_BOOTSPLASH, "bootsplash"}, |
| 199 | {CBFS_COMPONENT_RAW, "raw"}, |
| 200 | {CBFS_COMPONENT_VSA, "vsa"}, |
| 201 | {CBFS_COMPONENT_MBI, "mbi"}, |
| 202 | {CBFS_COMPONENT_MICROCODE, "microcode"}, |
| 203 | {CBFS_COMPONENT_FSP, "fsp"}, |
| 204 | {CBFS_COMPONENT_MRC, "mrc"}, |
| 205 | {CBFS_COMPONENT_CMOS_DEFAULT, "cmos_default"}, |
| 206 | {CBFS_COMPONENT_CMOS_LAYOUT, "cmos_layout"}, |
| 207 | {CBFS_COMPONENT_SPD, "spd"}, |
| 208 | {CBFS_COMPONENT_MRC_CACHE, "mrc_cache"}, |
Pratik Prajapati | fb12873 | 2015-09-02 13:46:30 -0700 | [diff] [blame] | 209 | {CBFS_COMPONENT_MMA, "mma"}, |
| 210 | {CBFS_COMPONENT_EFI, "efi"}, |
Julius Werner | f975e55 | 2016-08-19 15:43:06 -0700 | [diff] [blame] | 211 | {CBFS_COMPONENT_STRUCT, "struct"}, |
Patrick Georgi | dc37dab | 2015-09-09 16:46:00 +0200 | [diff] [blame] | 212 | {CBFS_COMPONENT_DELETED, "deleted"}, |
| 213 | {CBFS_COMPONENT_NULL, "null"} |
| 214 | }; |
| 215 | |
Patrick Georgi | 89f2034 | 2015-10-01 15:54:04 +0200 | [diff] [blame] | 216 | static const struct typedesc_t types_cbfs_hash[] unused = { |
| 217 | {VB2_HASH_INVALID, "none"}, |
| 218 | {VB2_HASH_SHA1, "sha1"}, |
| 219 | {VB2_HASH_SHA256, "sha256"}, |
| 220 | {VB2_HASH_SHA512, "sha512"}, |
| 221 | {0, NULL} |
| 222 | }; |
| 223 | |
| 224 | static size_t widths_cbfs_hash[] unused = { |
| 225 | [VB2_HASH_INVALID] = 0, |
| 226 | [VB2_HASH_SHA1] = 20, |
| 227 | [VB2_HASH_SHA256] = 32, |
| 228 | [VB2_HASH_SHA512] = 64, |
| 229 | }; |
| 230 | |
| 231 | #define CBFS_NUM_SUPPORTED_HASHES ARRAY_SIZE(widths_cbfs_hash) |
| 232 | |
Stefan Reinauer | db5b893 | 2013-01-18 15:53:22 -0800 | [diff] [blame] | 233 | #define CBFS_SUBHEADER(_p) ( (void *) ((((uint8_t *) (_p)) + ntohl((_p)->offset))) ) |
Patrick Georgi | 2c61506 | 2015-07-15 20:49:00 +0200 | [diff] [blame] | 234 | |
Ronald G. Minnich | a8a133d | 2013-12-30 13:16:18 -0800 | [diff] [blame] | 235 | /* cbfs_image.c */ |
| 236 | uint32_t get_cbfs_entry_type(const char *name, uint32_t default_value); |
Ronald G. Minnich | a8a133d | 2013-12-30 13:16:18 -0800 | [diff] [blame] | 237 | uint32_t get_cbfs_compression(const char *name, uint32_t unknown); |
Stefan Reinauer | db5b893 | 2013-01-18 15:53:22 -0800 | [diff] [blame] | 238 | |
Ronald G. Minnich | 818f369 | 2014-02-04 08:29:35 -0800 | [diff] [blame] | 239 | /* cbfs-mkpayload.c */ |
| 240 | void xdr_segs(struct buffer *output, |
| 241 | struct cbfs_payload_segment *segs, int nseg); |
Aaron Durbin | ca63027 | 2014-08-05 10:48:20 -0500 | [diff] [blame] | 242 | void xdr_get_seg(struct cbfs_payload_segment *out, |
| 243 | struct cbfs_payload_segment *in); |
Ronald G. Minnich | 818f369 | 2014-02-04 08:29:35 -0800 | [diff] [blame] | 244 | |
Stefan Reinauer | 6321758 | 2012-10-29 16:52:36 -0700 | [diff] [blame] | 245 | #endif |