Commit Graph

16 Commits

Author SHA1 Message Date
Bill Richardson
c9e039c1b3 Remove nonexistant functions from tlcl.h
The functions TlclLog() and TlclSetLogLevel() are declared in tlcl.h, but do
not appear anywhere else in the source. Let's not declare nonexistant
functions.

BUG=chromium:231567
BRANCH=ToT
TEST=make runtests

These never existed or did anything. They still don't.

Change-Id: Id6f0216d70b7b62d91486aba7d6cd996dc5f7d8d
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/205708
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2014-06-26 02:39:34 +00:00
Bill Richardson
0c3ba249ab Massive refactoring of external header files.
This reduces the number of exported header files to the minimum needed by
the existing userspace utilities and firmware implementations.

BUG=chromium:221544
BRANCH=none
TEST=manual, trybots
CQ-DEPEND=CL:47019,CL:47022,CL:47023

  sudo FEATURES=test emerge vboot_reference
  FEATURES=test emerge-$BOARD \
                vboot_reference \
                chromeos-cryptohome \
                chromeos-installer \
                chromeos-u-boot \
                peach-u-boot \
                depthcharge

Change-Id: I2946cc2dbaf5459a6c5eca92ca57d546498e6d85
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/47021
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2013-04-02 14:12:52 -07:00
Randall Spangler
c3d488d155 Add tlcl tests
Verifies the right TPM commands are called, but doesn't check at a
detailed level that they're packed properly.

BUG=chromium-os:38139
BRANCH=none
TEST=make runtests

Change-Id: I6c14db083ac0a40d4738582d200d9687cddb99de
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42261
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
2013-01-31 09:38:27 -08:00
Randall Spangler
a2db67d204 Reformat header files to kernel style
No code changes, just reformatting.

BUG=none
BRANCH=none
TEST=make runtests

Change-Id: Id5bac79545e9803d19b45da160c535f7e06465c6
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42016
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
2013-01-25 17:24:57 -08:00
Luigi Semenzato
3428b4bcd9 Make tpmc able to send and receive raw datagrams.
This is immediately needed to debug a Parrot TPM problems, but
we've had similar situation in the past and probably will again
in the future.

BUG=chromium-os:37819
TEST=manually tested with a couple of different packets, and error inputs
BRANCH=none

Change-Id: Id7f66bdbdfe5887fa49cd62af4a9b807fa3d9a89
Reviewed-on: https://gerrit.chromium.org/gerrit/41166
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
2013-01-11 18:15:14 -08:00
Kees Cook
8b6da26a6e tlcl: add GetOwner command
Since the "ownership" permament flag does not indicate if the TPM is
currently owned, the state of TPM Ownership must be read via a Capability
read of TPM_CAP_PROP_OWNER. This adds the "getownership" function.

BUG=chromium-os:22172
TEST=x86-alex build & manual test

Change-Id: I2fc9e933e891ba40190d008436b22496dced1c93
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/24784
Reviewed-by: Will Drewry <wad@chromium.org>
2012-06-13 14:22:12 -07:00
Kees Cook
f9e82e9695 mount-encrypted: close TPM when spawning resizer
When the filesystem resizing process starts, it has the TPM open,
which means it can collide with tcsd after the main process exits.
Additionally, improve the debugging around TPM usage for better timing
analysis.

BUG=None
TEST=lumpy build & manual testing

Change-Id: I7028131015fb972c99e8b3d035f58346f08fbd06
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/19535
Reviewed-by: Elly Jones <ellyjones@chromium.org>
2012-04-05 13:27:17 -07:00
Kees Cook
f0605cbdc3 tpm_lite: implement TPM_GetRandom
Provide TPM_GetRandom function to library callers.

BUG=chromium-os:22172
TEST=lumpy build & manual testing

Change-Id: Id604fd92490ba697033158a580b0b4df1d975932
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/17120
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
2012-03-01 15:25:31 -08:00
Kees Cook
946370d012 tpmc: add PCR reading function
Add ability to report a single PCR value via the tpmc utility. Using
/sys/devices/platform/tpm_tis/pcrs is too slow, since it reads all
PCRs before returning. Anything wanting to read PCR0 on a time-critical
path needs maximum speed.

BUG=chromium-os:22172
TEST=install and test x86-alex.

Change-Id: I2d450961d33fa314d54b909135a74aa756279ec6
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/13891
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
2012-01-09 15:00:52 -08:00
Randall Spangler
1b1998dff0 Vboot wrapper initial implementation
Patch 1: Initial change
Patch 2: Fix comment in vboot_struct.h
Patch 3: Revert files unintentionally reverted
Patch 4: (rebase)
Patch 5: (rebase)
Patch 6: Revert files unintentionally reverted (again)
Patch 7: Fix mocked tlcl for ARM build

BUG=chromium-os:17010
TEST=make && make runtests; works on H2C; emerge-tegra2_seaboard chromeos-bootimage compiles

Change-Id: I6e5ce72d41b9297c07a3f330a881eba68cfabee2
Reviewed-on: http://gerrit.chromium.org/gerrit/3593
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
2011-07-08 13:31:36 -07:00
Luigi Semenzato
54992f9d33 Added TPM_SaveState command.
Change-Id: If7b6ef3cba733b74ba13db0871e6ac554d0d84ef

BUG=chromium-os:433
TEST=none

Review URL: http://codereview.chromium.org/6696043
2011-03-16 10:56:48 -07:00
Gaurav Shah
b64faaa7f4 Update PCR state with the state of the firmware keyblock flags too.
I re-factored the extend call into its own module, since it doesn't necessarily
need to be couple with rollbackfirmwaresetup.

BUG=chrome-os-partner:2372
TEST=Tried emerge-x86-generic and emerge-arm-generic vboot_reference.

Change-Id: I0d3115b10b686133e63e304570325ebdbd50ae3a

Review URL: http://codereview.chromium.org/6696006
2011-03-15 16:36:29 -07:00
Rong Chang
baa3bbe7a5 Move tpm lite API to common include path
In order to run test cases in both Linux user mode and u-boot command
mode. The API header tlcl.h must be accessed by both ebuilds.

Change-Id: Ic027dc118f26666b88bf54c511e2455a55e4eb8f

BUG=chromium-os:10497
TEST=emerge vboot_reference-firmware successfully

Review URL: http://codereview.chromium.org/6469089
2011-02-23 10:41:38 +08:00
Randall Spangler
39f66114c0 Add tpm lite to vboot reference
Review URL: http://codereview.chromium.org/2919010
2010-07-14 09:10:23 -07:00
Luigi Semenzato
416f681882 This test sets the TPM to a each of a large amount of "interesting" initial states, and runs the firmware code at user level.
This code compiles and installs using a modified ebuild (which needs to be committed after this change).

Review URL: http://codereview.chromium.org/2857030
2010-07-08 12:12:12 -07:00
Randall Spangler
620c38cf34 Remove unused files, and tidy the directory structure of the remaining ones.
Review URL: http://codereview.chromium.org/2815011
2010-06-17 14:45:22 -07:00