2 * Firmware Interface Table support.
4 * Copyright (C) 2012 Google Inc.
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.
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.
16 #ifndef __CBFSTOOL_FIT_H
17 #define __CBFSTOOL_FIT_H
19 #include "cbfs_image.h"
23 * Converts between offsets from the start of the specified image region and
24 * "top-aligned" offsets from the top of the entire flash image. Should work in
25 * both directions: accepts either type of offset and produces the other type.
26 * The implementation must have some notion of the flash image's total size.
28 typedef unsigned (*fit_offset_converter_t
)(const struct buffer
*region
,
31 int fit_update_table(struct buffer
*bootblock
, struct cbfs_image
*image
,
32 const char *microcode_blob_name
, int empty_entries
,
33 fit_offset_converter_t offset_fn
);