]>
Commit | Line | Data |
---|---|---|
5f597758 | 1 | /** @file\r |
36ee91ca | 2 | \r |
64a80549 | 3 | EFI Deferred Procedure Call Protocol.\r |
5f597758 | 4 | \r |
cd5ebaa0 | 5 | Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r |
64a80549 | 6 | This program and the accompanying materials are licensed and made available under \r |
7 | the terms and conditions of the BSD License that accompanies this distribution. \r | |
8 | The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php. \r | |
36ee91ca | 10 | \r |
64a80549 | 11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r |
36ee91ca | 12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r |
13 | \r | |
5f597758 | 14 | **/\r |
36ee91ca | 15 | \r |
16 | \r | |
17 | #ifndef __DPC_H__\r | |
18 | #define __DPC_H__\r | |
19 | \r | |
20 | //\r | |
21 | // DPC Protocol GUID value\r | |
22 | //\r | |
23 | #define EFI_DPC_PROTOCOL_GUID \\r | |
24 | { \\r | |
25 | 0x480f8ae9, 0xc46, 0x4aa9, { 0xbc, 0x89, 0xdb, 0x9f, 0xba, 0x61, 0x98, 0x6 } \\r | |
26 | }\r | |
27 | \r | |
28 | //\r | |
29 | // Forward reference for pure ANSI compatability\r | |
30 | //\r | |
31 | typedef struct _EFI_DPC_PROTOCOL EFI_DPC_PROTOCOL;\r | |
32 | \r | |
33 | \r | |
34 | /**\r | |
35 | Invoke a Deferred Procedure Call.\r | |
36 | \r | |
64a80549 | 37 | @param DpcContext The pointer to the Deferred Procedure Call's context,\r |
36ee91ca | 38 | which is implementation dependent.\r |
39 | \r | |
40 | **/\r | |
41 | typedef\r | |
42 | VOID\r | |
7d839888 | 43 | (EFIAPI *EFI_DPC_PROCEDURE)(\r |
36ee91ca | 44 | IN VOID *DpcContext\r |
45 | );\r | |
46 | \r | |
47 | /**\r | |
48 | Add a Deferred Procedure Call to the end of the DPC queue.\r | |
49 | \r | |
64a80549 | 50 | @param This The protocol instance pointer.\r |
e9b67286 | 51 | @param DpcTpl The EFI_TPL that the DPC should invoke.\r |
64a80549 | 52 | @param DpcProcedure The pointer to the DPC's function.\r |
53 | @param DpcContext The pointer to the DPC's context. Passed to DpcProcedure\r | |
36ee91ca | 54 | when DpcProcedure is invoked.\r |
55 | \r | |
56 | @retval EFI_SUCCESS The DPC was queued.\r | |
57 | @retval EFI_INVALID_PARAMETER DpcTpl is not a valid EFI_TPL.\r | |
58 | @retval EFI_INVALID_PARAMETER DpcProcedure is NULL.\r | |
59 | @retval EFI_OUT_OF_RESOURCES There are not enough resources available to\r | |
60 | add the DPC to the queue.\r | |
61 | \r | |
62 | **/\r | |
63 | typedef\r | |
64 | EFI_STATUS\r | |
7d839888 | 65 | (EFIAPI *EFI_DPC_QUEUE_DPC)(\r |
36ee91ca | 66 | IN EFI_DPC_PROTOCOL *This,\r |
67 | IN EFI_TPL DpcTpl,\r | |
68 | IN EFI_DPC_PROCEDURE DpcProcedure,\r | |
69 | IN VOID *DpcContext OPTIONAL\r | |
70 | );\r | |
71 | \r | |
72 | /**\r | |
e9b67286 | 73 | Dispatch the queue of DPCs. \r |
74 | \r | |
75 | DPCs with DpcTpl value greater than the current TPL value are queued, and then DPCs\r | |
64a80549 | 76 | with DpcTpl value lower than the current TPL value are queued. All DPCs in the first \r |
77 | group (higher DpcTpl values) are invoked before DPCs in the second group (lower DpcTpl values). \r | |
36ee91ca | 78 | \r |
79 | @param This Protocol instance pointer.\r | |
80 | \r | |
81 | @retval EFI_SUCCESS One or more DPCs were invoked.\r | |
82 | @retval EFI_NOT_FOUND No DPCs were invoked.\r | |
83 | \r | |
84 | **/\r | |
85 | typedef\r | |
86 | EFI_STATUS\r | |
7d839888 | 87 | (EFIAPI *EFI_DPC_DISPATCH_DPC)(\r |
36ee91ca | 88 | IN EFI_DPC_PROTOCOL *This\r |
89 | );\r | |
90 | \r | |
c351b60d | 91 | ///\r |
64a80549 | 92 | /// DPC Protocol structure.\r |
c351b60d | 93 | ///\r |
c93ce648 | 94 | struct _EFI_DPC_PROTOCOL {\r |
36ee91ca | 95 | EFI_DPC_QUEUE_DPC QueueDpc;\r |
96 | EFI_DPC_DISPATCH_DPC DispatchDpc;\r | |
97 | };\r | |
98 | \r | |
c351b60d | 99 | ///\r |
64a80549 | 100 | /// DPC Protocol GUID variable.\r |
c351b60d | 101 | ///\r |
36ee91ca | 102 | extern EFI_GUID gEfiDpcProtocolGuid;\r |
103 | \r | |
104 | #endif\r |