1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 2 * Use of this source code is governed by a BSD-style license that can be 3 * found in the LICENSE file. 4 */ 5 6 /* Only perform a TPM_Startup command. 7 */ 8 9 #include <stdio.h> 10 11 #include "tlcl.h" 12 main(int argc,char ** argv)13int main(int argc, char** argv) { 14 uint32_t result; 15 TlclLibInit(); 16 result = TlclStartup(); 17 if (result != 0) { 18 printf("tpm startup failed with 0x%x\n", result); 19 } 20 result = TlclGetFlags(NULL, NULL, NULL); 21 if (result != 0) { 22 printf("tpm getflags failed with 0x%x\n", result); 23 } 24 printf("executing SelfTestFull\n"); 25 TlclSelfTestFull(); 26 result = TlclGetFlags(NULL, NULL, NULL); 27 if (result != 0) { 28 printf("tpm getflags failed with 0x%x\n", result); 29 } 30 printf("TEST SUCCEEDED\n"); 31 return 0; 32 } 33