Files
OpenCellular/firmware/lib/mocked_rollback_index.c
Bill Richardson b75d8adcc0 Use virtual dev-mode switch when told to.
If VbInit() is instructed to look at a virtual dev-mode switch, then it will
use value contained in the TPM's firmware space instead of a hardware GPIO
to determine if developer mode is enabled.

This change just makes it look. It doesn't provide a way to actually set
the value in the TPM. VbInit() isn't being told to look yet, either. Those
changes are coming.

BUG=chrome-os-partner:9706
TEST=none

The usual sanity-check applies:

  make
  make runtests

But to actually test that this stuff is working IRL requires special tweaks
to other components and monitoring the serial debug output from both EC and
CPU. We'll save the hands-on tests for when it's all done.

Change-Id: Ie485ad2180224e192238bf2a5dbf95bbcb9130f9
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/23067
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2012-05-18 18:15:58 -07:00

61 lines
1.1 KiB
C

/* Copyright (c) 2010-2011 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.
*
* Functions for querying, manipulating and locking rollback indices
* stored in the TPM NVRAM.
*/
#include "rollback_index.h"
#include "tss_constants.h"
uint32_t TPMClearAndReenable(void) {
return TPM_SUCCESS;
}
uint32_t SetupTPM(int recovery_mode, int developer_mode,
RollbackSpaceFirmware* rsf) {
return TPM_SUCCESS;
}
uint32_t RollbackS3Resume(void) {
return TPM_SUCCESS;
}
uint32_t RollbackFirmwareSetup(int recovery_mode, int hw_dev_sw,
int* dev_mode_ptr, uint32_t* version) {
*version = 0;
return TPM_SUCCESS;
}
uint32_t RollbackFirmwareWrite(uint32_t version) {
return TPM_SUCCESS;
}
uint32_t RollbackFirmwareLock(void) {
return TPM_SUCCESS;
}
uint32_t RollbackKernelRead(uint32_t* version) {
*version = 0;
return TPM_SUCCESS;
}
uint32_t RollbackKernelWrite(uint32_t version) {
return TPM_SUCCESS;
}
uint32_t RollbackKernelLock(void) {
return TPM_SUCCESS;
}