]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - arch/x86/cpu/qemu/acpi/hpet.asl
x86: Add DSDT table for supporting ACPI on QEMU
[karo-tx-uboot.git] / arch / x86 / cpu / qemu / acpi / hpet.asl
1 /* HPET */
2
3 Scope(\_SB) {
4     Device(HPET) {
5         Name(_HID, EISAID("PNP0103"))
6         Name(_UID, 0)
7         OperationRegion(HPTM, SystemMemory, 0xfed00000, 0x400)
8         Field(HPTM, DWordAcc, Lock, Preserve) {
9             VEND, 32,
10             PRD, 32,
11         }
12         Method(_STA, 0, NotSerialized) {
13             Store(VEND, Local0)
14             Store(PRD, Local1)
15             ShiftRight(Local0, 16, Local0)
16             If (LOr(LEqual(Local0, 0), LEqual(Local0, 0xffff))) {
17                 Return (0x0)
18             }
19             If (LOr(LEqual(Local1, 0), LGreater(Local1, 100000000))) {
20                 Return (0x0)
21             }
22             Return (0x0f)
23         }
24         Name(_CRS, ResourceTemplate() {
25             Memory32Fixed(ReadOnly,
26                 0xfed00000,         /* Address Base */
27                 0x00000400,         /* Address Length */
28                 )
29         })
30     }
31 }