vboot_reference: crossystem: add the "tpm_attack" command

This commands reads/sets a bit in the kernel-reserved area
of the vboot context nvram.  The bit can also be set by the
driver during execution of a TPM command, to check if the
command is interrupted by a panic or power loss.  Under
some circumstances, this correlates with the TPM assuming
it is under attack.

BUG=chromium:431360
TEST=try "crossystem tpm_attack" and variations
BRANCH=none

Change-Id: I87215d5a0becfb5c01e0b69867a339bfe6fd0b68
Reviewed-on: https://chromium-review.googlesource.com/261339
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
2 files changed