mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 10:14:55 +00:00
Change-Id: I4c9b7a937103f3978cbed6629ee4057018b80eae More cleanup. Also allow some tests to run even when TPM is already started. Change-Id: I23558b96a1de55bbeca42dbf2e44f6802a0ec85b Reorganize and standardize behavior of tests. Change-Id: Id32fd09211a72deaa66a3dd0f973d35506ff96f2 BUG=433 TEST=ran all the tests I could run without TPM-free BIOS Review URL: http://codereview.chromium.org/3389004
33 lines
785 B
C
33 lines
785 B
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.
|
|
*/
|
|
|
|
/* Only perform a TPM_Startup command.
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "tlcl.h"
|
|
|
|
int main(int argc, char** argv) {
|
|
uint32_t result;
|
|
TlclLibInit();
|
|
result = TlclStartup();
|
|
if (result != 0) {
|
|
printf("tpm startup failed with 0x%x\n", result);
|
|
}
|
|
result = TlclGetFlags(NULL, NULL, NULL);
|
|
if (result != 0) {
|
|
printf("tpm getflags failed with 0x%x\n", result);
|
|
}
|
|
printf("executing SelfTestFull\n");
|
|
TlclSelfTestFull();
|
|
result = TlclGetFlags(NULL, NULL, NULL);
|
|
if (result != 0) {
|
|
printf("tpm getflags failed with 0x%x\n", result);
|
|
}
|
|
printf("TEST SUCCEEDED\n");
|
|
return 0;
|
|
}
|