blob: 389242a3a2cf99bfcf112eed519eba4ac4715178 [file] [log] [blame]
Furquan Shaikh7632ce02018-03-29 14:49:40 -07001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright 2018 Google LLC
5 *
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.
9 *
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.
14 */
15
16#ifndef __SECURITY_VBOOT_GBB_H__
17#define __SECURITY_VBOOT_GBB_H__
18
19#include <stdint.h>
20
Joel Kitching1a6b5c22019-04-25 19:11:13 +080021/* In order to use VB2_GBB_FLAG_* macros from vboot, include vb2_api.h. */
Furquan Shaikh7632ce02018-03-29 14:49:40 -070022
23/*
24 * Read flags field from GBB header.
25 * Return value:
26 * Success: 32-bit unsigned integer representing flags field from GBB header.
27 * Error : 0
28 */
29uint32_t gbb_get_flags(void);
30
31/*
32 * Check if given flag is set in the flags field in GBB header.
33 * Return value:
34 * true: Flag is set.
35 * false: Flag is not set or failure to read GBB flags.
36 */
37bool gbb_is_flag_set(uint32_t flag);
38
39#endif /* __SECURITY_VBOOT_GBB_H__ */