86{
91
92
94
95
97 "Initializing General Purpose Events (GPEs):\n"));
98
101 {
103 }
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130 if (AcpiGbl_FADT.Gpe0BlockLength &&
131 AcpiGbl_FADT.XGpe0Block.Address)
132 {
133
134
135 RegisterCount0 = (
UINT16) (AcpiGbl_FADT.Gpe0BlockLength / 2);
137
138
139
141 AcpiGbl_FADT.XGpe0Block.Address,
142 AcpiGbl_FADT.XGpe0Block.SpaceId,
143 RegisterCount0, 0,
144 AcpiGbl_FADT.SciInterrupt, &AcpiGbl_GpeFadtBlocks[0]);
145
147 {
149 "Could not create GPE Block 0"));
150 }
151 }
152
153 if (AcpiGbl_FADT.Gpe1BlockLength &&
154 AcpiGbl_FADT.XGpe1Block.Address)
155 {
156
157
158 RegisterCount1 = (
UINT16) (AcpiGbl_FADT.Gpe1BlockLength / 2);
159
160
161
162 if ((RegisterCount0) &&
163 (GpeNumberMax >= AcpiGbl_FADT.Gpe1Base))
164 {
166 "GPE0 block (GPE 0 to %u) overlaps the GPE1 block "
167 "(GPE %u to %u) - Ignoring GPE1",
168 GpeNumberMax, AcpiGbl_FADT.Gpe1Base,
169 AcpiGbl_FADT.Gpe1Base +
171
172
173
174 RegisterCount1 = 0;
175 }
176 else
177 {
178
179
181 AcpiGbl_FADT.XGpe1Block.Address,
182 AcpiGbl_FADT.XGpe1Block.SpaceId,
183 RegisterCount1,
184 AcpiGbl_FADT.Gpe1Base,
185 AcpiGbl_FADT.SciInterrupt, &AcpiGbl_GpeFadtBlocks[1]);
186
188 {
190 "Could not create GPE Block 1"));
191 }
192
193
194
195
196
197 }
198 }
199
200
201
202 if ((RegisterCount0 + RegisterCount1) == 0)
203 {
204
205
207 "There are no GPE blocks defined in the FADT\n"));
209 }
210
211
215}
#define ACPI_MTX_NAMESPACE
#define ACPI_DEBUG_PRINT(pl)
#define ACPI_EXCEPTION(plist)
#define return_ACPI_STATUS(s)
#define ACPI_FUNCTION_TRACE(a)
#define ACPI_ERROR(plist)
#define ACPI_DEBUG_PRINT_RAW(pl)
#define ACPI_GPE_REGISTER_WIDTH
ACPI_STATUS AcpiUtAcquireMutex(ACPI_MUTEX_HANDLE MutexId)
ACPI_STATUS AcpiUtReleaseMutex(ACPI_MUTEX_HANDLE MutexId)
static const WCHAR Cleanup[]
ACPI_STATUS AcpiEvCreateGpeBlock(ACPI_NAMESPACE_NODE *GpeDevice, UINT64 Address, UINT8 SpaceId, UINT32 RegisterCount, UINT16 GpeBlockBaseNumber, UINT32 InterruptNumber, ACPI_GPE_BLOCK_INFO **ReturnGpeBlock)