cpu/x86/smm/pci_resource_store: Store DEV/VEN ID
[coreboot2.git] / src / mainboard / emulation / qemu-i440fx / acpi / hpet.asl
blobe9b48584ac9ef714a7b2aa540ba7fcda2a11ab29
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <arch/hpet.h>
5 /****************************************************************
6  * HPET
7  ****************************************************************/
9 Scope(\_SB) {
10     Device(HPET) {
11         Name(_HID, EISAID("PNP0103"))
12         Name(_UID, 0)
13         OperationRegion(HPTM, SystemMemory, HPET_BASE_ADDRESS, 0x400)
14         Field(HPTM, DWordAcc, Lock, Preserve) {
15             VEND, 32,
16             PRD, 32,
17         }
18         Method(_STA, 0, NotSerialized) {
19             Local0 = VEND
20             Local1 = PRD
21             Local0 >>= 16
22             If ((Local0 == 0) || (Local0 == 0xffff)) {
23                 Return (0x0)
24             }
25             If ((Local1 == 0) || (Local1 > 100000000)) {
26                 Return (0x0)
27             }
28             Return (0x0F)
29         }
30         Name(_CRS, ResourceTemplate() {
31             Memory32Fixed(ReadOnly,
32                 HPET_BASE_ADDRESS,  // Address Base
33                 0x00000400,         // Address Length
34                 )
35         })
36     }