# DpcDxe

| Index | Module | Size | Phase |
|-------|--------|------|-------|
| 302 | DpcDxe.efi | 5,444 bytes (1544h) | DXE |

## Overview

DpcDxe implements the EFI Deferred Procedure Call (DPC) protocol for the UEFI network stack. It allows drivers to schedule callback functions for execution at TPL_CALLBACK level, which is essential for deferring work from interrupt handlers or high-TPL code paths. The driver manages 32 priority levels (0--31), each backed by a doubly-linked list, with a free list of DPC_ENTRY structures for efficient allocation.

## Key Functions

- `DpcQueueDpc` -- Queues a DPC callback at a specified priority level
- `DpcDispatchDpc` -- Dispatches queued DPC entries at TPL_CALLBACK, draining one priority level at a time
- `DpcQueueDepth` -- Returns the current number of queued DPC entries
- `DpcMaxQueueDepth` -- Returns the maximum observed queue depth
- `DpcAllocEntry` -- Allocates a DPC_ENTRY from the free list or pool
- `DpcFreeEntry` -- Returns a DPC_ENTRY to the free list

## Dependencies

- `EFI_DPC_PROTOCOL` -- The DPC protocol interface (produced)
- `UefiBootServicesTableLib` -- Boot services for TPL management
- `MemoryAllocationLib` -- Pool allocation for DPC entries
- `DebugLib` -- Debug output support

## Platform

- **Source:** AmiNetworkPkg/UefiNetworkStack/Common/DpcDxe/Dpc.c
- **Architecture:** X64 (PE32+)
- **Formats:** PE32+, 6 sections (.text, .rdata, .data, section_3, .xdata, .reloc)
- **SHA256:** a77c4daf860fb0acbbd347ee525133f49fff29a19749585e40d50666b753f64a