Files
OpenCellular/tests/tpm_lite/tpmtest_earlynvram.c
Randall Spangler 17f8d34109 Rename files and defines to simplify makefile.
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
2013-01-11 16:14:24 -08:00

30 lines
643 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.
*/
/* Test of early writing to the NVRAM.
*/
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include "tlcl.h"
#include "tlcl_tests.h"
#include "utility.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;
}