]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Protocol/Dpc.h
MdeModulePkg/S3SmmInitDone.h: Fix copyright coding style error.
[mirror_edk2.git] / MdeModulePkg / Include / Protocol / Dpc.h
CommitLineData
5f597758 1/** @file\r
36ee91ca 2\r
64a80549 3 EFI Deferred Procedure Call Protocol.\r
5f597758 4\r
d1102dba
LG
5Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
6This program and the accompanying materials are licensed and made available under\r
7the terms and conditions of the BSD License that accompanies this distribution.\r
64a80549 8The full text of the license may be found at\r
d1102dba 9http://opensource.org/licenses/bsd-license.php.\r
36ee91ca 10\r
d1102dba 11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
36ee91ca 12WITHOUT 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
31typedef 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
41typedef\r
42VOID\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
63typedef\r
64EFI_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
d1102dba
LG
73 Dispatch the queue of DPCs.\r
74\r
e9b67286 75 DPCs with DpcTpl value greater than the current TPL value are queued, and then DPCs\r
d1102dba
LG
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
85typedef\r
86EFI_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 94struct _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 102extern EFI_GUID gEfiDpcProtocolGuid;\r
103\r
104#endif\r