[SeaBIOS] [PATCH] Add pvevent device driver

Hu Tao hutao at cn.fujitsu.com
Thu Mar 14 09:48:47 CET 2013


pvevent device is used to notify host(qemu) when guest panic
happens.

ref: http://lists.nongnu.org/archive/html/qemu-devel/2013-03/msg02293.html

Signed-off-by: Hu Tao <hutao at cn.fujitsu.com>
---
 src/acpi-dsdt-isa.dsl | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/src/acpi-dsdt-isa.dsl b/src/acpi-dsdt-isa.dsl
index 23761db..d083245 100644
--- a/src/acpi-dsdt-isa.dsl
+++ b/src/acpi-dsdt-isa.dsl
@@ -99,4 +99,34 @@ Scope(\_SB.PCI0.ISA) {
             IRQNoFlags() { 3 }
         })
     }
+
+    Device(PEVT) {
+        Name(_HID, "MSFT0001")
+        OperationRegion(PEOR, SystemIO, 0x0505, 0x01)
+        Field(PEOR, ByteAcc, NoLock, Preserve) {
+            PEPT,   8,
+        }
+
+        Method(_STA, 0, NotSerialized) {
+            Store(PEPT, Local0)
+            If (LEqual(Local0, Zero)) {
+                Return (0x00)
+            } Else {
+                Return (0x0F)
+            }
+        }
+
+        Method(RDPT, 0, NotSerialized) {
+            Store(PEPT, Local0)
+            Return (Local0)
+        }
+
+        Method(WRPT, 1, NotSerialized) {
+            Store(Arg0, PEPT)
+        }
+
+        Name(_CRS, ResourceTemplate() {
+            IO(Decode16, 0x0505, 0x0505, 0x01, 0x01)
+        })
+    }
 }
-- 
1.8.1.4




More information about the SeaBIOS mailing list