Skip to contentSkip to conversation

tpm: Add missing common TPM SSDT file

PATCH In review Stefan Berger 2 participants 6 messages Jun 2, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tpm: Add missing common TPM SSDT file

This patch adds the missing common SSDT TPM file.

---
 hw/i386/ssdt-tpm-common.dsl | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 hw/i386/ssdt-tpm-common.dsl
hw/i386/ssdt-tpm-common.dsl new file +36 -0
new file mode 100644
index 0000000..9da4970
@@ -0,0 +1,36 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * Common parts for TPM 1.2 and TPM 2 (with slight differences for PPI)
+ * to be #included
+ */
+
+
+    External(\_SB.PCI0.ISA, DeviceObj)
+    Scope(\_SB.PCI0.ISA) {
+        /* TPM with emulated TPM TIS interface */
+        Device (TPM) {
+            Name (_HID, EisaID ("PNP0C31"))
+            Name (_CRS, ResourceTemplate ()
+            {
+                Memory32Fixed (ReadWrite, TPM_TIS_ADDR_BASE, TPM_TIS_ADDR_SIZE)
+                IRQNoFlags () {TPM_TIS_IRQ}
+            })
+            Method (_STA, 0, NotSerialized) {
+                Return (0x0F)
+            }
+        }
+    }
Signature · 1 line
1.9.3
#1 lore raw
Quoted 3 lines · Stefan Berger

This patch adds the missing common SSDT TPM file.

I posted this too. But we really should just get rid of all this: we have already removed most ASL code except for the DSDT.

Quoted 49 lines
---
 hw/i386/ssdt-tpm-common.dsl | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 hw/i386/ssdt-tpm-common.dsl
hw/i386/ssdt-tpm-common.dsl new file +36 -0
new file mode 100644
index 0000000..9da4970
@@ -0,0 +1,36 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * Common parts for TPM 1.2 and TPM 2 (with slight differences for PPI)
+ * to be #included
+ */
+
+
+    External(\_SB.PCI0.ISA, DeviceObj)
+    Scope(\_SB.PCI0.ISA) {
+        /* TPM with emulated TPM TIS interface */
+        Device (TPM) {
+            Name (_HID, EisaID ("PNP0C31"))
+            Name (_CRS, ResourceTemplate ()
+            {
+                Memory32Fixed (ReadWrite, TPM_TIS_ADDR_BASE, TPM_TIS_ADDR_SIZE)
+                IRQNoFlags () {TPM_TIS_IRQ}
+            })
+            Method (_STA, 0, NotSerialized) {
+                Return (0x0F)
+            }
+        }
+    }
Signature · 1 line
1.9.3
#2 lore raw
Quoted 6 lines · Michael S. Tsirkin
Quoted 3 lines · Stefan Berger

This patch adds the missing common SSDT TPM file.

I posted this too. But we really should just get rid of all this: we have already removed most ASL code except for the DSDT.

Yes, I will do that. Though for reviewing I think ASL is still easier to understand.

Stefan

#3 lore raw
Quoted 4 lines · Stefan Berger
Quoted 3 lines · Michael S. Tsirkin
Quoted 2 lines · Stefan Berger

This patch adds the missing common SSDT TPM file.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

I posted this too. But we really should just get rid of all this: we have already removed most ASL code except for the DSDT.

Yes, I will do that. Though for reviewing I think ASL is still easier to understand.

Stefan

A bit, but once you get into more trickery, like you do with ifdefs with QEMU-external TPM, it becomes less clear.

Signature · 1 line
MST
#4 lore raw
Quoted 6 lines · Michael S. Tsirkin
Quoted 5 lines · Stefan Berger
Quoted 4 lines · Michael S. Tsirkin
Quoted 3 lines · Stefan Berger

This patch adds the missing common SSDT TPM file.

Quoted 9 lines
Quoted 6 lines
Quoted 2 lines

I posted this too. But we really should just get rid of all this: we have already removed most ASL code except for the DSDT.

Yes, I will do that. Though for reviewing I think ASL is still easier to understand.

Stefan

A bit, but once you get into more trickery, like you do with ifdefs with QEMU-external TPM, it becomes less clear.

Those won't go away and will turn into case statements in C...

stefan

#5 lore raw
Quoted 12 lines · Stefan Berger
Quoted 11 lines · Michael S. Tsirkin
Quoted 10 lines · Stefan Berger
Quoted 6 lines · Michael S. Tsirkin
Quoted 3 lines · Stefan Berger

This patch adds the missing common SSDT TPM file.

I posted this too. But we really should just get rid of all this: we have already removed most ASL code except for the DSDT.

Yes, I will do that. Though for reviewing I think ASL is still easier to understand.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Stefan

A bit, but once you get into more trickery, like you do with ifdefs with QEMU-external TPM, it becomes less clear.

Those won't go away and will turn into case statements in C...

stefan

Absolutely but case statements are easier to follow than ifdef tricks.

Signature · 1 line
MST