switch-coreboot/src
Vadim Bendebury 08f93599a9 cr50: process uninitialized values gracefully
The vboot code tries reading rollback protection indices from the TPM,
and if the attempt to read returns TPM_E_BADINDEX, it decides that the
TPM has not yet been initialized for the Chromebook use, and needs to
be taken through the factory initialization sequence.

TPM_E_BADINDEX is an internal representation of the TPM error 0x28b,
generated on attempts to read a non existing NVMEM space.

If the space exists, but has never been written the TPM returns error
0x14a. This condition (the space exists but not written) could happen
if the previous factory initialization attempt was interrupted right
after the space was created.

Let's map this error to the same internal representation
(TPM_E_BADINDEX) so that the Chrome OS device could recover when this
condition occurs.

BRANCH=reef, gru
BUG=b:37443842
TEST=verified that the Pyro device stuck in TPM error state recovered
      when this patch was applied.

Change-Id: I6ff976c839efcd23ae26cef3ee428e7ae02e68f8
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://review.coreboot.org/20299
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-06-21 20:29:11 +00:00
..
acpi
arch arch/x86/smbios: Fix undefined behavior 2017-06-20 03:15:48 +02:00
commonlib arch/x86/ebda: Change memcpy() to endian wrappers 2017-06-20 03:13:18 +02:00
console src/console: add IS_ENABLED() around Kconfig symbol references 2017-06-12 04:08:55 +02:00
cpu cpu/x86/smm/smihandler: Apply cosmetic changes 2017-06-19 20:46:40 +02:00
device device/pnp: remove struct io_info 2017-06-13 15:21:58 +02:00
drivers drivers/net/r8168: Get mac address from VPD 2017-06-20 03:17:51 +02:00
ec device/pnp: remove struct io_info 2017-06-13 15:21:58 +02:00
include cpu/x86/smm/smihandler: Apply cosmetic changes 2017-06-19 20:46:40 +02:00
lib cr50: process uninitialized values gracefully 2017-06-21 20:29:11 +00:00
mainboard mb/google/poppy: Add camera devices power sequencing through ACPI power resources 2017-06-20 05:08:41 +02:00
northbridge nb/intel/pineview/raminit: Remove very long delays 2017-06-19 20:48:55 +02:00
soc soc/intel/common: Add SMM common code for Intel Platforms 2017-06-20 18:30:43 +02:00
southbridge southbridge/bd82x6x - add GNVS var for trackpad IRQ 2017-06-16 16:09:57 +02:00
superio device/pnp: remove struct io_info 2017-06-13 15:21:58 +02:00
vboot vboot: Separate board name and version number in FWID with a dot 2017-04-29 01:44:10 +02:00
vendorcode vendorcode/siemens: Add new values to hwilib 2017-06-13 10:27:04 +02:00
Kconfig Add support for Undefined Behavior Sanitizer 2017-06-14 19:56:59 +02:00