blob: f33e52795f8da6cbe91e20b4357c379d724613ae [file] [log] [blame]
Gerd Hoffmann4dfa5472012-11-28 10:17:40 +01001/****************************************************************
2 * HPET
3 ****************************************************************/
4
Kevin O'Connore9e7ab42012-12-02 01:09:17 -05005Scope(\_SB) {
6 Device(HPET) {
7 Name(_HID, EISAID("PNP0103"))
8 Name(_UID, 0)
9 OperationRegion(HPTM, SystemMemory, 0xFED00000, 0x400)
10 Field(HPTM, DWordAcc, Lock, Preserve) {
11 VEND, 32,
12 PRD, 32,
Gerd Hoffmann4dfa5472012-11-28 10:17:40 +010013 }
Kevin O'Connore9e7ab42012-12-02 01:09:17 -050014 Method(_STA, 0, NotSerialized) {
15 Store(VEND, Local0)
16 Store(PRD, Local1)
17 ShiftRight(Local0, 16, Local0)
18 If (LOr(LEqual(Local0, 0), LEqual(Local0, 0xffff))) {
19 Return (0x0)
20 }
21 If (LOr(LEqual(Local1, 0), LGreater(Local1, 100000000))) {
22 Return (0x0)
23 }
24 Return (0x0F)
25 }
26 Name(_CRS, ResourceTemplate() {
Gerd Hoffmanne8a76b02012-12-06 16:46:08 +010027#if 0 /* This makes WinXP BSOD for not yet figured reasons. */
Kevin O'Connore9e7ab42012-12-02 01:09:17 -050028 IRQNoFlags() {2, 8}
Gerd Hoffmanne8a76b02012-12-06 16:46:08 +010029#endif
Kevin O'Connore9e7ab42012-12-02 01:09:17 -050030 Memory32Fixed(ReadOnly,
31 0xFED00000, // Address Base
32 0x00000400, // Address Length
33 )
34 })
Gerd Hoffmann4dfa5472012-11-28 10:17:40 +010035 }
Kevin O'Connore9e7ab42012-12-02 01:09:17 -050036}