aboutsummaryrefslogtreecommitdiff
path: root/src/security/vboot/gbb.h
blob: 550548d61311b6883c5480dad75c27c5a2bd0483 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
 * This file is part of the coreboot project.
 *
 * Copyright 2018 Google LLC
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; version 2 of the License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#ifndef __SECURITY_VBOOT_GBB_H__
#define __SECURITY_VBOOT_GBB_H__

#include <stdint.h>

/* In order to use GBB_FLAG_* macros from vboot, include gbb_header.h. */

/*
 * Read flags field from GBB header.
 * Return value:
 * Success: 32-bit unsigned integer representing flags field from GBB header.
 * Error  : 0
 */
uint32_t gbb_get_flags(void);

/*
 * Check if given flag is set in the flags field in GBB header.
 * Return value:
 * true: Flag is set.
 * false: Flag is not set or failure to read GBB flags.
 */
bool gbb_is_flag_set(uint32_t flag);

#endif /* __SECURITY_VBOOT_GBB_H__ */