blob: 461fefb5de861bcafa05c07f24738f4d18f79aed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/* Copyright 2010 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/* Test of early writing to the NVRAM.
*/
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include "tlcl.h"
#include "tlcl_tests.h"
#define INDEX0 0xcafe
int main(int argc, char** argv) {
uint32_t x;
TlclLibInit();
TPM_CHECK(TlclStartup());
TPM_CHECK(TlclContinueSelfTest());
TPM_CHECK(TlclAssertPhysicalPresence());
TPM_CHECK(TlclRead(INDEX0, (uint8_t*) &x, sizeof(x)));
printf("TEST SUCCEEDED\n");
return 0;
}
|