]> xenbits.xensource.com Git - 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)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 5 Feb 2019 08:10:15 +0000 (09:10 +0100)
Signed-off-by: Stephen Douthit <stephend@silicom-usa.com>
(cherry picked from commit 42efebdf1d120554e1a30e8debf562527ec6a53d)

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())