NetworkPkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
/** @file
|
||||
Driver Binding functions implementation for UEFI HTTP boot.
|
||||
|
||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials are licensed and made available under
|
||||
the terms and conditions of the BSD License that accompanies this distribution.
|
||||
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials are licensed and made available under
|
||||
the terms and conditions of the BSD License that 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.
|
||||
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.
|
||||
|
||||
**/
|
||||
|
||||
@@ -75,7 +75,7 @@ HttpBootCheckIpv6Support (
|
||||
|
||||
//
|
||||
// Get the NIC handle by SNP protocol.
|
||||
//
|
||||
//
|
||||
Handle = NetLibGetSnpHandle (Private->Controller, NULL);
|
||||
if (Handle == NULL) {
|
||||
return EFI_NOT_FOUND;
|
||||
@@ -121,11 +121,11 @@ HttpBootCheckIpv6Support (
|
||||
if (EFI_ERROR (Status) || InfoBlock == NULL) {
|
||||
FreePool (InfoBlock);
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
|
||||
*Ipv6Support = ((EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT *) InfoBlock)->Ipv6Support;
|
||||
FreePool (InfoBlock);
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -167,14 +167,14 @@ HttpBootDestroyIp4Children (
|
||||
}
|
||||
|
||||
if (Private->Ip4Nic != NULL) {
|
||||
|
||||
|
||||
gBS->CloseProtocol (
|
||||
Private->Controller,
|
||||
&gEfiCallerIdGuid,
|
||||
This->DriverBindingHandle,
|
||||
Private->Ip4Nic->Controller
|
||||
);
|
||||
|
||||
|
||||
gBS->UninstallMultipleProtocolInterfaces (
|
||||
Private->Ip4Nic->Controller,
|
||||
&gEfiLoadFileProtocolGuid,
|
||||
@@ -204,7 +204,7 @@ HttpBootDestroyIp6Children (
|
||||
{
|
||||
ASSERT (This != NULL);
|
||||
ASSERT (Private != NULL);
|
||||
|
||||
|
||||
if (Private->Ip6Child != NULL) {
|
||||
gBS->CloseProtocol (
|
||||
Private->Ip6Child,
|
||||
@@ -241,16 +241,16 @@ HttpBootDestroyIp6Children (
|
||||
HttpIoDestroyIo(&Private->HttpIo);
|
||||
Private->HttpCreated = FALSE;
|
||||
}
|
||||
|
||||
|
||||
if (Private->Ip6Nic != NULL) {
|
||||
|
||||
|
||||
gBS->CloseProtocol (
|
||||
Private->Controller,
|
||||
&gEfiCallerIdGuid,
|
||||
This->DriverBindingHandle,
|
||||
Private->Ip6Nic->Controller
|
||||
);
|
||||
|
||||
|
||||
gBS->UninstallMultipleProtocolInterfaces (
|
||||
Private->Ip6Nic->Controller,
|
||||
&gEfiLoadFileProtocolGuid,
|
||||
@@ -265,33 +265,33 @@ HttpBootDestroyIp6Children (
|
||||
}
|
||||
|
||||
/**
|
||||
Tests to see if this driver supports a given controller. If a child device is provided,
|
||||
Tests to see if this driver supports a given controller. If a child device is provided,
|
||||
it further tests to see if this driver supports creating a handle for the specified child device.
|
||||
|
||||
This function checks to see if the driver specified by This supports the device specified by
|
||||
ControllerHandle. Drivers will typically use the device path attached to
|
||||
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
||||
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
||||
may be called many times during platform initialization. In order to reduce boot times, the tests
|
||||
performed by this function must be very small, and take as little time as possible to execute. This
|
||||
function must not change the state of any hardware devices, and this function must be aware that the
|
||||
device specified by ControllerHandle may already be managed by the same driver or a
|
||||
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
||||
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
||||
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
||||
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
||||
This function checks to see if the driver specified by This supports the device specified by
|
||||
ControllerHandle. Drivers will typically use the device path attached to
|
||||
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
||||
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
||||
may be called many times during platform initialization. In order to reduce boot times, the tests
|
||||
performed by this function must be very small, and take as little time as possible to execute. This
|
||||
function must not change the state of any hardware devices, and this function must be aware that the
|
||||
device specified by ControllerHandle may already be managed by the same driver or a
|
||||
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
||||
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
||||
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
||||
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
||||
to guarantee the state of ControllerHandle is not modified by this function.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||
must support a protocol interface that supplies
|
||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||
must support a protocol interface that supplies
|
||||
an I/O abstraction to the driver.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||
parameter is ignored by device drivers, and is optional for bus
|
||||
drivers. For bus drivers, if this parameter is not NULL, then
|
||||
the bus driver must determine if the bus controller specified
|
||||
by ControllerHandle and the child controller specified
|
||||
by RemainingDevicePath are both supported by this
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||
parameter is ignored by device drivers, and is optional for bus
|
||||
drivers. For bus drivers, if this parameter is not NULL, then
|
||||
the bus driver must determine if the bus controller specified
|
||||
by ControllerHandle and the child controller specified
|
||||
by RemainingDevicePath are both supported by this
|
||||
bus driver.
|
||||
|
||||
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
||||
@@ -315,7 +315,7 @@ HttpBootIp4DxeDriverBindingSupported (
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
|
||||
//
|
||||
// Try to open the DHCP4, HTTP4 and Device Path protocol.
|
||||
//
|
||||
@@ -360,28 +360,28 @@ HttpBootIp4DxeDriverBindingSupported (
|
||||
Starts a device controller or a bus controller.
|
||||
|
||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||
common boot service. It is legal to call Start() from other locations,
|
||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||
common boot service. It is legal to call Start() from other locations,
|
||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||
1. ControllerHandle must be a valid EFI_HANDLE.
|
||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
||||
EFI_DEVICE_PATH_PROTOCOL.
|
||||
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||
must support a protocol interface that supplies
|
||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||
must support a protocol interface that supplies
|
||||
an I/O abstraction to the driver.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||
parameter is ignored by device drivers, and is optional for bus
|
||||
drivers. For a bus driver, if this parameter is NULL, then handles
|
||||
for all the children of Controller are created by this driver.
|
||||
If this parameter is not NULL and the first Device Path Node is
|
||||
not the End of Device Path Node, then only the handle for the
|
||||
child device specified by the first Device Path Node of
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||
parameter is ignored by device drivers, and is optional for bus
|
||||
drivers. For a bus driver, if this parameter is NULL, then handles
|
||||
for all the children of Controller are created by this driver.
|
||||
If this parameter is not NULL and the first Device Path Node is
|
||||
not the End of Device Path Node, then only the handle for the
|
||||
child device specified by the first Device Path Node of
|
||||
RemainingDevicePath is created by this driver.
|
||||
If the first Device Path Node of RemainingDevicePath is
|
||||
If the first Device Path Node of RemainingDevicePath is
|
||||
the End of Device Path Node, no child handle is created by this
|
||||
driver.
|
||||
|
||||
@@ -421,7 +421,7 @@ HttpBootIp4DxeDriverBindingStart (
|
||||
Private = HTTP_BOOT_PRIVATE_DATA_FROM_ID(Id);
|
||||
} else {
|
||||
FirstStart = TRUE;
|
||||
|
||||
|
||||
//
|
||||
// Initialize the private data structure.
|
||||
//
|
||||
@@ -483,16 +483,16 @@ HttpBootIp4DxeDriverBindingStart (
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto ON_ERROR;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (Private->Ip4Nic != NULL) {
|
||||
//
|
||||
// Already created before
|
||||
//
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
Private->Ip4Nic = AllocateZeroPool (sizeof (HTTP_BOOT_VIRTUAL_NIC));
|
||||
if (Private->Ip4Nic == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
@@ -501,7 +501,7 @@ HttpBootIp4DxeDriverBindingStart (
|
||||
Private->Ip4Nic->Private = Private;
|
||||
Private->Ip4Nic->ImageHandle = This->DriverBindingHandle;
|
||||
Private->Ip4Nic->Signature = HTTP_BOOT_VIRTUAL_NIC_SIGNATURE;
|
||||
|
||||
|
||||
//
|
||||
// Create DHCP4 child instance.
|
||||
//
|
||||
@@ -514,7 +514,7 @@ HttpBootIp4DxeDriverBindingStart (
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto ON_ERROR;
|
||||
}
|
||||
|
||||
|
||||
Status = gBS->OpenProtocol (
|
||||
Private->Dhcp4Child,
|
||||
&gEfiDhcp4ProtocolGuid,
|
||||
@@ -526,7 +526,7 @@ HttpBootIp4DxeDriverBindingStart (
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto ON_ERROR;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Get the Ip4Config2 protocol, it's required to configure the default gateway address.
|
||||
//
|
||||
@@ -541,7 +541,7 @@ HttpBootIp4DxeDriverBindingStart (
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto ON_ERROR;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Append IPv4 device path node.
|
||||
//
|
||||
@@ -560,7 +560,7 @@ HttpBootIp4DxeDriverBindingStart (
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto ON_ERROR;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Append URI device path node.
|
||||
//
|
||||
@@ -579,7 +579,7 @@ HttpBootIp4DxeDriverBindingStart (
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto ON_ERROR;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Create a child handle for the HTTP boot and install DevPath and Load file protocol on it.
|
||||
//
|
||||
@@ -595,7 +595,7 @@ HttpBootIp4DxeDriverBindingStart (
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto ON_ERROR;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Open the Caller Id child to setup a parent-child relationship between
|
||||
// real NIC handle and the HTTP boot Ipv4 NIC handle.
|
||||
@@ -611,9 +611,9 @@ HttpBootIp4DxeDriverBindingStart (
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto ON_ERROR;
|
||||
}
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
||||
|
||||
ON_ERROR:
|
||||
if (Private != NULL) {
|
||||
if (FirstStart) {
|
||||
@@ -623,7 +623,7 @@ ON_ERROR:
|
||||
&Private->Id
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
HttpBootDestroyIp4Children (This, Private);
|
||||
HttpBootConfigFormUnload (Private);
|
||||
|
||||
@@ -638,10 +638,10 @@ ON_ERROR:
|
||||
|
||||
/**
|
||||
Stops a device controller or a bus controller.
|
||||
|
||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||
into this common boot service. It is legal to call Stop() from other locations,
|
||||
|
||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||
into this common boot service. It is legal to call Stop() from other locations,
|
||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
||||
same driver's Start() function.
|
||||
@@ -649,13 +649,13 @@ ON_ERROR:
|
||||
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
||||
Start() function, and the Start() function must have called OpenProtocol() on
|
||||
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||
support a bus specific I/O protocol for the driver
|
||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||
support a bus specific I/O protocol for the driver
|
||||
to use to stop the device.
|
||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||
if NumberOfChildren is 0.
|
||||
|
||||
@retval EFI_SUCCESS The device was stopped.
|
||||
@@ -729,7 +729,7 @@ HttpBootIp4DxeDriverBindingStop (
|
||||
// Destory all child instance and uninstall protocol interface.
|
||||
//
|
||||
HttpBootDestroyIp4Children (This, Private);
|
||||
|
||||
|
||||
if (Private->Ip4Nic == NULL && Private->Ip6Nic == NULL) {
|
||||
//
|
||||
// Release the cached data.
|
||||
@@ -740,7 +740,7 @@ HttpBootIp4DxeDriverBindingStop (
|
||||
// Unload the config form.
|
||||
//
|
||||
HttpBootConfigFormUnload (Private);
|
||||
|
||||
|
||||
gBS->UninstallProtocolInterface (
|
||||
NicHandle,
|
||||
&gEfiCallerIdGuid,
|
||||
@@ -754,33 +754,33 @@ HttpBootIp4DxeDriverBindingStop (
|
||||
}
|
||||
|
||||
/**
|
||||
Tests to see if this driver supports a given controller. If a child device is provided,
|
||||
Tests to see if this driver supports a given controller. If a child device is provided,
|
||||
it further tests to see if this driver supports creating a handle for the specified child device.
|
||||
|
||||
This function checks to see if the driver specified by This supports the device specified by
|
||||
ControllerHandle. Drivers will typically use the device path attached to
|
||||
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
||||
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
||||
may be called many times during platform initialization. In order to reduce boot times, the tests
|
||||
performed by this function must be very small, and take as little time as possible to execute. This
|
||||
function must not change the state of any hardware devices, and this function must be aware that the
|
||||
device specified by ControllerHandle may already be managed by the same driver or a
|
||||
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
||||
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
||||
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
||||
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
||||
This function checks to see if the driver specified by This supports the device specified by
|
||||
ControllerHandle. Drivers will typically use the device path attached to
|
||||
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
||||
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
||||
may be called many times during platform initialization. In order to reduce boot times, the tests
|
||||
performed by this function must be very small, and take as little time as possible to execute. This
|
||||
function must not change the state of any hardware devices, and this function must be aware that the
|
||||
device specified by ControllerHandle may already be managed by the same driver or a
|
||||
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
||||
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
||||
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
||||
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
||||
to guarantee the state of ControllerHandle is not modified by this function.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||
must support a protocol interface that supplies
|
||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||
must support a protocol interface that supplies
|
||||
an I/O abstraction to the driver.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||
parameter is ignored by device drivers, and is optional for bus
|
||||
drivers. For bus drivers, if this parameter is not NULL, then
|
||||
the bus driver must determine if the bus controller specified
|
||||
by ControllerHandle and the child controller specified
|
||||
by RemainingDevicePath are both supported by this
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||
parameter is ignored by device drivers, and is optional for bus
|
||||
drivers. For bus drivers, if this parameter is not NULL, then
|
||||
the bus driver must determine if the bus controller specified
|
||||
by ControllerHandle and the child controller specified
|
||||
by RemainingDevicePath are both supported by this
|
||||
bus driver.
|
||||
|
||||
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
||||
@@ -804,7 +804,7 @@ HttpBootIp6DxeDriverBindingSupported (
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
|
||||
//
|
||||
// Try to open the DHCP6, HTTP and Device Path protocol.
|
||||
//
|
||||
@@ -849,28 +849,28 @@ HttpBootIp6DxeDriverBindingSupported (
|
||||
Starts a device controller or a bus controller.
|
||||
|
||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||
common boot service. It is legal to call Start() from other locations,
|
||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||
common boot service. It is legal to call Start() from other locations,
|
||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||
1. ControllerHandle must be a valid EFI_HANDLE.
|
||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
||||
EFI_DEVICE_PATH_PROTOCOL.
|
||||
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||
must support a protocol interface that supplies
|
||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||
must support a protocol interface that supplies
|
||||
an I/O abstraction to the driver.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||
parameter is ignored by device drivers, and is optional for bus
|
||||
drivers. For a bus driver, if this parameter is NULL, then handles
|
||||
for all the children of Controller are created by this driver.
|
||||
If this parameter is not NULL and the first Device Path Node is
|
||||
not the End of Device Path Node, then only the handle for the
|
||||
child device specified by the first Device Path Node of
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||
parameter is ignored by device drivers, and is optional for bus
|
||||
drivers. For a bus driver, if this parameter is NULL, then handles
|
||||
for all the children of Controller are created by this driver.
|
||||
If this parameter is not NULL and the first Device Path Node is
|
||||
not the End of Device Path Node, then only the handle for the
|
||||
child device specified by the first Device Path Node of
|
||||
RemainingDevicePath is created by this driver.
|
||||
If the first Device Path Node of RemainingDevicePath is
|
||||
If the first Device Path Node of RemainingDevicePath is
|
||||
the End of Device Path Node, no child handle is created by this
|
||||
driver.
|
||||
|
||||
@@ -897,7 +897,7 @@ HttpBootIp6DxeDriverBindingStart (
|
||||
BOOLEAN FirstStart;
|
||||
|
||||
FirstStart = FALSE;
|
||||
|
||||
|
||||
Status = gBS->OpenProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiCallerIdGuid,
|
||||
@@ -906,12 +906,12 @@ HttpBootIp6DxeDriverBindingStart (
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
Private = HTTP_BOOT_PRIVATE_DATA_FROM_ID(Id);
|
||||
} else {
|
||||
FirstStart = TRUE;
|
||||
|
||||
|
||||
//
|
||||
// Initialize the private data structure.
|
||||
//
|
||||
@@ -973,16 +973,16 @@ HttpBootIp6DxeDriverBindingStart (
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto ON_ERROR;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// Set IPv6 available flag.
|
||||
//
|
||||
//
|
||||
Status = HttpBootCheckIpv6Support (Private, &Ipv6Available);
|
||||
if (EFI_ERROR (Status)) {
|
||||
//
|
||||
// Fail to get the data whether UNDI supports IPv6.
|
||||
// Fail to get the data whether UNDI supports IPv6.
|
||||
// Set default value to TRUE.
|
||||
//
|
||||
Ipv6Available = TRUE;
|
||||
@@ -992,14 +992,14 @@ HttpBootIp6DxeDriverBindingStart (
|
||||
Status = EFI_UNSUPPORTED;
|
||||
goto ON_ERROR;
|
||||
}
|
||||
|
||||
|
||||
if (Private->Ip6Nic != NULL) {
|
||||
//
|
||||
// Already created before
|
||||
//
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
Private->Ip6Nic = AllocateZeroPool (sizeof (HTTP_BOOT_VIRTUAL_NIC));
|
||||
if (Private->Ip6Nic == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
@@ -1008,7 +1008,7 @@ HttpBootIp6DxeDriverBindingStart (
|
||||
Private->Ip6Nic->Private = Private;
|
||||
Private->Ip6Nic->ImageHandle = This->DriverBindingHandle;
|
||||
Private->Ip6Nic->Signature = HTTP_BOOT_VIRTUAL_NIC_SIGNATURE;
|
||||
|
||||
|
||||
//
|
||||
// Create Dhcp6 child and open Dhcp6 protocol
|
||||
Status = NetLibCreateServiceChild (
|
||||
@@ -1144,7 +1144,7 @@ HttpBootIp6DxeDriverBindingStart (
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
||||
|
||||
ON_ERROR:
|
||||
if (Private != NULL) {
|
||||
if (FirstStart) {
|
||||
@@ -1168,10 +1168,10 @@ ON_ERROR:
|
||||
|
||||
/**
|
||||
Stops a device controller or a bus controller.
|
||||
|
||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||
into this common boot service. It is legal to call Stop() from other locations,
|
||||
|
||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||
into this common boot service. It is legal to call Stop() from other locations,
|
||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
||||
same driver's Start() function.
|
||||
@@ -1179,13 +1179,13 @@ ON_ERROR:
|
||||
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
||||
Start() function, and the Start() function must have called OpenProtocol() on
|
||||
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||
support a bus specific I/O protocol for the driver
|
||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||
support a bus specific I/O protocol for the driver
|
||||
to use to stop the device.
|
||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||
if NumberOfChildren is 0.
|
||||
|
||||
@retval EFI_SUCCESS The device was stopped.
|
||||
@@ -1317,7 +1317,7 @@ HttpBootDxeDriverEntryPoint (
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
Status = EfiLibInstallDriverBindingComponentName2 (
|
||||
ImageHandle,
|
||||
SystemTable,
|
||||
|
Reference in New Issue
Block a user