if HPET is not present do not report it in DSDT

Replicate the check that detects if HPET table should be created
in AML too.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
diff --git a/src/acpi-dsdt.dsl b/src/acpi-dsdt.dsl
index 7082b65..4e04c48 100644
--- a/src/acpi-dsdt.dsl
+++ b/src/acpi-dsdt.dsl
@@ -188,8 +188,22 @@
         Device(HPET) {
             Name(_HID,  EISAID("PNP0103"))
             Name(_UID, 0)
+            OperationRegion(HPTM, SystemMemory , 0xFED00000, 0x400)
+            Field(HPTM, DWordAcc, Lock, Preserve) {
+                    VEND, 32,
+                    PRD, 32,
+            }
             Method (_STA, 0, NotSerialized) {
-                    Return(0x0F)
+                    Store (VEND, Local0)
+                    Store (PRD, Local1)
+                    ShiftRight(Local0, 16, Local0)
+                    If (LOr (LEqual(Local0, 0), LEqual(Local0, 0xffff))) {
+                            Return (0x0)
+                    }
+                    If (LOr (LEqual(Local1, 0), LGreater(Local1, 100000000))) {
+                            Return (0x0)
+                    }
+                    Return (0x0F)
             }
             Name(_CRS, ResourceTemplate() {
                 DWordMemory(
diff --git a/src/acpi-dsdt.hex b/src/acpi-dsdt.hex
index 5dc7bb4..6f91dab 100644
--- a/src/acpi-dsdt.hex
+++ b/src/acpi-dsdt.hex
@@ -3,12 +3,12 @@
 0x53,
 0x44,
 0x54,
-0xd3,
-0x10,
+0x21,
+0x11,
 0x0,
 0x0,
 0x1,
-0x2d,
+0xda,
 0x42,
 0x58,
 0x50,
@@ -2179,16 +2179,16 @@
 0x79,
 0x0,
 0x10,
-0x4d,
-0x4,
+0x4b,
+0x9,
 0x5f,
 0x53,
 0x42,
 0x5f,
 0x5b,
 0x82,
-0x45,
-0x4,
+0x43,
+0x9,
 0x48,
 0x50,
 0x45,
@@ -2209,13 +2209,91 @@
 0x49,
 0x44,
 0x0,
+0x5b,
+0x80,
+0x48,
+0x50,
+0x54,
+0x4d,
+0x0,
+0xc,
+0x0,
+0x0,
+0xd0,
+0xfe,
+0xb,
+0x0,
+0x4,
+0x5b,
+0x81,
+0x10,
+0x48,
+0x50,
+0x54,
+0x4d,
+0x13,
+0x56,
+0x45,
+0x4e,
+0x44,
+0x20,
+0x50,
+0x52,
+0x44,
+0x5f,
+0x20,
 0x14,
-0x9,
+0x36,
 0x5f,
 0x53,
 0x54,
 0x41,
 0x0,
+0x70,
+0x56,
+0x45,
+0x4e,
+0x44,
+0x60,
+0x70,
+0x50,
+0x52,
+0x44,
+0x5f,
+0x61,
+0x7a,
+0x60,
+0xa,
+0x10,
+0x60,
+0xa0,
+0xc,
+0x91,
+0x93,
+0x60,
+0x0,
+0x93,
+0x60,
+0xb,
+0xff,
+0xff,
+0xa4,
+0x0,
+0xa0,
+0xe,
+0x91,
+0x93,
+0x61,
+0x0,
+0x94,
+0x61,
+0xc,
+0x0,
+0xe1,
+0xf5,
+0x5,
+0xa4,
+0x0,
 0xa4,
 0xa,
 0xf,