mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
If flash is being written, any pending hash calculation is likely to be invalid. BRANCH=None BUG=chrome-os-partner:38103 TEST=on Cyan, run hundreds of flashrom cycles to make sure there are no read, erase or write errors Change-Id: I915f8db7998c56fc12e7d85173232882fb7ed80d Signed-off-by: Divya Jyothi <divya.jyothi@intel.com> Reviewed-on: https://chromium-review.googlesource.com/282211 Reviewed-by: Shawn N <shawnn@chromium.org> Commit-Queue: Bernie Thompson <bhthompson@chromium.org> Tested-by: Bernie Thompson <bhthompson@chromium.org>
36 lines
887 B
C
36 lines
887 B
C
/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
|
|
* 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 */
|