Retire NetLibQueueDpc() and NetLibDispatchDpc() and use QueueDpc() and DispatchDpc() from the DpcLib instead.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8897 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
mdkinney 2009-07-11 22:51:51 +00:00
parent e9880e2539
commit d8d26fb207
33 changed files with 53 additions and 174 deletions

View File

@ -16,8 +16,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#ifndef _NET_LIB_H_ #ifndef _NET_LIB_H_
#define _NET_LIB_H_ #define _NET_LIB_H_
#include <Protocol/Dpc.h>
typedef UINT32 IP4_ADDR; typedef UINT32 IP4_ADDR;
typedef UINT32 TCP_SEQNO; typedef UINT32 TCP_SEQNO;
typedef UINT16 TCP_PORTNO; typedef UINT16 TCP_PORTNO;
@ -820,45 +818,6 @@ NetLibGetNicHandle (
IN EFI_GUID *ProtocolGuid IN EFI_GUID *ProtocolGuid
); );
/**
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
);
/**
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
);
/** /**
This is the default unload handle for all the network drivers. This is the default unload handle for all the network drivers.

View File

@ -21,6 +21,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/BaseMemoryLib.h> #include <Library/BaseMemoryLib.h>
#include <Library/UefiBootServicesTableLib.h> #include <Library/UefiBootServicesTableLib.h>
#include <Library/MemoryAllocationLib.h> #include <Library/MemoryAllocationLib.h>
#include <Library/DpcLib.h>
LIST_ENTRY mActiveIpIoList = { LIST_ENTRY mActiveIpIoList = {
@ -564,7 +565,7 @@ IpIoTransmitHandler (
// //
// Request IpIoTransmitHandlerDpc as a DPC at TPL_CALLBACK // 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 // 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 // Request IpIoListenHandlerDpc as a DPC at TPL_CALLBACK
// //
NetLibQueueDpc (TPL_CALLBACK, IpIoListenHandlerDpc, Context); QueueDpc (TPL_CALLBACK, IpIoListenHandlerDpc, Context);
} }

View File

@ -45,3 +45,4 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
UefiBootServicesTableLib UefiBootServicesTableLib
MemoryAllocationLib MemoryAllocationLib
BaseMemoryLib BaseMemoryLib
DpcLib

View File

@ -19,7 +19,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Protocol/HiiConfigRouting.h> #include <Protocol/HiiConfigRouting.h>
#include <Protocol/ComponentName.h> #include <Protocol/ComponentName.h>
#include <Protocol/ComponentName2.h> #include <Protocol/ComponentName2.h>
#include <Protocol/Dpc.h>
#include <Guid/NicIp4ConfigNvData.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/HiiLib.h>
#include <Library/PrintLib.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'}; 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 #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); gBS->FreePool (OpenBuffer);
return Handle; 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;
}

View File

@ -21,8 +21,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
VERSION_STRING = 1.0 VERSION_STRING = 1.0
LIBRARY_CLASS = NetLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER 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. # 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 PrintLib
[Guids] [Guids]
gEfiNicIp4ConfigVariableGuid gEfiNicIp4ConfigVariableGuid
[Protocols] [Protocols]
gEfiSimpleNetworkProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiSimpleNetworkProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiDpcProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiComponentNameProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiComponentNameProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiComponentName2ProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiComponentName2ProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiHiiConfigRoutingProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiHiiConfigRoutingProtocolGuid # PROTOCOL ALWAYS_CONSUMED
[Depex]
gEfiDpcProtocolGuid

View File

@ -21,6 +21,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/UefiBootServicesTableLib.h> #include <Library/UefiBootServicesTableLib.h>
#include <Library/MemoryAllocationLib.h> #include <Library/MemoryAllocationLib.h>
#include <Library/BaseMemoryLib.h> #include <Library/BaseMemoryLib.h>
#include <Library/DpcLib.h>
/** /**
@ -96,7 +97,7 @@ UdpIoOnDgramSent (
// //
// Request UdpIoOnDgramSentDpc as a DPC at TPL_CALLBACK // 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 // Request UdpIoOnDgramRcvdDpc as a DPC at TPL_CALLBACK
// //
NetLibQueueDpc (TPL_CALLBACK, UdpIoOnDgramRcvdDpc, Context); QueueDpc (TPL_CALLBACK, UdpIoOnDgramRcvdDpc, Context);
} }
/** /**

View File

@ -45,7 +45,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
UefiBootServicesTableLib UefiBootServicesTableLib
MemoryAllocationLib MemoryAllocationLib
BaseMemoryLib BaseMemoryLib
DpcLib
[Protocols] [Protocols]
gEfiUdp4ServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiUdp4ServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiUdp4ProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiUdp4ProtocolGuid # PROTOCOL ALWAYS_CONSUMED

View File

@ -52,11 +52,10 @@
UefiDriverEntryPoint UefiDriverEntryPoint
DebugLib DebugLib
NetLib NetLib
DpcLib
[Protocols] [Protocols]
gEfiManagedNetworkServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiManagedNetworkServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiArpServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiArpServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiManagedNetworkProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiManagedNetworkProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiArpProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiArpProtocolGuid # PROTOCOL ALWAYS_CONSUMED

View File

@ -325,7 +325,7 @@ ArpOnFrameRcvd (
// //
// Request ArpOnFrameRcvdDpc as a DPC at TPL_CALLBACK // Request ArpOnFrameRcvdDpc as a DPC at TPL_CALLBACK
// //
NetLibQueueDpc (TPL_CALLBACK, ArpOnFrameRcvdDpc, Context); QueueDpc (TPL_CALLBACK, ArpOnFrameRcvdDpc, Context);
} }
/** /**
@ -386,7 +386,7 @@ ArpOnFrameSent (
// //
// Request ArpOnFrameSentDpc as a DPC at TPL_CALLBACK // Request ArpOnFrameSentDpc as a DPC at TPL_CALLBACK
// //
NetLibQueueDpc (TPL_CALLBACK, ArpOnFrameSentDpc, Context); QueueDpc (TPL_CALLBACK, ArpOnFrameSentDpc, Context);
} }
@ -812,7 +812,7 @@ ArpAddressResolved (
// //
// Dispatch the DPCs queued by the NotifyFunction of the Context->UserRequestEvent. // Dispatch the DPCs queued by the NotifyFunction of the Context->UserRequestEvent.
// //
NetLibDispatchDpc (); DispatchDpc ();
return Count; return Count;
} }

View File

@ -30,6 +30,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/BaseLib.h> #include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h> #include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h> #include <Library/MemoryAllocationLib.h>
#include <Library/DpcLib.h>
// //
// Ethernet protocol type definitions. // Ethernet protocol type definitions.

View File

@ -668,7 +668,7 @@ SIGNAL_USER:
// //
// Dispatch the DPC queued by the NotifyFunction of ResolvedEvent. // Dispatch the DPC queued by the NotifyFunction of ResolvedEvent.
// //
NetLibDispatchDpc (); DispatchDpc ();
} }
return Status; return Status;
@ -737,7 +737,7 @@ ArpCancel (
// Dispatch the DPCs queued by the NotifyFunction of the events signaled // Dispatch the DPCs queued by the NotifyFunction of the events signaled
// by ArpCancleRequest. // by ArpCancleRequest.
// //
NetLibDispatchDpc (); DispatchDpc ();
gBS->RestoreTPL (OldTpl); gBS->RestoreTPL (OldTpl);

View File

@ -219,7 +219,7 @@ EfiNicIp4ConfigSetInfo (
// //
if (Reconfig && (Instance->ReconfigEvent != NULL)) { if (Reconfig && (Instance->ReconfigEvent != NULL)) {
Status = gBS->SignalEvent (Instance->ReconfigEvent); Status = gBS->SignalEvent (Instance->ReconfigEvent);
NetLibDispatchDpc (); DispatchDpc ();
} }
return Status; return Status;
@ -335,7 +335,7 @@ ON_EXIT:
gBS->SignalEvent (Instance->DoneEvent); gBS->SignalEvent (Instance->DoneEvent);
Ip4ConfigCleanDhcp4 (Instance); Ip4ConfigCleanDhcp4 (Instance);
NetLibDispatchDpc (); DispatchDpc ();
return ; return ;
} }
@ -538,7 +538,7 @@ ON_ERROR:
ON_EXIT: ON_EXIT:
gBS->RestoreTPL (OldTpl); gBS->RestoreTPL (OldTpl);
NetLibDispatchDpc (); DispatchDpc ();
return Status; return Status;
} }

View File

@ -37,6 +37,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/MemoryAllocationLib.h> #include <Library/MemoryAllocationLib.h>
#include <Library/HiiLib.h> #include <Library/HiiLib.h>
#include <Library/PrintLib.h> #include <Library/PrintLib.h>
#include <Library/DpcLib.h>
#include "NicIp4Variable.h" #include "NicIp4Variable.h"

View File

@ -60,7 +60,7 @@
NetLib NetLib
HiiLib HiiLib
PrintLib PrintLib
DpcLib
[Protocols] [Protocols]
gEfiDhcp4ServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiDhcp4ServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED
@ -74,4 +74,3 @@
[Guids] [Guids]
gEfiIfrTianoGuid ## CONSUMES ## Guid gEfiIfrTianoGuid ## CONSUMES ## Guid
gEfiNicIp4ConfigVariableGuid ## CONSUMES ## Guid gEfiNicIp4ConfigVariableGuid ## CONSUMES ## Guid

View File

@ -70,7 +70,7 @@
UefiRuntimeServicesTableLib UefiRuntimeServicesTableLib
DebugLib DebugLib
NetLib NetLib
DpcLib
[Protocols] [Protocols]
gEfiIp4ProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiIp4ProtocolGuid # PROTOCOL ALWAYS_CONSUMED
@ -80,4 +80,3 @@
gEfiIp4ServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiIp4ServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiManagedNetworkProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiManagedNetworkProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiArpProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiArpProtocolGuid # PROTOCOL ALWAYS_CONSUMED

View File

@ -871,7 +871,7 @@ Ip4OnArpResolved (
// //
// Request Ip4OnArpResolvedDpc as a DPC at TPL_CALLBACK // Request Ip4OnArpResolvedDpc as a DPC at TPL_CALLBACK
// //
NetLibQueueDpc (TPL_CALLBACK, Ip4OnArpResolvedDpc, Context); QueueDpc (TPL_CALLBACK, Ip4OnArpResolvedDpc, Context);
} }
@ -924,7 +924,7 @@ Ip4OnFrameSent (
// //
// Request Ip4OnFrameSentDpc as a DPC at TPL_CALLBACK // Request Ip4OnFrameSentDpc as a DPC at TPL_CALLBACK
// //
NetLibQueueDpc (TPL_CALLBACK, Ip4OnFrameSentDpc, Context); QueueDpc (TPL_CALLBACK, Ip4OnFrameSentDpc, Context);
} }
@ -1187,7 +1187,7 @@ Ip4OnFrameReceived (
// //
// Request Ip4OnFrameReceivedDpc as a DPC at TPL_CALLBACK // Request Ip4OnFrameReceivedDpc as a DPC at TPL_CALLBACK
// //
NetLibQueueDpc (TPL_CALLBACK, Ip4OnFrameReceivedDpc, Context); QueueDpc (TPL_CALLBACK, Ip4OnFrameReceivedDpc, Context);
} }

View File

@ -703,7 +703,7 @@ Ip4AutoConfigCallBack (
// //
// Request Ip4AutoConfigCallBackDpc as a DPC at TPL_CALLBACK // Request Ip4AutoConfigCallBackDpc as a DPC at TPL_CALLBACK
// //
NetLibQueueDpc (TPL_CALLBACK, Ip4AutoConfigCallBackDpc, Context); QueueDpc (TPL_CALLBACK, Ip4AutoConfigCallBackDpc, Context);
} }
@ -1780,7 +1780,7 @@ Ip4FreeTxToken (
// //
// Dispatch the DPC queued by the NotifyFunction of Token->Event. // Dispatch the DPC queued by the NotifyFunction of Token->Event.
// //
NetLibDispatchDpc (); DispatchDpc ();
} }
gBS->FreePool (Wrap); gBS->FreePool (Wrap);
@ -2110,7 +2110,7 @@ EfiIp4Receive (
// Dispatch the DPC queued by the NotifyFunction of this instane's receive // Dispatch the DPC queued by the NotifyFunction of this instane's receive
// event. // event.
// //
NetLibDispatchDpc (); DispatchDpc ();
ON_EXIT: ON_EXIT:
gBS->RestoreTPL (OldTpl); gBS->RestoreTPL (OldTpl);
@ -2266,7 +2266,7 @@ Ip4Cancel (
// Dispatch the DPCs queued by the NotifyFunction of the canceled rx token's // Dispatch the DPCs queued by the NotifyFunction of the canceled rx token's
// events. // events.
// //
NetLibDispatchDpc (); DispatchDpc ();
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
if ((Token != NULL) && (Status == EFI_ABORTED)) { if ((Token != NULL) && (Status == EFI_ABORTED)) {
return EFI_SUCCESS; return EFI_SUCCESS;

View File

@ -31,6 +31,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/NetLib.h> #include <Library/NetLib.h>
#include <Library/BaseMemoryLib.h> #include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h> #include <Library/MemoryAllocationLib.h>
#include <Library/DpcLib.h>
#include "Ip4Common.h" #include "Ip4Common.h"
#include "Ip4Driver.h" #include "Ip4Driver.h"

View File

@ -592,7 +592,7 @@ Ip4AccpetFrame (
// Dispatch the DPCs queued by the NotifyFunction of the rx token's events // Dispatch the DPCs queued by the NotifyFunction of the rx token's events
// which are signaled with received data. // which are signaled with received data.
// //
NetLibDispatchDpc (); DispatchDpc ();
RESTART: RESTART:
Ip4ReceiveFrame (IpSb->DefaultInterface, NULL, Ip4AccpetFrame, IpSb); Ip4ReceiveFrame (IpSb->DefaultInterface, NULL, Ip4AccpetFrame, IpSb);

View File

@ -27,6 +27,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/UefiBootServicesTableLib.h> #include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiLib.h> #include <Library/UefiLib.h>
#include <Library/NetLib.h> #include <Library/NetLib.h>
#include <Library/DpcLib.h>
#include "ComponentName.h" #include "ComponentName.h"

View File

@ -54,10 +54,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
UefiDriverEntryPoint UefiDriverEntryPoint
DebugLib DebugLib
NetLib NetLib
DpcLib
[Protocols] [Protocols]
gEfiManagedNetworkServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiManagedNetworkServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiSimpleNetworkProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiSimpleNetworkProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiManagedNetworkProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiManagedNetworkProtocolGuid # PROTOCOL ALWAYS_CONSUMED

View File

@ -282,7 +282,7 @@ SIGNAL_TOKEN:
// //
// Dispatch the DPC queued by the NotifyFunction of Token->Event. // Dispatch the DPC queued by the NotifyFunction of Token->Event.
// //
NetLibDispatchDpc (); DispatchDpc ();
return EFI_SUCCESS; return EFI_SUCCESS;
} }
@ -1064,5 +1064,5 @@ MnpSystemPoll (
// //
// Dispatch the DPC queued by the NotifyFunction of rx token's events. // Dispatch the DPC queued by the NotifyFunction of rx token's events.
// //
NetLibDispatchDpc (); DispatchDpc ();
} }

View File

@ -632,7 +632,7 @@ MnpReceive (
// //
// Dispatch the DPC queued by the NotifyFunction of Token->Event. // Dispatch the DPC queued by the NotifyFunction of Token->Event.
// //
NetLibDispatchDpc (); DispatchDpc ();
} }
ON_EXIT: ON_EXIT:
@ -709,7 +709,7 @@ MnpCancel (
// //
// Dispatch the DPC queued by the NotifyFunction of the cancled token's events. // Dispatch the DPC queued by the NotifyFunction of the cancled token's events.
// //
NetLibDispatchDpc (); DispatchDpc ();
ON_EXIT: ON_EXIT:
gBS->RestoreTPL (OldTpl); gBS->RestoreTPL (OldTpl);
@ -774,7 +774,7 @@ MnpPoll (
// //
// Dispatch the DPC queued by the NotifyFunction of rx token's events. // Dispatch the DPC queued by the NotifyFunction of rx token's events.
// //
NetLibDispatchDpc (); DispatchDpc ();
ON_EXIT: ON_EXIT:
gBS->RestoreTPL (OldTpl); gBS->RestoreTPL (OldTpl);

View File

@ -29,6 +29,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/UefiBootServicesTableLib.h> #include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiDriverEntryPoint.h> #include <Library/UefiDriverEntryPoint.h>
#include <Library/UefiLib.h> #include <Library/UefiLib.h>
#include <Library/DpcLib.h>
#define SOCK_SND_BUF 0 #define SOCK_SND_BUF 0
#define SOCK_RCV_BUF 1 #define SOCK_RCV_BUF 1

View File

@ -70,10 +70,10 @@
NetLib NetLib
IpIoLib IpIoLib
DevicePathLib DevicePathLib
DpcLib
[Protocols] [Protocols]
gEfiIp4ProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiIp4ProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiTcp4ServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiTcp4ServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiIp4ServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiIp4ServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiTcp4ProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiTcp4ProtocolGuid # PROTOCOL ALWAYS_CONSUMED

View File

@ -577,6 +577,6 @@ TcpTicking (
IN VOID *Context IN VOID *Context
) )
{ {
NetLibQueueDpc (TPL_CALLBACK, TcpTickingDpc, Context); QueueDpc (TPL_CALLBACK, TcpTickingDpc, Context);
} }

View File

@ -56,11 +56,10 @@
DebugLib DebugLib
IpIoLib IpIoLib
NetLib NetLib
DpcLib
[Protocols] [Protocols]
gEfiIp4ProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiIp4ProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiUdp4ServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiUdp4ServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiIp4ServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiIp4ServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiUdp4ProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiUdp4ProtocolGuid # PROTOCOL ALWAYS_CONSUMED

View File

@ -1007,7 +1007,7 @@ Udp4DgramSent (
// //
Token->Status = Status; Token->Status = Status;
gBS->SignalEvent (Token->Event); gBS->SignalEvent (Token->Event);
NetLibDispatchDpc (); DispatchDpc ();
} }
} }
@ -1054,7 +1054,7 @@ Udp4DgramRcvd (
// Dispatch the DPC queued by the NotifyFunction of the rx token's events // Dispatch the DPC queued by the NotifyFunction of the rx token's events
// which are signaled with received data. // which are signaled with received data.
// //
NetLibDispatchDpc (); DispatchDpc ();
} }

View File

@ -30,6 +30,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/BaseMemoryLib.h> #include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h> #include <Library/MemoryAllocationLib.h>
#include <Library/TimerLib.h> #include <Library/TimerLib.h>
#include <Library/DpcLib.h>
#include "Udp4Driver.h" #include "Udp4Driver.h"

View File

@ -783,7 +783,7 @@ Udp4Receive (
// //
// Dispatch the DPC queued by the NotifyFunction of Token->Event. // Dispatch the DPC queued by the NotifyFunction of Token->Event.
// //
NetLibDispatchDpc (); DispatchDpc ();
ON_EXIT: ON_EXIT:
@ -856,7 +856,7 @@ Udp4Cancel (
// //
// Dispatch the DPC queued by the NotifyFunction of the cancelled token's events. // Dispatch the DPC queued by the NotifyFunction of the cancelled token's events.
// //
NetLibDispatchDpc (); DispatchDpc ();
gBS->RestoreTPL (OldTpl); gBS->RestoreTPL (OldTpl);

View File

@ -240,7 +240,7 @@ IcmpErrorListenHandler (
// //
// Request IpIoListenHandlerDpc as a DPC at TPL_CALLBACK // Request IpIoListenHandlerDpc as a DPC at TPL_CALLBACK
// //
NetLibQueueDpc (TPL_CALLBACK, IcmpErrorListenHandlerDpc, Context); QueueDpc (TPL_CALLBACK, IcmpErrorListenHandlerDpc, Context);
} }
/** /**
@ -473,7 +473,7 @@ EfiPxeBcStop (
// Dispatch the DPCs queued by the NotifyFunction of the canceled rx token's // Dispatch the DPCs queued by the NotifyFunction of the canceled rx token's
// events. // events.
// //
NetLibDispatchDpc (); DispatchDpc ();
Private->Ip4->Configure (Private->Ip4, NULL); Private->Ip4->Configure (Private->Ip4, NULL);

View File

@ -39,6 +39,7 @@ typedef struct _PXEBC_PRIVATE_DATA PXEBC_PRIVATE_DATA;
#include <Library/UefiLib.h> #include <Library/UefiLib.h>
#include <Library/BaseLib.h> #include <Library/BaseLib.h>
#include <Library/NetLib.h> #include <Library/NetLib.h>
#include <Library/DpcLib.h>
#include "PxeBcDriver.h" #include "PxeBcDriver.h"
#include "PxeArch.h" #include "PxeArch.h"

View File

@ -74,13 +74,11 @@
MemoryAllocationLib MemoryAllocationLib
DebugLib DebugLib
NetLib NetLib
DpcLib
[Guids] [Guids]
gEfiSmbiosTableGuid # ALWAYS_CONSUMED gEfiSmbiosTableGuid # ALWAYS_CONSUMED
[Protocols] [Protocols]
gEfiArpServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiArpServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiArpProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiArpProtocolGuid # PROTOCOL ALWAYS_CONSUMED
@ -96,4 +94,3 @@
gEfiNetworkInterfaceIdentifierProtocolGuid_31 ## SOMETIMES_CONSUMES gEfiNetworkInterfaceIdentifierProtocolGuid_31 ## SOMETIMES_CONSUMES
gEfiIp4ServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiIp4ServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiIp4ProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiIp4ProtocolGuid # PROTOCOL ALWAYS_CONSUMED