From f6563fb9f7e6ddef92d730d893878817db7eb1aa Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Fri, 10 May 2013 00:40:56 -0500 Subject: [PATCH] BACKPORT: pc80/tpm: allow for cache-as-ram migration As the TPM driver can be accessed in romstage after cache-as-ram is torn down use the cache-as-ram migration API to dynamically determine the global variable address. BUG=chrome-os-partner:19342 BRANCH=none TEST=Built and booted. Noted that CAR values are not read incorrectly. Change-Id: I1333f5456976edae647ede5fdefd60d806861fe1 Signed-off-by: Aaron Durbin Reviewed-on: https://gerrit.chromium.org/gerrit/51387 Reviewed-by: Stefan Reinauer --- src/drivers/pc80/tpm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drivers/pc80/tpm.c b/src/drivers/pc80/tpm.c index c7b50816be..9a4fc096ff 100644 --- a/src/drivers/pc80/tpm.c +++ b/src/drivers/pc80/tpm.c @@ -278,7 +278,7 @@ static u32 tis_probe(void) u16 vid, did; int i; - if (vendor_dev_id) + if (car_get_var(vendor_dev_id)) return 0; /* Already probed. */ didvid = tpm_read(0, TIS_REG_DID_VID); @@ -287,7 +287,7 @@ static u32 tis_probe(void) return TPM_DRIVER_ERR; } - vendor_dev_id = didvid; + car_set_var(vendor_dev_id, didvid); vid = didvid & 0xffff; did = (didvid >> 16) & 0xffff;