Files
OpenCellular/include/tpm_manufacture.h
Vadim Bendebury c14114832c cr50: provide chip factory mode support
When in factory mode, we should not be trying to figure out board
strapping options, just enable SPI interface so that the tester can
communicate with the chip.

Also, to close the loop with the tester, let's add indication of the
cert installation result, by setting the two top bits of the DUMMY
(aka underrun) character to 1 and the lower bits to the endorsement
operation result (0 means success, nonzero values communicate
different failure modes) and by preventing the TPM driver from sending
anything but underrun chars on the SPI interface.

BRANCH=cr50
BUG=b:63686091
TEST=pending

Change-Id: I1a22ed6988ad87dd929a393359c4604e6ecd3b58
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/578651
Reviewed-by: Nick Sanders <nsanders@chromium.org>
2017-07-30 22:41:06 -07:00

36 lines
921 B
C

/* Copyright 2016 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.
*/
/*
* This header declares the TPM manufacture related interface.
* Individual boards are expected to provide implementations.
*/
#ifndef __CROS_EC_TPM_MANUFACTURE_H
#define __CROS_EC_TPM_MANUFACTURE_H
/* Returns non-zero if the TPM manufacture steps have been completed. */
int tpm_manufactured(void);
/* Codes for success and various manufacturing error conditions. */
enum manufacturing_status {
mnf_success = 0,
mnf_no_certs = 1,
mnf_eps_decr = 2,
mnf_bad_rsa_size = 3,
mnf_bad_total_size = 4,
mnf_bad_rsa_type = 5,
mnf_bad_ecc_type = 6,
mnf_hmac_mismatch = 7,
mnf_rsa_proc = 8,
mnf_ecc_proc = 9,
mnf_store = 10,
mnf_manufactured = 11,
};
enum manufacturing_status tpm_endorse(void);
#endif /* __CROS_EC_TPM_MANUFACTURE_H */