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

#ifndef __EC_BOARD_CR50_WP_H
#define __EC_BOARD_CR50_WP_H

#include "common.h"

/**
 * Initialize write protect state.
 *
 * Must be called after case-closed debugging is initialized.
 */
void init_wp_state(void);

/**
 * Get the current write protect state.
 *
 * @return 0 if WP deasserted, 1 if WP asserted
 */
int wp_is_asserted(void);

/**
 * Read the FWMP value from TPM NVMEM and set the console restriction
 * appropriately.
 */
void read_fwmp(void);

/**
 * Set WP and battery presence as dicated by CCD configuration.
 */
void board_wp_follow_ccd_config(void);

#endif  /* ! __EC_BOARD_CR50_WP_H */