]> xenbits.xensource.com Git - people/andrewcoop/seabios.git/commitdiff
tpm: Check for TPM related ACPI tables before attempting hw probe
authorStephen Douthit <stephend@silicom-usa.com>
Wed, 7 Mar 2018 18:17:36 +0000 (13:17 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Wed, 28 Nov 2018 02:02:49 +0000 (21:02 -0500)
Signed-off-by: Stephen Douthit <stephend@silicom-usa.com>
src/tcgbios.c

index 40b30281909f471cdea6c9a80fc9089ac7966a5b..24846d3b14d4619a9504d87956875eb5d0d56b70 100644 (file)
@@ -968,6 +968,13 @@ tpm_setup(void)
     if (!CONFIG_TCGBIOS)
         return;
 
+    int ret = tpm_tpm2_probe();
+    if (ret) {
+        ret = tpm_tcpa_probe();
+        if (ret)
+            return;
+    }
+
     TPM_version = tpmhw_probe();
     if (TPM_version == TPM_VERSION_NONE)
         return;
@@ -976,13 +983,6 @@ tpm_setup(void)
             "TCGBIOS: Detected a TPM %s.\n",
              (TPM_version == TPM_VERSION_1_2) ? "1.2" : "2");
 
-    int ret = tpm_tpm2_probe();
-    if (ret) {
-        ret = tpm_tcpa_probe();
-        if (ret)
-            return;
-    }
-
     TPM_working = 1;
 
     if (runningOnXen())