mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-02 22:23:42 +00:00
BUG=chrome-os-partner:9707 TEST=manual make make runtests You can also test it by clearing the TPM, then manually looking at the TPM regions. In dev-mode, clear the regions and you'll see something like this: localhost ~ # tpmc read 1007 a 1 0 0 0 0 0 0 0 0 0 localhost ~ # tpmc read 1008 d 1 4c 57 52 47 0 0 0 0 0 0 0 0 localhost ~ # Go back to normal mode and reboot, and you'll see something like this: localhost ~ # tpmc read 1007 a 2 0 1 0 1 0 0 0 0 4f localhost ~ # tpmc read 1008 d 2 4c 57 52 47 1 0 1 0 0 0 0 55 localhost ~ # The important things are that the first number is now 2, instead of 1, and the last number is not zero (it's a checksum, so it'll vary depending on the other numbers, which will themselves vary according to the firmware and kernel versions). Change-Id: Ia4040311c2a4b2819792549b883377c8b6b89d48 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/22856 Reviewed-by: Randall Spangler <rspangler@chromium.org>
55 lines
1.4 KiB
C
55 lines
1.4 KiB
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.
|
|
*/
|
|
|
|
/* System includes for vboot reference library. This is the ONLY
|
|
* place in firmware/ where system headers may be included via
|
|
* #include <...>, so that there's only one place that needs to be
|
|
* fixed up for platforms which don't have all the system includes.
|
|
*
|
|
* Files in firmware/stub may still include system headers, because
|
|
* they're local implementations and will be ported to each system
|
|
* anyway. */
|
|
|
|
#ifndef VBOOT_REFERENCE_SYSINCLUDES_H_
|
|
#define VBOOT_REFERENCE_SYSINCLUDES_H_
|
|
|
|
#ifdef CHROMEOS_ENVIRONMENT
|
|
|
|
#include <inttypes.h> /* For PRIu64 */
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
|
|
#if defined(HAVE_ENDIAN_H) && defined(HAVE_LITTLE_ENDIAN)
|
|
#include <byteswap.h>
|
|
#include <memory.h>
|
|
#endif
|
|
|
|
#define POSSIBLY_UNUSED __attribute__((unused))
|
|
|
|
#ifdef __STRICT_ANSI__
|
|
#define INLINE
|
|
#else
|
|
#define INLINE inline
|
|
#endif
|
|
|
|
#else
|
|
#include "biosincludes.h"
|
|
#endif
|
|
|
|
#ifndef _MSC_VER
|
|
#define __pragma(...)
|
|
#endif
|
|
|
|
#if defined (CHROMEOS_ENVIRONMENT) || defined (TARGET_TEST_MODE)
|
|
|
|
/* 64-bit operations, for platforms where they need to be function calls */
|
|
#define UINT64_RSHIFT(v, shiftby) (((uint64_t)(v)) >> (shiftby))
|
|
#define UINT64_MULT32(v, multby) (((uint64_t)(v)) * ((uint32_t)(multby)))
|
|
|
|
#endif
|
|
|
|
#endif /* VBOOT_REFERENCE_SYSINCLUDES_H_ */
|