summaryrefslogtreecommitdiff
path: root/include/vboot_hash.h
blob: e160c36c4ad488c862cfe7c670c3d13a68c20706 (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
/* Copyright 2012 The ChromiumOS Authors
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

/* Verified boot hashing memory module for Chrome EC */

#ifndef __CROS_EC_VBOOT_HASH_H
#define __CROS_EC_VBOOT_HASH_H

#include "common.h"

/**
 * Invalidate the hash if the hashed data overlaps the specified region.
 *
 * @param offset	Region start offset in flash
 * @param size		Size of region in bytes
 *
 * @return non-zero if the region overlapped the hashed region.
 */
int vboot_hash_invalidate(int offset, int size);

/**
 * Get vboot progress status.
 *
 * @return 1 if vboot hashing is in progress, 0 otherwise.
 */
int vboot_hash_in_progress(void);

/**
 * Abort hash currently in progress, and invalidate any completed hash.
 */
void vboot_hash_abort(void);

#endif  /* __CROS_EC_VBOOT_HASH_H */