On 05/15/2015 11:13 AM, Igor Mammedov wrote:
+ Field(HIGH, AnyAcc, NoLock, Preserve) {
+ SIG1, 32,
+ SIZE, 16,
+ CODE, 8,
+ SUCC, 8,
+ CODO, 8,
+ RESP, 32
+ }
+ // Check signature and sufficient space
+ If (LAnd(
+ LEqual(SIG1, TCG_MAGIC),
using SIG1 seems to be redundant now, the same goes for BIOS part.
Why just not drop it?
I would like to keep the signature as an indicator that the BIOS has
initialized the memory. Would that be acceptable ? QEMU provides the
ACPI, the BIOS is indep. of it and the OS only sees what QEMU has
provided. The OS wouldn't know whether there's a BIOS that supports it
what the ACPI indicates.
}
diff --git a/include/hw/acpi/tpm.h b/include/hw/acpi/tpm.h
index 6d516c6..8d9c8dc 100644
--- a/include/hw/acpi/tpm.h
+++ b/include/hw/acpi/tpm.h
@@ -31,4 +31,24 @@
#define TPM2_START_METHOD_MMIO 6
+/*
+ * Physical Presence Interface -- shared with the BIOS
+ */
+#define TCG_MAGIC 0x41504354
+
+#if 0
+struct tpm_ppi {
+ uint32_t sign1; // TCG_MAGIC
+ uint16_t size; // number of subsequent bytes for ACPI to access
+ uint8_t opcode; // set by ACPI
+ uint8_t failure; // set by BIOS (0 = success)
+ uint8_t recent_opcode; // set by BIOS
+ uint32_t response; // set by BIOS
+ uint8_t next_step; // BIOS only
+ uint32_t sign2; // TCG_MAGIC
+} QEMU_PACKED;
+#endif
I removed sign2 from the SeaBIOS code, so only 1 signature.
Stefan