diff options
Diffstat (limited to 'MdeModulePkg/Library')
-rw-r--r-- | MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c | 7 | ||||
-rw-r--r-- | MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf | 1 | ||||
-rw-r--r-- | MdeModulePkg/Library/DxeNetLib/DxeNetLib.c | 76 | ||||
-rw-r--r-- | MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf | 9 | ||||
-rw-r--r-- | MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.c | 5 | ||||
-rw-r--r-- | MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf | 3 |
6 files changed, 11 insertions, 90 deletions
diff --git a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c b/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c index c3dc515c45..0843173a64 100644 --- a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c +++ b/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c @@ -21,6 +21,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Library/BaseMemoryLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/MemoryAllocationLib.h>
+#include <Library/DpcLib.h>
LIST_ENTRY mActiveIpIoList = {
@@ -564,7 +565,7 @@ IpIoTransmitHandler ( //
// Request IpIoTransmitHandlerDpc as a DPC at TPL_CALLBACK
//
- NetLibQueueDpc (TPL_CALLBACK, IpIoTransmitHandlerDpc, Context);
+ QueueDpc (TPL_CALLBACK, IpIoTransmitHandlerDpc, Context);
}
@@ -618,7 +619,7 @@ IpIoDummyHandler ( //
// Request IpIoDummyHandlerDpc as a DPC at TPL_CALLBACK
//
- NetLibQueueDpc (TPL_CALLBACK, IpIoDummyHandlerDpc, Context);
+ QueueDpc (TPL_CALLBACK, IpIoDummyHandlerDpc, Context);
}
@@ -738,7 +739,7 @@ IpIoListenHandler ( //
// Request IpIoListenHandlerDpc as a DPC at TPL_CALLBACK
//
- NetLibQueueDpc (TPL_CALLBACK, IpIoListenHandlerDpc, Context);
+ QueueDpc (TPL_CALLBACK, IpIoListenHandlerDpc, Context);
}
diff --git a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf b/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf index 1e812c8f83..1e83b67df7 100644 --- a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf +++ b/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf @@ -45,3 +45,4 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. UefiBootServicesTableLib
MemoryAllocationLib
BaseMemoryLib
+ DpcLib
diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c index 32c81c17b7..f18aa41e34 100644 --- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c +++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c @@ -19,7 +19,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Protocol/HiiConfigRouting.h>
#include <Protocol/ComponentName.h>
#include <Protocol/ComponentName2.h>
-#include <Protocol/Dpc.h>
#include <Guid/NicIp4ConfigNvData.h>
@@ -34,8 +33,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Library/HiiLib.h>
#include <Library/PrintLib.h>
-EFI_DPC_PROTOCOL *mDpc = NULL;
-
GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 mNetLibHexStr[] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
#define NIC_ITEM_CONFIG_SIZE sizeof (NIC_IP4_CONFIG_INFO) + sizeof (EFI_IP4_ROUTE_TABLE) * MAX_IP4_CONFIG_IN_VARIABLE
@@ -1458,76 +1455,3 @@ NetLibGetNicHandle ( gBS->FreePool (OpenBuffer);
return Handle;
}
-
-/**
- Add a Deferred Procedure Call to the end of the DPC queue.
-
- @param[in] DpcTpl The EFI_TPL that the DPC should be invoked.
- @param[in] DpcProcedure Pointer to the DPC's function.
- @param[in] DpcContext Pointer to the DPC's context. Passed to DpcProcedure
- when DpcProcedure is invoked.
-
- @retval EFI_SUCCESS The DPC was queued.
- @retval EFI_INVALID_PARAMETER DpcTpl is not a valid EFI_TPL, or DpcProcedure
- is NULL.
- @retval EFI_OUT_OF_RESOURCES There are not enough resources available to
- add the DPC to the queue.
-
-**/
-EFI_STATUS
-EFIAPI
-NetLibQueueDpc (
- IN EFI_TPL DpcTpl,
- IN EFI_DPC_PROCEDURE DpcProcedure,
- IN VOID *DpcContext OPTIONAL
- )
-{
- return mDpc->QueueDpc (mDpc, DpcTpl, DpcProcedure, DpcContext);
-}
-
-/**
- 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.
-
- @retval EFI_SUCCESS One or more DPCs were invoked.
- @retval EFI_NOT_FOUND No DPCs were invoked.
-
-**/
-EFI_STATUS
-EFIAPI
-NetLibDispatchDpc (
- VOID
- )
-{
- return mDpc->DispatchDpc(mDpc);
-}
-
-/**
- The constructor function caches the pointer to DPC protocol.
-
- The constructor function locates DPC protocol from protocol database.
- It will ASSERT() if that operation fails and it will always return EFI_SUCCESS.
-
- @param[in] ImageHandle The firmware allocated handle for the EFI image.
- @param[in] SystemTable A pointer to the EFI System Table.
-
- @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
-
-**/
-EFI_STATUS
-EFIAPI
-NetLibConstructor (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- )
-{
- EFI_STATUS Status;
-
- Status = gBS->LocateProtocol (&gEfiDpcProtocolGuid, NULL, (VOID**) &mDpc);
- ASSERT_EFI_ERROR (Status);
- ASSERT (mDpc != NULL);
-
- return Status;
-}
diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf index 2f2b2d095f..05d68d70e0 100644 --- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf +++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf @@ -21,8 +21,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. VERSION_STRING = 1.0
LIBRARY_CLASS = NetLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
- CONSTRUCTOR = NetLibConstructor
-
#
# The following information is for reference only and not required by the build tools.
#
@@ -52,15 +50,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. PrintLib
[Guids]
- gEfiNicIp4ConfigVariableGuid
+ gEfiNicIp4ConfigVariableGuid
[Protocols]
gEfiSimpleNetworkProtocolGuid # PROTOCOL ALWAYS_CONSUMED
- gEfiDpcProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiComponentNameProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiComponentName2ProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiHiiConfigRoutingProtocolGuid # PROTOCOL ALWAYS_CONSUMED
-
-[Depex]
- gEfiDpcProtocolGuid
-
\ No newline at end of file diff --git a/MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.c b/MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.c index 3e95393221..91e211a9bd 100644 --- a/MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.c +++ b/MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.c @@ -21,6 +21,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Library/UefiBootServicesTableLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/BaseMemoryLib.h>
+#include <Library/DpcLib.h>
/**
@@ -96,7 +97,7 @@ UdpIoOnDgramSent ( //
// Request UdpIoOnDgramSentDpc as a DPC at TPL_CALLBACK
//
- NetLibQueueDpc (TPL_CALLBACK, UdpIoOnDgramSentDpc, Context);
+ QueueDpc (TPL_CALLBACK, UdpIoOnDgramSentDpc, Context);
}
/**
@@ -214,7 +215,7 @@ UdpIoOnDgramRcvd ( //
// Request UdpIoOnDgramRcvdDpc as a DPC at TPL_CALLBACK
//
- NetLibQueueDpc (TPL_CALLBACK, UdpIoOnDgramRcvdDpc, Context);
+ QueueDpc (TPL_CALLBACK, UdpIoOnDgramRcvdDpc, Context);
}
/**
diff --git a/MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf b/MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf index 27e1bbd1d3..1a6115615d 100644 --- a/MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf +++ b/MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf @@ -45,7 +45,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. UefiBootServicesTableLib
MemoryAllocationLib
BaseMemoryLib
+ DpcLib
[Protocols]
gEfiUdp4ServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED
- gEfiUdp4ProtocolGuid # PROTOCOL ALWAYS_CONSUMED
\ No newline at end of file + gEfiUdp4ProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|