Files
OpenCellular/common/tlcl_stub.c
Gaurav Shah ce0cc30e55 VBoot Reference: Add version checking to for preventing rollbacks.
This CL adds a new function VerifyFirmwareDriver_f() means to be a part of the RO firmware which determine which copy of the firmware to boot from. It is meant to ensure that a particular firmware is only booted if 1) it verifies successfully, 2) its version is newer or equal to current stored version. In addition, the driver function also updates the stored version if needed.

Currently I am using the TLCL API with stub calls, (in fact, most of the TPM interaction is done in rollback_index.c which implements the actual version query/update API) used by the firmware.

Review URL: http://codereview.chromium.org/1241002
2010-03-24 13:48:55 -07:00

29 lines
1.0 KiB
C

/* Copyright (c) 2010 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.
*
* Stub implementations of TPM Lite Library.
*/
#include <tss/tcs.h>
void TlclLibinit(void) { return; }
void TlclStartup(void) { return; }
void TlclSelftestfull(void) { return; }
void TlclDefineSpace(uint32_t index, uint32_t perm, uint32_t size) { return; }
uint32_t TlclWrite(uint32_t index, uint8_t *data, uint32_t length) {
return TPM_SUCCESS;
}
uint32_t TlclRead(uint32_t index, uint8_t *data, uint32_t length) {
return TPM_SUCCESS;
}
void TlclWriteLock(uint32_t index) { return; }
void TlclReadLock(uint32_t index) { return; }
void TlclAssertPhysicalPresence(void) { return; }
void TlclSetNvLocked(void) { return; }
int TlclIsOwned(void) { return 0; }
void TlclForceClear(void) { return; }
void TlclPhysicalEnable(void) { return; }
int TlclPhysicalSetDeactivated(uint8_t flag) { return TPM_SUCCESS; }
int TlclGetFlags(uint8_t* disable, uint8_t* deactivated) { return TPM_SUCCESS; }