diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2016-07-11 13:47:41 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-07-22 18:40:02 -0700 |
commit | 29d42a5e39cc6d5fc23c7c6f27f754f50156d177 (patch) | |
tree | 6fa9f8a9813c4dd0e09d262ea0f741a6d2fc5a35 /common/tpm_registers.c | |
parent | a865ec4e8080322799c655358ddfd735d6a952fb (diff) | |
download | chrome-ec-29d42a5e39cc6d5fc23c7c6f27f754f50156d177.tar.gz |
tpm: report correct fw version
The tpm firmware version register should report the current RW image's
version, not the RW_A.
BRANCH=none
BUG=chrome-os-partner:55145
TEST=verified that tpm firmware version reported by coreboot on the AP
console matches the version running on the device, for both RW_A
and RW_B.
From coreboot console log on two different runs:
Firmware version: RO: 84e2dde7 RW: cr50_v1.1.4943-f81a901
Firmware version: RO: 84e2dde7 RW_B: cr50_v1.1.4943-f81a901
Change-Id: I43f5432e44e38dbf9b42750dd2042a0f005bcbfb
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/362612
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'common/tpm_registers.c')
-rw-r--r-- | common/tpm_registers.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/common/tpm_registers.c b/common/tpm_registers.c index 66b6bcbf81..70e57c8d76 100644 --- a/common/tpm_registers.c +++ b/common/tpm_registers.c @@ -517,11 +517,13 @@ static void call_extension_command(struct tpm_cmd_header *tpmh, */ static void set_version_string(void) { + enum system_image_copy_t current_image = system_get_image_copy(); const struct SignedHeader *sh = (const struct SignedHeader *) CONFIG_PROGRAM_MEMORY_BASE; - snprintf(tpm_fw_ver, sizeof(tpm_fw_ver), "RO: %08x RW: %s", - sh->img_chk_, system_get_version(SYSTEM_IMAGE_RW)); + snprintf(tpm_fw_ver, sizeof(tpm_fw_ver), "RO: %08x RW%s: %s", + sh->img_chk_, current_image == SYSTEM_IMAGE_RW_B ? "_B" : "", + system_get_version(current_image)); } void tpm_task(void) |