chromeos: honor MOCK_TPM=1

The TPM code wasn't previously honoring MOCK_TPM=1. Because of this,
boards with TPMs that didn't handle S3 resume properly would cause a
hard reset. Allow one to build with MOCK_TPM=1 on the command line so
that S3 can still work.

Change-Id: I9adf06647de285c0b0a3203d8897be90d7783a1e
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/2976
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
Aaron Durbin 2013-03-27 00:16:11 -05:00 committed by Ronald G. Minnich
parent d6d6db3717
commit 0703ec4fb2
2 changed files with 8 additions and 0 deletions

View File

@ -31,6 +31,12 @@ ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/chromeos.c
romstage-srcs += src/mainboard/$(MAINBOARDDIR)/chromeos.c romstage-srcs += src/mainboard/$(MAINBOARDDIR)/chromeos.c
endif endif
ifeq ($(MOCK_TPM),1)
CFLAGS += -DMOCK_TPM=1
else
CFLAGS += -DMOCK_TPM=0
endif
ifeq ($(CONFIG_VBOOT_VERIFY_FIRMWARE),y) ifeq ($(CONFIG_VBOOT_VERIFY_FIRMWARE),y)
romstage-y += vboot_loader.c romstage-y += vboot_loader.c
rmodules-y += vboot_wrapper.c rmodules-y += vboot_wrapper.c

View File

@ -231,8 +231,10 @@ static void init_vboot(int bootmode)
return; return;
} }
#if !MOCK_TPM
printk(BIOS_ERR, "TPM: Error code 0x%x. Hard reset!\n", result); printk(BIOS_ERR, "TPM: Error code 0x%x. Hard reset!\n", result);
hard_reset(); hard_reset();
#endif
} }
#endif #endif