summaryrefslogtreecommitdiff
path: root/StdLib/SocketDxe
diff options
context:
space:
mode:
authorGuo Mang <mang.guo@intel.com>2016-12-22 18:26:58 +0800
committerGuo Mang <mang.guo@intel.com>2016-12-26 19:15:01 +0800
commit28220db3c5759facf5e0a6891e53a6f268a0ebbc (patch)
tree367865a2857297efdbdf10a3101b5c1726eb8798 /StdLib/SocketDxe
parent6749969917f3137d8f8af06b9407aac179a108b8 (diff)
downloadedk2-platforms-28220db3c5759facf5e0a6891e53a6f268a0ebbc.tar.xz
StdLib: Remove unused Package
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Guo Mang <mang.guo@intel.com>
Diffstat (limited to 'StdLib/SocketDxe')
-rw-r--r--StdLib/SocketDxe/ComponentName.c182
-rw-r--r--StdLib/SocketDxe/DriverBinding.c241
-rw-r--r--StdLib/SocketDxe/EntryUnload.c351
-rw-r--r--StdLib/SocketDxe/Socket.h175
-rw-r--r--StdLib/SocketDxe/SocketDxe.inf62
5 files changed, 0 insertions, 1011 deletions
diff --git a/StdLib/SocketDxe/ComponentName.c b/StdLib/SocketDxe/ComponentName.c
deleted file mode 100644
index ff1f101516..0000000000
--- a/StdLib/SocketDxe/ComponentName.c
+++ /dev/null
@@ -1,182 +0,0 @@
-/** @file
- UEFI Component Name(2) protocol implementation.
-
- Copyright (c) 2011, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#include "Socket.h"
-
-/**
- EFI Component Name Protocol declaration
-**/
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL mComponentName = {
- GetDriverName,
- GetControllerName,
- "eng"
-};
-
-/**
- EFI Component Name 2 Protocol declaration
-**/
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL mComponentName2 = {
- (EFI_COMPONENT_NAME2_GET_DRIVER_NAME) GetDriverName,
- (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) GetControllerName,
- "en"
-};
-
-
-/**
- Driver name table declaration
-**/
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE
-mDriverNameTable[] = {
- {"eng;en", L"Socket Layer Driver"},
- {NULL, NULL}
-};
-
-/**
- Retrieves a Unicode string that is the user readable name of the driver.
-
- This function retrieves the user readable name of a driver in the form of a
- Unicode string. If the driver specified by This has a user readable name in
- the language specified by Language, then a pointer to the driver name is
- returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
- by This does not support the language specified by Language,
- then EFI_UNSUPPORTED is returned.
-
- @param [in] pThis A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
- EFI_COMPONENT_NAME_PROTOCOL instance.
- @param [in] pLanguage A pointer to a Null-terminated ASCII string
- array indicating the language. This is the
- language of the driver name that the caller is
- requesting, and it must match one of the
- languages specified in SupportedLanguages. The
- number of languages supported by a driver is up
- to the driver writer. Language is specified
- in RFC 3066 or ISO 639-2 language code format.
- @param [out] ppDriverName A pointer to the Unicode string to return.
- This Unicode string is the name of the
- driver specified by This in the language
- specified by Language.
-
- @retval EFI_SUCCESS The Unicode string for the Driver specified by
- This and the language specified by Language was
- returned in DriverName.
- @retval EFI_INVALID_PARAMETER Language is NULL.
- @retval EFI_INVALID_PARAMETER DriverName is NULL.
- @retval EFI_UNSUPPORTED The driver specified by This does not support
- the language specified by Language.
-
-**/
-EFI_STATUS
-EFIAPI
-GetDriverName (
- IN EFI_COMPONENT_NAME_PROTOCOL * pThis,
- IN CHAR8 * pLanguage,
- OUT CHAR16 ** ppDriverName
- )
-{
- EFI_STATUS Status;
-
- Status = LookupUnicodeString2 (
- pLanguage,
- pThis->SupportedLanguages,
- mDriverNameTable,
- ppDriverName,
- (BOOLEAN)(pThis == &mComponentName)
- );
- return Status;
-}
-
-/**
- Retrieves a Unicode string that is the user readable name of the controller
- that is being managed by a driver.
-
- This function retrieves the user readable name of the controller specified by
- ControllerHandle and ChildHandle in the form of a Unicode string. If the
- driver specified by This has a user readable name in the language specified by
- Language, then a pointer to the controller name is returned in ControllerName,
- and EFI_SUCCESS is returned. If the driver specified by This is not currently
- managing the controller specified by ControllerHandle and ChildHandle,
- then EFI_UNSUPPORTED is returned. If the driver specified by This does not
- support the language specified by Language, then EFI_UNSUPPORTED is returned.
-
- @param [in] pThis A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
- EFI_COMPONENT_NAME_PROTOCOL instance.
- @param [in] ControllerHandle The handle of a controller that the driver
- specified by This is managing. This handle
- specifies the controller whose name is to be
- returned.
- @param [in] ChildHandle The handle of the child controller to retrieve
- the name of. This is an optional parameter that
- may be NULL. It will be NULL for device
- drivers. It will also be NULL for a bus drivers
- that wish to retrieve the name of the bus
- controller. It will not be NULL for a bus
- driver that wishes to retrieve the name of a
- child controller.
- @param [in] pLanguage A pointer to a Null-terminated ASCII string
- array indicating the language. This is the
- language of the driver name that the caller is
- requesting, and it must match one of the
- languages specified in SupportedLanguages. The
- number of languages supported by a driver is up
- to the driver writer. Language is specified in
- RFC 3066 or ISO 639-2 language code format.
- @param [out] ppControllerName A pointer to the Unicode string to return.
- This Unicode string is the name of the
- controller specified by ControllerHandle and
- ChildHandle in the language specified by
- Language from the point of view of the driver
- specified by This.
-
- @retval EFI_SUCCESS The Unicode string for the user readable name in
- the language specified by Language for the
- driver specified by This was returned in
- DriverName.
- @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
- @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
- EFI_HANDLE.
- @retval EFI_INVALID_PARAMETER Language is NULL.
- @retval EFI_INVALID_PARAMETER ControllerName is NULL.
- @retval EFI_UNSUPPORTED The driver specified by This is not currently
- managing the controller specified by
- ControllerHandle and ChildHandle.
- @retval EFI_UNSUPPORTED The driver specified by This does not support
- the language specified by Language.
-
-**/
-EFI_STATUS
-EFIAPI
-GetControllerName (
- IN EFI_COMPONENT_NAME_PROTOCOL * pThis,
- IN EFI_HANDLE ControllerHandle,
- IN OPTIONAL EFI_HANDLE ChildHandle,
- IN CHAR8 * pLanguage,
- OUT CHAR16 ** ppControllerName
- )
-{
- EFI_STATUS Status;
-
- DBG_ENTER ( );
-
- //
- // Set the controller name
- //
- *ppControllerName = L"Socket Layer";
- Status = EFI_SUCCESS;
-
- //
- // Return the operation status
- //
- DBG_EXIT_HEX ( Status );
- return Status;
-}
diff --git a/StdLib/SocketDxe/DriverBinding.c b/StdLib/SocketDxe/DriverBinding.c
deleted file mode 100644
index 4d68f37be2..0000000000
--- a/StdLib/SocketDxe/DriverBinding.c
+++ /dev/null
@@ -1,241 +0,0 @@
-/** @file
- Implement the driver binding protocol for the socket layer.
-
- Copyright (c) 2011, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-
- \section NetworkAdapterManagement Network Adapter Management
- Network adapters may come and go over the life if a system running
- UEFI. The SocketDxe driver uses the driver binding API to manage
- the connections to network adapters.
-
- The ::DriverSupported routine selects network adapters that the
- socket layer is not using. This determination by the lack of the
- tag GUID associated with the network protocol in the
- ::cEslSocketBinding array. The selected network adapters are
- passed to the ::DriverStart routine.
-
- The ::DriverStart routine calls the ::EslServiceConnect routine
- to create an ::ESL_SERVICE structure to manage the network adapter
- for the socket layer. EslServiceConnect also installs the tag
- GUID on the network adapter to prevent future calls from
- ::DriverSupported. EslService also calls the network specific
- initialization routine listed in ESL_SOCKET_BINDING::pfnInitialize
- field of the ::cEslSocketBinding entry.
-
- The ::DriverStop routine calls the ::EslServiceDisconnect routine
- to undo the work done by ::DriverStart. The socket layer must break
- the active network connections, then remove the tag GUIDs from the
- controller handle and free ::ESL_SERVICE structure.
-
-**/
-
-#include "Socket.h"
-
-/**
- Verify the controller type
-
- This routine walks the cEslSocketBinding array to determines if
- the controller is a network adapter by supporting any of the
- network protocols required by the sockets layer. If so, the
- routine verifies that the socket layer is not already using the
- support by looking for the tag GUID listed in the corresponding
- array entry. The controller handle is passed to the ::DriverStart
- routine if sockets can use the network adapter.
- See the \ref NetworkAdapterManagement section.
-
- This routine is called by the UEFI driver framework during connect
- processing.
-
- @param [in] pThis Protocol instance pointer.
- @param [in] Controller Handle of device to test.
- @param [in] pRemainingDevicePath Not used.
-
- @retval EFI_SUCCESS This driver supports this device.
- @retval other This driver does not support this device.
-
-**/
-EFI_STATUS
-EFIAPI
-DriverSupported (
- IN EFI_DRIVER_BINDING_PROTOCOL * pThis,
- IN EFI_HANDLE Controller,
- IN EFI_DEVICE_PATH_PROTOCOL * pRemainingDevicePath
- )
-{
- CONST ESL_SOCKET_BINDING * pEnd;
- VOID * pInterface;
- CONST ESL_SOCKET_BINDING * pSocketBinding;
- EFI_STATUS Status;
-
- //
- // Assume the list is empty
- //
- Status = EFI_UNSUPPORTED;
-
- //
- // Walk the list of network connection points
- //
- pSocketBinding = &cEslSocketBinding[0];
- pEnd = &pSocketBinding[ cEslSocketBindingEntries ];
- while ( pEnd > pSocketBinding ) {
- //
- // Determine if the controller supports the network protocol
- //
- Status = gBS->OpenProtocol (
- Controller,
- pSocketBinding->pNetworkBinding,
- &pInterface,
- pThis->DriverBindingHandle,
- Controller,
- EFI_OPEN_PROTOCOL_GET_PROTOCOL
- );
- if ( !EFI_ERROR ( Status )) {
- //
- // Determine if the driver is already connected
- //
- Status = gBS->OpenProtocol (
- Controller,
- (EFI_GUID *)pSocketBinding->pTagGuid,
- &pInterface,
- pThis->DriverBindingHandle,
- Controller,
- EFI_OPEN_PROTOCOL_GET_PROTOCOL
- );
- if ( !EFI_ERROR ( Status )) {
- Status = EFI_ALREADY_STARTED;
- }
- else {
- if ( EFI_UNSUPPORTED == Status ) {
- //
- // Connect the driver since the tag is not present
- //
- Status = EFI_SUCCESS;
- }
- }
- }
-
- //
- // Set the next network protocol
- //
- pSocketBinding += 1;
- }
-
- //
- // Return the device supported status
- //
- return Status;
-}
-
-
-/**
- Connect to a network adapter
-
- This routine calls ::EslServiceConnect to connect the socket
- layer to the network adapters. See the \ref NetworkAdapterManagement
- section.
-
- This routine is called by the UEFI driver framework during connect
- processing if the controller passes the tests in ::DriverSupported.
-
- @param [in] pThis Protocol instance pointer.
- @param [in] Controller Handle of device to work with.
- @param [in] pRemainingDevicePath Not used, always produce all possible children.
-
- @retval EFI_SUCCESS This driver is added to Controller.
- @retval other This driver does not support this device.
-
-**/
-EFI_STATUS
-EFIAPI
-DriverStart (
- IN EFI_DRIVER_BINDING_PROTOCOL * pThis,
- IN EFI_HANDLE Controller,
- IN EFI_DEVICE_PATH_PROTOCOL * pRemainingDevicePath
- )
-{
- EFI_STATUS Status;
-
- DBG_ENTER ( );
-
- //
- // Connect to this network adapter
- //
- Status = EslServiceConnect ( pThis->DriverBindingHandle,
- Controller );
-
- //
- // Display the driver start status
- //
- DBG_EXIT_STATUS ( Status );
- return Status;
-}
-
-
-/**
- Disconnect from a network adapter
-
- This routine calls ::EslServiceDisconnect to disconnect the socket
- layer from the network adapters. See the \ref NetworkAdapterManagement
- section.
-
- This routine is called by ::DriverUnload when the socket layer
- is being unloaded. This routine should also called by the UEFI
- driver framework when a network adapter is being unloaded from
- the system.
-
- @param [in] pThis Protocol instance pointer.
- @param [in] Controller Handle of device to stop driver on.
- @param [in] NumberOfChildren How many children need to be stopped.
- @param [in] pChildHandleBuffer Not used.
-
- @retval EFI_SUCCESS This driver is removed Controller.
- @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.
- @retval other This driver was not removed from this device.
-
-**/
-EFI_STATUS
-EFIAPI
-DriverStop (
- IN EFI_DRIVER_BINDING_PROTOCOL * pThis,
- IN EFI_HANDLE Controller,
- IN UINTN NumberOfChildren,
- IN EFI_HANDLE * pChildHandleBuffer
- )
-{
- EFI_STATUS Status;
-
- DBG_ENTER ( );
-
- //
- // Disconnect the network adapters
- //
- Status = EslServiceDisconnect ( pThis->DriverBindingHandle,
- Controller );
-
- //
- // Display the driver start status
- //
- DBG_EXIT_STATUS ( Status );
- return Status;
-}
-
-
-/**
- Driver binding protocol for the SocketDxe driver.
-**/
-EFI_DRIVER_BINDING_PROTOCOL mDriverBinding = {
- DriverSupported,
- DriverStart,
- DriverStop,
- 0xa,
- NULL,
- NULL
-};
diff --git a/StdLib/SocketDxe/EntryUnload.c b/StdLib/SocketDxe/EntryUnload.c
deleted file mode 100644
index edd991b407..0000000000
--- a/StdLib/SocketDxe/EntryUnload.c
+++ /dev/null
@@ -1,351 +0,0 @@
-/** @file
- Implement the entry and unload for the socket driver.
-
- Copyright (c) 2011, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#include "Socket.h"
-
-
-/**
- The following GUID values are only used by the SocketDxe driver. An
- alternative set of values exists in EfiSocketLib\UseEfiSocketLib.c
- which an application uses when it links against EfiSocketLib. These
- two sets of values allow the SocketDxe driver to coexist with socket
- applications.
-
- Tag GUID - IPv4 in use by SocketDxe
-**/
-CONST EFI_GUID mEslIp4ServiceGuid = {
- 0x4e3a82e6, 0xe43f, 0x460a, { 0x86, 0x6e, 0x9b, 0x5a, 0xab, 0x80, 0x44, 0x48 }
-};
-
-
-/**
- Tag GUID - IPv6 in use by SocketDxe
-**/
-CONST EFI_GUID mEslIp6ServiceGuid = {
- 0x2fc3b2d3, 0x6eba, 0x42b0, { 0xa4, 0xa7, 0x14, 0xc7, 0xa8, 0x4b, 0x5d, 0x22 }
-};
-
-
-/**
- Tag GUID - TCPv4 in use by SocketDxe
-**/
-CONST EFI_GUID mEslTcp4ServiceGuid = {
- 0x4dcaab0a, 0x1990, 0x4352, { 0x8d, 0x2f, 0x2d, 0x8f, 0x13, 0x55, 0x98, 0xa5 }
-};
-
-
-/**
- Tag GUID - TCPv6 in use by SocketDxe
-**/
-CONST EFI_GUID mEslTcp6ServiceGuid = {
- 0xdd455a69, 0xec75, 0x456c, { 0x84, 0xd2, 0x95, 0xca, 0xe7, 0xd3, 0xc6, 0xd3 }
-};
-
-
-/**
- Tag GUID - UDPv4 in use by SocketDxe
-**/
-CONST EFI_GUID mEslUdp4ServiceGuid = {
- 0x43a110ce, 0x9ccd, 0x402b, { 0x8c, 0x29, 0x4a, 0x6d, 0x8a, 0xf7, 0x79, 0x90 }
-};
-
-
-/**
- Tag GUID - UDPv6 in use by SocketDxe
-**/
-CONST EFI_GUID mEslUdp6ServiceGuid = {
- 0x32ff59cd, 0xc33, 0x48d0, { 0xa2, 0x44, 0x4b, 0xb8, 0x11, 0x33, 0x64, 0x3 }
-};
-
-
-/**
- Socket driver unload routine.
-
- @param [in] ImageHandle Handle for the image.
-
- @retval EFI_SUCCESS Image may be unloaded
-
-**/
-EFI_STATUS
-EFIAPI
-DriverUnload (
- IN EFI_HANDLE ImageHandle
- )
-{
- UINTN BufferSize;
- UINTN Index;
- UINTN Max;
- EFI_HANDLE * pHandle;
- EFI_STATUS Status;
-
- //
- // Determine which devices are using this driver
- //
- BufferSize = 0;
- pHandle = NULL;
- Status = gBS->LocateHandle (
- ByProtocol,
- &gEfiCallerIdGuid,
- NULL,
- &BufferSize,
- NULL );
- if ( EFI_BUFFER_TOO_SMALL == Status ) {
- for ( ; ; ) {
- //
- // One or more block IO devices are present
- //
- Status = gBS->AllocatePool (
- EfiRuntimeServicesData,
- BufferSize,
- (VOID **) &pHandle
- );
- if ( EFI_ERROR ( Status )) {
- DEBUG (( DEBUG_ERROR | DEBUG_POOL | DEBUG_INIT | DEBUG_INFO,
- "Insufficient memory, failed handle buffer allocation\r\n" ));
- break;
- }
-
- //
- // Locate the block IO devices
- //
- Status = gBS->LocateHandle (
- ByProtocol,
- &gEfiCallerIdGuid,
- NULL,
- &BufferSize,
- pHandle );
- if ( EFI_ERROR ( Status )) {
- //
- // Error getting handles
- //
- DEBUG (( DEBUG_ERROR | DEBUG_INIT | DEBUG_INFO,
- "Failure getting Telnet handles\r\n" ));
- break;
- }
-
- //
- // Remove any use of the driver
- //
- Max = BufferSize / sizeof ( pHandle[ 0 ]);
- for ( Index = 0; Max > Index; Index++ ) {
- Status = DriverStop ( &mDriverBinding,
- pHandle[ Index ],
- 0,
- NULL );
- if ( EFI_ERROR ( Status )) {
- DEBUG (( DEBUG_WARN | DEBUG_INIT | DEBUG_INFO,
- "WARNING - Failed to shutdown the driver on handle %08x\r\n", pHandle[ Index ]));
- break;
- }
- }
- break;
- }
- }
- else {
- if ( EFI_NOT_FOUND == Status ) {
- //
- // No devices were found
- //
- Status = EFI_SUCCESS;
- }
- }
-
- //
- // Free the handle array
- //
- if ( NULL != pHandle ) {
- gBS->FreePool ( pHandle );
- }
-
- //
- // Done with the socket layer
- //
- if ( !EFI_ERROR ( Status )) {
- Status = EslDxeUninstall ( ImageHandle );
- if ( !EFI_ERROR ( Status )) {
- //
- // Remove the protocols installed by the EntryPoint routine.
- //
- Status = gBS->UninstallMultipleProtocolInterfaces (
- ImageHandle,
- &gEfiDriverBindingProtocolGuid,
- &mDriverBinding,
- &gEfiComponentNameProtocolGuid,
- &mComponentName,
- &gEfiComponentName2ProtocolGuid,
- &mComponentName2,
- NULL
- );
- if ( !EFI_ERROR ( Status )) {
- DEBUG (( DEBUG_POOL | DEBUG_INIT | DEBUG_INFO,
- "Removed: gEfiComponentName2ProtocolGuid from 0x%08x\r\n",
- ImageHandle ));
- DEBUG (( DEBUG_POOL | DEBUG_INIT | DEBUG_INFO,
- "Removed: gEfiComponentNameProtocolGuid from 0x%08x\r\n",
- ImageHandle ));
- DEBUG (( DEBUG_POOL | DEBUG_INIT | DEBUG_INFO,
- "Removed: gEfiDriverBindingProtocolGuid from 0x%08x\r\n",
- ImageHandle ));
- }
- else {
- DEBUG (( DEBUG_ERROR | DEBUG_POOL | DEBUG_INIT,
- "ERROR - Failed to remove gEfiDriverBindingProtocolGuid from 0x%08x, Status: %r\r\n",
- ImageHandle,
- Status ));
- }
- }
- }
-
- //
- // Disconnect the network services
- //
- if ( !EFI_ERROR ( Status )) {
- EslServiceUnload ( );
- }
-
- //
- // Return the unload status
- //
- return Status;
-}
-
-
-/**
-Socket driver entry point.
-
-@param [in] ImageHandle Handle for the image.
-@param [in] pSystemTable Address of the system table.
-
-@retval EFI_SUCCESS Image successfully loaded.
-
-**/
-EFI_STATUS
-EFIAPI
-EntryPoint (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE * pSystemTable
- )
-{
- EFI_LOADED_IMAGE_PROTOCOL * pLoadedImage;
- EFI_STATUS Status;
-
- DBG_ENTER ( );
-
- //
- // Display the image handle
- //
- DEBUG (( DEBUG_INFO,
- "ImageHandle: 0x%08x\r\n",
- ImageHandle ));
-
- //
- // Enable unload support
- //
- Status = gBS->HandleProtocol (
- gImageHandle,
- &gEfiLoadedImageProtocolGuid,
- (VOID **)&pLoadedImage
- );
- if (!EFI_ERROR (Status)) {
- pLoadedImage->Unload = DriverUnload;
-
- //
- // Add the driver to the list of drivers
- //
- Status = EfiLibInstallDriverBindingComponentName2 (
- ImageHandle,
- pSystemTable,
- &mDriverBinding,
- ImageHandle,
- &mComponentName,
- &mComponentName2
- );
- if ( !EFI_ERROR ( Status )) {
- DEBUG (( DEBUG_POOL | DEBUG_INIT | DEBUG_INFO,
- "Installed: gEfiDriverBindingProtocolGuid on 0x%08x\r\n",
- ImageHandle ));
- DEBUG (( DEBUG_POOL | DEBUG_INIT | DEBUG_INFO,
- "Installed: gEfiComponentNameProtocolGuid on 0x%08x\r\n",
- ImageHandle ));
- DEBUG (( DEBUG_POOL | DEBUG_INIT | DEBUG_INFO,
- "Installed: gEfiComponentName2ProtocolGuid on 0x%08x\r\n",
- ImageHandle ));
-
- //
- // Initialize the service layer
- //
- EslServiceLoad ( ImageHandle );
-
- //
- // Make the socket serivces available to other drivers
- // and applications
- //
- Status = EslDxeInstall ( &ImageHandle );
- if ( EFI_ERROR ( Status )) {
- //
- // Disconnect from the network
- //
- EslServiceUnload ( );
-
- //
- // Remove the driver bindings
- //
- gBS->UninstallMultipleProtocolInterfaces (
- ImageHandle,
- &gEfiDriverBindingProtocolGuid,
- &mDriverBinding,
- &gEfiComponentNameProtocolGuid,
- &mComponentName,
- &gEfiComponentName2ProtocolGuid,
- &mComponentName2,
- NULL
- );
- DEBUG (( DEBUG_POOL | DEBUG_INIT | DEBUG_INFO,
- "Removed: gEfiComponentName2ProtocolGuid from 0x%08x\r\n",
- ImageHandle ));
- DEBUG (( DEBUG_POOL | DEBUG_INIT | DEBUG_INFO,
- "Removed: gEfiComponentNameProtocolGuid from 0x%08x\r\n",
- ImageHandle ));
- DEBUG (( DEBUG_POOL | DEBUG_INIT | DEBUG_INFO,
- "Removed: gEfiDriverBindingProtocolGuid from 0x%08x\r\n",
- ImageHandle ));
- }
- }
- else {
- DEBUG (( DEBUG_ERROR | DEBUG_POOL | DEBUG_INIT,
- "ERROR - EfiLibInstallDriverBindingComponentName2 failed, Status: %r\r\n",
- Status ));
- }
- }
- DBG_EXIT_STATUS ( Status );
- return Status;
-}
-
-
-/**
- Socket layer's service binding protocol delcaration.
-**/
-CONST EFI_SERVICE_BINDING_PROTOCOL mEfiServiceBinding = {
- EslDxeCreateChild,
- EslDxeDestroyChild
-};
-
-
-/**
- The following entries disable the constructor and destructor
- for the SocketDxe driver. Note that socket applications linking
- against EfiSocketLib use different redirection.
-**/
-PFN_ESL_xSTRUCTOR mpfnEslConstructor = NULL; ///< No EfiSocketLib constructor needed for SocketDxe
-PFN_ESL_xSTRUCTOR mpfnEslDestructor = NULL; ///< No EfiSocketLib destructor needed for SocketDxe
diff --git a/StdLib/SocketDxe/Socket.h b/StdLib/SocketDxe/Socket.h
deleted file mode 100644
index 7d8334c4a6..0000000000
--- a/StdLib/SocketDxe/Socket.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/** @file
- Definitions for the Socket layer driver.
-
- Copyright (c) 2011, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-#ifndef _SOCKET_H_
-#define _SOCKET_H_
-
-#include <Library/UefiDriverEntryPoint.h>
-#include <Efi/EfiSocketLib.h>
-
-#include <Protocol/LoadedImage.h>
-
-//------------------------------------------------------------------------------
-// Protocol Declarations
-//------------------------------------------------------------------------------
-
-extern EFI_COMPONENT_NAME_PROTOCOL mComponentName; ///< Component name protocol declaration
-extern EFI_COMPONENT_NAME2_PROTOCOL mComponentName2; ///< Component name 2 protocol declaration
-extern EFI_DRIVER_BINDING_PROTOCOL mDriverBinding; ///< Driver binding protocol declaration
-extern EFI_SERVICE_BINDING_PROTOCOL mServiceBinding; ///< Service binding protocol delcaration
-
-//------------------------------------------------------------------------------
-// Driver Binding Protocol Support
-//------------------------------------------------------------------------------
-
-/**
- Stop this driver on Controller by removing NetworkInterfaceIdentifier protocol and
- closing the DevicePath and PciIo protocols on Controller.
-
- @param [in] pThis Protocol instance pointer.
- @param [in] Controller Handle of device to stop driver on.
- @param [in] NumberOfChildren How many children need to be stopped.
- @param [in] pChildHandleBuffer Not used.
-
- @retval EFI_SUCCESS This driver is removed Controller.
- @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.
- @retval other This driver was not removed from this device.
-
-**/
-EFI_STATUS
-EFIAPI
-DriverStop (
- IN EFI_DRIVER_BINDING_PROTOCOL * pThis,
- IN EFI_HANDLE Controller,
- IN UINTN NumberOfChildren,
- IN EFI_HANDLE * pChildHandleBuffer
- );
-
-//------------------------------------------------------------------------------
-// EFI Component Name Protocol Support
-//------------------------------------------------------------------------------
-
-/**
- Retrieves a Unicode string that is the user readable name of the driver.
-
- This function retrieves the user readable name of a driver in the form of a
- Unicode string. If the driver specified by This has a user readable name in
- the language specified by Language, then a pointer to the driver name is
- returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
- by This does not support the language specified by Language,
- then EFI_UNSUPPORTED is returned.
-
- @param [in] pThis A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
- EFI_COMPONENT_NAME_PROTOCOL instance.
- @param [in] pLanguage A pointer to a Null-terminated ASCII string
- array indicating the language. This is the
- language of the driver name that the caller is
- requesting, and it must match one of the
- languages specified in SupportedLanguages. The
- number of languages supported by a driver is up
- to the driver writer. Language is specified
- in RFC 3066 or ISO 639-2 language code format.
- @param [out] ppDriverName A pointer to the Unicode string to return.
- This Unicode string is the name of the
- driver specified by This in the language
- specified by Language.
-
- @retval EFI_SUCCESS The Unicode string for the Driver specified by
- This and the language specified by Language was
- returned in DriverName.
- @retval EFI_INVALID_PARAMETER Language is NULL.
- @retval EFI_INVALID_PARAMETER DriverName is NULL.
- @retval EFI_UNSUPPORTED The driver specified by This does not support
- the language specified by Language.
-
-**/
-EFI_STATUS
-EFIAPI
-GetDriverName (
- IN EFI_COMPONENT_NAME_PROTOCOL * pThis,
- IN CHAR8 * pLanguage,
- OUT CHAR16 ** ppDriverName
- );
-
-
-/**
- Retrieves a Unicode string that is the user readable name of the controller
- that is being managed by a driver.
-
- This function retrieves the user readable name of the controller specified by
- ControllerHandle and ChildHandle in the form of a Unicode string. If the
- driver specified by This has a user readable name in the language specified by
- Language, then a pointer to the controller name is returned in ControllerName,
- and EFI_SUCCESS is returned. If the driver specified by This is not currently
- managing the controller specified by ControllerHandle and ChildHandle,
- then EFI_UNSUPPORTED is returned. If the driver specified by This does not
- support the language specified by Language, then EFI_UNSUPPORTED is returned.
-
- @param [in] pThis A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
- EFI_COMPONENT_NAME_PROTOCOL instance.
- @param [in] ControllerHandle The handle of a controller that the driver
- specified by This is managing. This handle
- specifies the controller whose name is to be
- returned.
- @param [in] ChildHandle The handle of the child controller to retrieve
- the name of. This is an optional parameter that
- may be NULL. It will be NULL for device
- drivers. It will also be NULL for a bus drivers
- that wish to retrieve the name of the bus
- controller. It will not be NULL for a bus
- driver that wishes to retrieve the name of a
- child controller.
- @param [in] pLanguage A pointer to a Null-terminated ASCII string
- array indicating the language. This is the
- language of the driver name that the caller is
- requesting, and it must match one of the
- languages specified in SupportedLanguages. The
- number of languages supported by a driver is up
- to the driver writer. Language is specified in
- RFC 3066 or ISO 639-2 language code format.
- @param [out] ppControllerName A pointer to the Unicode string to return.
- This Unicode string is the name of the
- controller specified by ControllerHandle and
- ChildHandle in the language specified by
- Language from the point of view of the driver
- specified by This.
-
- @retval EFI_SUCCESS The Unicode string for the user readable name in
- the language specified by Language for the
- driver specified by This was returned in
- DriverName.
- @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
- @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
- EFI_HANDLE.
- @retval EFI_INVALID_PARAMETER Language is NULL.
- @retval EFI_INVALID_PARAMETER ControllerName is NULL.
- @retval EFI_UNSUPPORTED The driver specified by This is not currently
- managing the controller specified by
- ControllerHandle and ChildHandle.
- @retval EFI_UNSUPPORTED The driver specified by This does not support
- the language specified by Language.
-
-**/
-EFI_STATUS
-EFIAPI
-GetControllerName (
- IN EFI_COMPONENT_NAME_PROTOCOL * pThis,
- IN EFI_HANDLE ControllerHandle,
- IN OPTIONAL EFI_HANDLE ChildHandle,
- IN CHAR8 * pLanguage,
- OUT CHAR16 ** ppControllerName
- );
-
-//------------------------------------------------------------------------------
-
-#endif // _SOCKET_H_
diff --git a/StdLib/SocketDxe/SocketDxe.inf b/StdLib/SocketDxe/SocketDxe.inf
deleted file mode 100644
index 1b459bafc8..0000000000
--- a/StdLib/SocketDxe/SocketDxe.inf
+++ /dev/null
@@ -1,62 +0,0 @@
-#/** @file
-# Component description file for the socket layer driver.
-#
-# This module implements the socket layer.
-# Copyright (c) 2011, Intel Corporation
-#
-# All rights reserved. This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-#**/
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = SocketDxe
- FILE_GUID = 2A43BA5F-AC29-4fdc-8A3B-0328D0256F8C
- MODULE_TYPE = DXE_RUNTIME_DRIVER
- VERSION_STRING = 1.0
-
- ENTRY_POINT = EntryPoint
-
-#
-# VALID_ARCHITECTURES = IA32 X64 IPF EBC
-#
-
-[Sources.common]
- Socket.h
- ComponentName.c
- DriverBinding.c
- EntryUnload.c
-
-[Packages]
- MdePkg/MdePkg.dec
- MdeModulePkg/MdeModulePkg.dec
- StdLib/StdLib.dec
-
-[LibraryClasses]
- EfiSocketLib
- UefiLib
- UefiBootServicesTableLib
- BaseMemoryLib
- DebugLib
- UefiRuntimeLib
- UefiDriverEntryPoint
-
-[Protocols]
- gEfiTcp4ProtocolGuid
- gEfiTcp4ServiceBindingProtocolGuid
- gEfiUdp4ProtocolGuid
- gEfiUdp4ServiceBindingProtocolGuid
- gEfiSocketProtocolGuid
- gEfiSocketServiceBindingProtocolGuid
-
-[Depex]
- gEfiBdsArchProtocolGuid AND
- gEfiCpuArchProtocolGuid AND
- gEfiTcp4ServiceBindingProtocolGuid AND
- gEfiTimerArchProtocolGuid AND
- gEfiUdp4ServiceBindingProtocolGuid