1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef __CBFSTOOL_CSE_FPT_H__
4 #define __CBFSTOOL_CSE_FPT_H__
6 #include <commonlib/endian.h>
7 #include <commonlib/region.h>
10 #include "cse_helpers.h"
12 #define FPT_MARKER "$FPT"
13 #define FPT_ENTRY_VERSION 0x10
15 enum fpt_hdr_version
{
16 FPT_HDR_VERSION_20
= 0x20,
17 FPT_HDR_VERSION_21
= 0x21,
20 typedef void *fpt_hdr_ptr
;
23 bool (*match_version
)(struct buffer
*buff
);
25 fpt_hdr_ptr (*read
)(struct buffer
*buff
);
26 void (*print
)(const fpt_hdr_ptr ptr
);
28 size_t (*get_entry_count
)(const fpt_hdr_ptr ptr
);
31 extern const struct fpt_hdr_ops fpt_hdr_20_ops
;
32 extern const struct fpt_hdr_ops fpt_hdr_21_ops
;
34 #endif /* __CBFSTOOL_CSE_FPT_H__ */