mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 18:25:10 +00:00
BUG=chromium-os:26317 BRANCH=none TEST=manual sudo emerge vboot_reference emerge-link vboot_reference chromeos-u-boot chromeos-installer emerge-daisy vboot_reference chromeos-u-boot chromeos-installer Signed-off-by: Randall Spangler <rspangler@chromium.org> Change-Id: I8c55ca40f3f0cacf08530ab63c886fe351bcee8e Reviewed-on: https://gerrit.chromium.org/gerrit/41152
35 lines
995 B
C
35 lines
995 B
C
/* Copyright (c) 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.
|
|
*/
|
|
|
|
/* Testing: ownership testing code, ForceClear, and nvram write limit.
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "host_common.h"
|
|
#include "tlcl.h"
|
|
#include "tlcl_tests.h"
|
|
|
|
|
|
int main(int argc, char** argv) {
|
|
uint8_t disable, deactivated;
|
|
|
|
TlclLibInit();
|
|
TPM_CHECK(TlclStartupIfNeeded());
|
|
TPM_CHECK(TlclSelfTestFull());
|
|
TPM_CHECK(TlclAssertPhysicalPresence());
|
|
TPM_CHECK(TlclGetFlags(&disable, &deactivated, NULL));
|
|
printf("disable is %d, deactivated is %d\n", disable, deactivated);
|
|
TPM_CHECK(TlclSetEnable());
|
|
TPM_CHECK(TlclSetDeactivated(0));
|
|
TPM_CHECK(TlclGetFlags(&disable, &deactivated, NULL));
|
|
printf("disable is %d, deactivated is %d\n", disable, deactivated);
|
|
if (disable == 1 || deactivated == 1) {
|
|
VbExError("failed to enable or activate");
|
|
}
|
|
printf("TEST SUCCEEDED\n");
|
|
return 0;
|
|
}
|