]> git.proxmox.com Git - mirror_edk2.git/blob - Vlv2DeviceRefCodePkg/AcpiTablesPCAT/Gpe.asl
Vlv2DeviceRefCodePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / Vlv2DeviceRefCodePkg / AcpiTablesPCAT / Gpe.asl
1 /**************************************************************************;
2 ;* *;
3 ;* *;
4 ;* Intel Corporation - ACPI Reference Code for the Baytrail *;
5 ;* Family of Customer Reference Boards. *;
6 ;* *;
7 ;* *;
8 ;* Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved *;
9 ;
10 ; SPDX-License-Identifier: BSD-2-Clause-Patent
11 ;
12 ;* *;
13 ;* *;
14 ;**************************************************************************/
15
16
17 // General Purpose Events. This Scope handles the Run-time and
18 // Wake-time SCIs. The specific method called will be determined by
19 // the _Lxx value, where xx equals the bit location in the General
20 // Purpose Event register(s).
21
22 Scope(\_GPE)
23 {
24 //
25 // Software GPE caused the event.
26 //
27 Method(_L02)
28 {
29 // Clear GPE status bit.
30 Store(0,GPEC)
31 //
32 // Handle DTS Thermal Events.
33 //
34 External(DTSE, IntObj)
35 If(CondRefOf(DTSE))
36 {
37 If(LGreaterEqual(DTSE, 0x01))
38 {
39 Notify(\_TZ.TZ01,0x80)
40 }
41 }
42 }
43
44 //
45 // PUNIT SCI event.
46 //
47 Method(_L04)
48 {
49 // Clear the PUNIT Status Bit.
50 Store(1, PSCI)
51 }
52
53
54 //
55 // IGD OpRegion SCI event (see IGD OpRegion/Software SCI BIOS SPEC).
56 //
57 Method(_L05)
58 {
59 If(LAnd(\_SB.PCI0.GFX0.GSSE, LNot(GSMI))) // Graphics software SCI event?
60 {
61 \_SB.PCI0.GFX0.GSCI() // Handle the SWSCI
62 }
63 }
64
65 //
66 // This PME event (PCH's GPE #13) is received when any PCH internal device with PCI Power Management capabilities
67 // on bus 0 asserts the equivalent of the PME# signal.
68 //
69 Method(_L0D, 0)
70 {
71 If(LAnd(\_SB.PCI0.EHC1.PMEE, \_SB.PCI0.EHC1.PMES))
72 {
73 If(LNotEqual(OSEL, 1))
74 {
75 Store(1, \_SB.PCI0.EHC1.PMES) //Clear PME status
76 Store(0, \_SB.PCI0.EHC1.PMEE) //Disable PME
77 }
78 Notify(\_SB.PCI0.EHC1, 0x02)
79 }
80 If(LAnd(\_SB.PCI0.XHC1.PMEE, \_SB.PCI0.XHC1.PMES))
81 {
82 If(LNotEqual(OSEL, 1))
83 {
84 Store(1, \_SB.PCI0.XHC1.PMES) //Clear PME status
85 Store(0, \_SB.PCI0.XHC1.PMEE) //Disable PME
86 }
87 Notify(\_SB.PCI0.XHC1, 0x02)
88 }
89 If(LAnd(\_SB.PCI0.HDEF.PMEE, \_SB.PCI0.HDEF.PMES))
90 {
91 If(LNotEqual(OSEL, 1))
92 {
93 Store(1, \_SB.PCI0.HDEF.PMES) //Clear PME status
94 Store(0, \_SB.PCI0.HDEF.PMEE) //Disable PME
95 }
96 Notify(\_SB.PCI0.HDEF, 0x02)
97 }
98 }
99 }