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 239... Line 239...
239
}
239
}
Line 240... Line 240...
240
 
240
 
241
 
241
 
-
 
242
/*******************************************************************************
-
 
243
 *
-
 
244
 * FUNCTION:    AcpiEvGetGpeDevice
-
 
245
 *
-
 
246
 * PARAMETERS:  GPE_WALK_CALLBACK
-
 
247
 *
-
 
248
 * RETURN:      Status
-
 
249
 *
-
 
250
 * DESCRIPTION: Matches the input GPE index (0-CurrentGpeCount) with a GPE
-
 
251
 *              block device. NULL if the GPE is one of the FADT-defined GPEs.
-
 
252
 *
-
 
253
 ******************************************************************************/
-
 
254
 
-
 
255
ACPI_STATUS
-
 
256
AcpiEvGetGpeDevice (
-
 
257
    ACPI_GPE_XRUPT_INFO     *GpeXruptInfo,
-
 
258
    ACPI_GPE_BLOCK_INFO     *GpeBlock,
-
 
259
    void                    *Context)
-
 
260
{
-
 
261
    ACPI_GPE_DEVICE_INFO    *Info = Context;
-
 
262
 
-
 
263
 
-
 
264
    /* Increment Index by the number of GPEs in this block */
-
 
265
 
-
 
266
    Info->NextBlockBaseIndex += GpeBlock->GpeCount;
-
 
267
 
-
 
268
    if (Info->Index < Info->NextBlockBaseIndex)
-
 
269
    {
-
 
270
        /*
-
 
271
         * The GPE index is within this block, get the node. Leave the node
-
 
272
         * NULL for the FADT-defined GPEs
-
 
273
         */
-
 
274
        if ((GpeBlock->Node)->Type == ACPI_TYPE_DEVICE)
-
 
275
        {
-
 
276
            Info->GpeDevice = GpeBlock->Node;
-
 
277
        }
-
 
278
 
-
 
279
        Info->Status = AE_OK;
-
 
280
        return (AE_CTRL_END);
-
 
281
    }
-
 
282
 
-
 
283
    return (AE_OK);
-
 
284
}
-
 
285
 
-
 
286
 
242
/*******************************************************************************
287
/*******************************************************************************
243
 *
288
 *
244
 * FUNCTION:    AcpiEvGetGpeXruptBlock
289
 * FUNCTION:    AcpiEvGetGpeXruptBlock
245
 *
290
 *
246
 * PARAMETERS:  InterruptNumber      - Interrupt for a GPE block
291
 * PARAMETERS:  InterruptNumber      - Interrupt for a GPE block