TianoCore EDK2 master
Loading...
Searching...
No Matches
Dpc.c File Reference
#include "Dpc.h"

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI DpcQueueDpc (IN EFI_DPC_PROTOCOL *This, IN EFI_TPL DpcTpl, IN EFI_DPC_PROCEDURE DpcProcedure, IN VOID *DpcContext OPTIONAL)
 
EFI_STATUS EFIAPI DpcDispatchDpc (IN EFI_DPC_PROTOCOL *This)
 
EFI_STATUS EFIAPI DpcDriverEntryPoint (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

EFI_HANDLE mDpcHandle = NULL
 
EFI_DPC_PROTOCOL mDpc
 
UINTN mDpcQueueDepth = 0
 
UINTN mMaxDpcQueueDepth = 0
 
LIST_ENTRY mDpcEntryFreeList = INITIALIZE_LIST_HEAD_VARIABLE (mDpcEntryFreeList)
 
LIST_ENTRY mDpcQueue [TPL_HIGH_LEVEL+1]
 

Detailed Description

Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Module Name:

Dpc.c

Abstract:

Definition in file Dpc.c.

Function Documentation

◆ DpcDispatchDpc()

EFI_STATUS EFIAPI DpcDispatchDpc ( IN EFI_DPC_PROTOCOL This)

Dispatch the queue of DPCs. ALL DPCs that have been queued with a DpcTpl value greater than or equal to the current TPL are invoked in the order that they were queued. DPCs with higher DpcTpl values are invoked before DPCs with lower DpcTpl values.

Parameters
ThisProtocol instance pointer.
Return values
EFI_SUCCESSOne or more DPCs were invoked.
EFI_NOT_FOUNDNo DPCs were invoked.

Definition at line 213 of file Dpc.c.

◆ DpcDriverEntryPoint()

EFI_STATUS EFIAPI DpcDriverEntryPoint ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

The entry point for DPC driver which installs the EFI_DPC_PROTOCOL onto a new handle.

Parameters
ImageHandleThe image handle of the driver.
SystemTableThe system table.
Return values
EFI_SUCCESSThe DPC queues were initialized and the EFI_DPC_PROTOCOL was installed onto a new handle.
OthersFailed to install EFI_DPC_PROTOCOL.

Definition at line 309 of file Dpc.c.

◆ DpcQueueDpc()

EFI_STATUS EFIAPI DpcQueueDpc ( IN EFI_DPC_PROTOCOL This,
IN EFI_TPL  DpcTpl,
IN EFI_DPC_PROCEDURE  DpcProcedure,
IN VOID *DpcContext  OPTIONAL 
)

Add a Deferred Procedure Call to the end of the DPC queue.

Parameters
ThisProtocol instance pointer.
DpcTplThe EFI_TPL that the DPC should be invoked.
DpcProcedurePointer to the DPC's function.
DpcContextPointer to the DPC's context. Passed to DpcProcedure when DpcProcedure is invoked.
Return values
EFI_SUCCESSThe DPC was queued.
EFI_INVALID_PARAMETERDpcTpl is not a valid EFI_TPL.
EFI_INVALID_PARAMETERDpcProcedure is NULL.
EFI_OUT_OF_RESOURCESThere are not enough resources available to add the DPC to the queue.

Definition at line 69 of file Dpc.c.

Variable Documentation

◆ mDpc

Initial value:
= {
}
EFI_STATUS EFIAPI DpcDispatchDpc(IN EFI_DPC_PROTOCOL *This)
Definition: Dpc.c:213
EFI_STATUS EFIAPI DpcQueueDpc(IN EFI_DPC_PROTOCOL *This, IN EFI_TPL DpcTpl, IN EFI_DPC_PROCEDURE DpcProcedure, IN VOID *DpcContext OPTIONAL)
Definition: Dpc.c:69

Definition at line 25 of file Dpc.c.

◆ mDpcEntryFreeList

LIST_ENTRY mDpcEntryFreeList = INITIALIZE_LIST_HEAD_VARIABLE (mDpcEntryFreeList)

Definition at line 42 of file Dpc.c.

◆ mDpcHandle

EFI_HANDLE mDpcHandle = NULL

Definition at line 20 of file Dpc.c.

◆ mDpcQueue

LIST_ENTRY mDpcQueue[TPL_HIGH_LEVEL+1]

Definition at line 49 of file Dpc.c.

◆ mDpcQueueDepth

UINTN mDpcQueueDepth = 0

Definition at line 33 of file Dpc.c.

◆ mMaxDpcQueueDepth

UINTN mMaxDpcQueueDepth = 0

Definition at line 34 of file Dpc.c.