]>
Commit | Line | Data |
---|---|---|
5f597758 | 1 | /** @file\r |
36ee91ca | 2 | \r |
5f597758 LG |
3 | EFI Deferred Procedure Call Protocol\r |
4 | \r | |
5 | Copyright (c) 2007 - 2008, Intel Corporation\r | |
36ee91ca | 6 | All rights reserved. This program and the accompanying materials\r |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
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 | |
37 | @param DpcContext Pointer to the Deferred Procedure Call's context,\r | |
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 | |
50 | @param This Protocol instance pointer.\r | |
e9b67286 | 51 | @param DpcTpl The EFI_TPL that the DPC should invoke.\r |
36ee91ca | 52 | @param DpcProcedure Pointer to the DPC's function.\r |
53 | @param DpcContext Pointer to the DPC's context. Passed to DpcProcedure\r | |
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 | |
76 | with DpcTpl value lower than the current TPL value are queued. All DPCs in the first group (higher DpcTpl values) \r | |
77 | 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 |
92 | /// DPC Protocol structure\r | |
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 |
100 | /// DPC Protocol GUID variable\r | |
101 | ///\r | |
36ee91ca | 102 | extern EFI_GUID gEfiDpcProtocolGuid;\r |
103 | \r | |
104 | #endif\r |