Subversion Repositories Kolibri OS

Rev

Rev 1498 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1498 Rev 2216
Line 6... Line 6...
6
 
6
 
7
/******************************************************************************
7
/******************************************************************************
8
 *
8
 *
9
 * 1. Copyright Notice
9
 * 1. Copyright Notice
10
 *
10
 *
11
 * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp.
11
 * Some or all of this work - Copyright (c) 1999 - 2011, Intel Corp.
12
 * All rights reserved.
12
 * All rights reserved.
13
 *
13
 *
14
 * 2. License
14
 * 2. License
15
 *
15
 *
Line 178... Line 178...
178
}
178
}
Line 179... Line 179...
179
 
179
 
180
 
180
 
181
/*******************************************************************************
-
 
182
 *
-
 
183
 * FUNCTION:    AcpiEvInstallFadtGpes
-
 
184
 *
-
 
185
 * PARAMETERS:  None
-
 
186
 *
-
 
187
 * RETURN:      Status
-
 
188
 *
-
 
189
 * DESCRIPTION: Completes initialization of the FADT-defined GPE blocks
-
 
190
 *              (0 and 1). This causes the _PRW methods to be run, so the HW
-
 
191
 *              must be fully initialized at this point, including global lock
-
 
192
 *              support.
-
 
193
 *
-
 
194
 ******************************************************************************/
-
 
195
 
-
 
196
ACPI_STATUS
-
 
197
AcpiEvInstallFadtGpes (
-
 
198
    void)
-
 
199
{
-
 
200
    ACPI_STATUS             Status;
-
 
201
 
-
 
202
 
-
 
203
    ACPI_FUNCTION_TRACE (EvInstallFadtGpes);
-
 
204
 
-
 
205
 
-
 
206
    /* Namespace must be locked */
-
 
207
 
-
 
208
    Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
-
 
209
    if (ACPI_FAILURE (Status))
-
 
210
    {
-
 
211
        return (Status);
-
 
212
    }
-
 
213
 
-
 
214
    /* FADT GPE Block 0 */
-
 
215
 
-
 
216
    (void) AcpiEvInitializeGpeBlock (
-
 
217
                AcpiGbl_FadtGpeDevice, AcpiGbl_GpeFadtBlocks[0]);
-
 
218
 
-
 
219
    /* FADT GPE Block 1 */
-
 
220
 
-
 
221
    (void) AcpiEvInitializeGpeBlock (
-
 
222
                AcpiGbl_FadtGpeDevice, AcpiGbl_GpeFadtBlocks[1]);
-
 
223
 
-
 
224
    (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
-
 
225
    return_ACPI_STATUS (AE_OK);
-
 
226
}
-
 
227
 
-
 
228
 
-
 
229
/*******************************************************************************
181
/*******************************************************************************
230
 *
182
 *
231
 * FUNCTION:    AcpiEvInstallXruptHandlers
183
 * FUNCTION:    AcpiEvInstallXruptHandlers
232
 *
184
 *
233
 * PARAMETERS:  None
185
 * PARAMETERS:  None
Line 364... Line 316...
364
        /* Both the status and enable bits must be on for this event */
316
        /* Both the status and enable bits must be on for this event */
Line 365... Line 317...
365
 
317
 
366
        if ((FixedStatus & AcpiGbl_FixedEventInfo[i].StatusBitMask) &&
318
        if ((FixedStatus & AcpiGbl_FixedEventInfo[i].StatusBitMask) &&
367
            (FixedEnable & AcpiGbl_FixedEventInfo[i].EnableBitMask))
319
            (FixedEnable & AcpiGbl_FixedEventInfo[i].EnableBitMask))
-
 
320
        {
368
        {
321
            /*
-
 
322
             * Found an active (signalled) event. Invoke global event
369
            /* Found an active (signalled) event */
323
             * handler if present.
370
 
324
             */
-
 
325
            AcpiFixedEventCount[i]++;
-
 
326
            if (AcpiGbl_GlobalEventHandler)
-
 
327
            {
-
 
328
                AcpiGbl_GlobalEventHandler (ACPI_EVENT_TYPE_FIXED, NULL,
-
 
329
                     i, AcpiGbl_GlobalEventHandlerContext);
-
 
330
            }
371
            AcpiFixedEventCount[i]++;
331
 
372
            IntStatus |= AcpiEvFixedEventDispatch (i);
332
            IntStatus |= AcpiEvFixedEventDispatch (i);
373
        }
333
        }
Line 374... Line 334...
374
    }
334
    }