mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 18:25:10 +00:00
This adds two new flags to crossystem: clear_tpm_owner_request clear_tpm_owner_done The first one requests that the firmware clear the TPM owner on the next boot. When the firmware does this, it will set clear_tpm_owner_request=0, and set clear_tpm_owner_done=1. The OS can use the done-flag as a hint that trusted things guarded by the TPM are no longer trustable. BUG=chromium-os:31974 TEST=manual crossystem // both flags initially 0 crossystem clear_tpm_owner_request=1 crossystem clear_tpm_owner_done=1 // request=1, done=0; done can be cleared but not set by crossystem reboot tpmc getownership // owned=no crossystem // request=0, done=1 crossystem clear_tpm_owner_done=0 crossystem // both flags 0 again Signed-off-by: Randall Spangler <rspangler@chromium.org> Change-Id: I49f83f3c39c3efc3945116c51a241d255c2e42cd Reviewed-on: https://gerrit.chromium.org/gerrit/25646
69 lines
1.4 KiB
C
69 lines
1.4 KiB
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.
|
|
*
|
|
* Functions for querying, manipulating and locking rollback indices
|
|
* stored in the TPM NVRAM.
|
|
*/
|
|
|
|
#include "rollback_index.h"
|
|
|
|
#include "tss_constants.h"
|
|
|
|
|
|
uint32_t SetVirtualDevMode(int val) {
|
|
return TPM_SUCCESS;
|
|
}
|
|
|
|
|
|
uint32_t TPMClearAndReenable(void) {
|
|
return TPM_SUCCESS;
|
|
}
|
|
|
|
|
|
uint32_t SetupTPM(int recovery_mode, int developer_mode,
|
|
int disable_dev_request, int clear_tpm_owner_request,
|
|
RollbackSpaceFirmware* rsf) {
|
|
return TPM_SUCCESS;
|
|
}
|
|
|
|
|
|
uint32_t RollbackS3Resume(void) {
|
|
return TPM_SUCCESS;
|
|
}
|
|
|
|
|
|
uint32_t RollbackFirmwareSetup(int recovery_mode, int is_hw_dev,
|
|
int disable_dev_request,
|
|
int clear_tpm_owner_request,
|
|
int *is_virt_dev, 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;
|
|
}
|