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 /* Test of early writing to the NVRAM. 7 */ 8 9 #include <stdio.h> 10 #include <stdint.h> 11 #include <stdlib.h> 12 13 #include "tlcl.h" 14 #include "tlcl_tests.h" 15 #include "utility.h" 16 17 #define INDEX0 0xcafe 18 main(int argc,char ** argv)19int main(int argc, char** argv) { 20 uint32_t x; 21 22 TlclLibInit(); 23 TPM_CHECK(TlclStartup()); 24 TPM_CHECK(TlclContinueSelfTest()); 25 TPM_CHECK(TlclAssertPhysicalPresence()); 26 TPM_CHECK(TlclRead(INDEX0, (uint8_t*) &x, sizeof(x))); 27 printf("TEST SUCCEEDED\n"); 28 return 0; 29 } 30