VirtualBox

Ignore:
Timestamp:
Sep 11, 2019 8:46:37 AM (5 years ago)
Author:
vboxsync
Message:

Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), bugref:4643

Location:
trunk/src/VBox/Devices/EFI/FirmwareNew
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/FirmwareNew

  • trunk/src/VBox/Devices/EFI/FirmwareNew/NetworkPkg/Ip6Dxe/Ip6Driver.c

    r77662 r80721  
    22  The driver binding and service binding protocol for IP6 driver.
    33
    4   Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
     4  Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.<BR>
    55  (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
    66
    7   This program and the accompanying materials
    8   are licensed and made available under the terms and conditions of the BSD License
    9   which accompanies this distribution.  The full text of the license may be found at
    10   http://opensource.org/licenses/bsd-license.php.
    11 
    12   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
    13   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     7  SPDX-License-Identifier: BSD-2-Clause-Patent
    148
    159**/
     
    565559                  );
    566560  if (EFI_ERROR (Status)) {
    567     goto ON_ERROR;
     561    goto FREE_SERVICE;
    568562  }
    569563
     
    574568  Status = Ip6ConfigReadConfigData (IpSb->MacString, &IpSb->Ip6ConfigInstance);
    575569  if (EFI_ERROR (Status)) {
    576     goto ON_ERROR;
     570    goto UNINSTALL_PROTOCOL;
    577571  }
    578572
     
    588582                       DataItem->Data.Ptr
    589583                       );
    590     if (EFI_ERROR(Status) && Status != EFI_NOT_READY) {
    591       goto ON_ERROR;
     584    if (Status == EFI_INVALID_PARAMETER || Status == EFI_BAD_BUFFER_SIZE) {
     585      //
     586      // Clean the invalid ManualAddress configuration.
     587      //
     588      Status = Ip6Cfg->SetData (
     589                         Ip6Cfg,
     590                         Ip6ConfigDataTypeManualAddress,
     591                         0,
     592                         NULL
     593                         );
     594      DEBUG ((EFI_D_WARN, "Ip6DriverBindingStart: Clean the invalid ManualAddress configuration.\n"));
    592595    }
    593596  }
     
    604607                       DataItem->Data.Ptr
    605608                       );
    606     if (EFI_ERROR(Status)) {
    607       goto ON_ERROR;
     609    if (Status == EFI_INVALID_PARAMETER || Status == EFI_BAD_BUFFER_SIZE) {
     610      //
     611      // Clean the invalid Gateway configuration.
     612      //
     613      Status = Ip6Cfg->SetData (
     614                         Ip6Cfg,
     615                         Ip6ConfigDataTypeGateway,
     616                         0,
     617                         NULL
     618                         );
     619      DEBUG ((EFI_D_WARN, "Ip6DriverBindingStart: Clean the invalid Gateway configuration.\n"));
    608620    }
    609621  }
     
    614626  Status = Ip6ReceiveFrame (Ip6AcceptFrame, IpSb);
    615627  if (EFI_ERROR (Status)) {
    616     goto ON_ERROR;
     628    goto UNINSTALL_PROTOCOL;
    617629  }
    618630
     
    626638                  );
    627639  if (EFI_ERROR (Status)) {
    628     goto ON_ERROR;
     640    goto UNINSTALL_PROTOCOL;
    629641  }
    630642
     
    638650                  );
    639651  if (EFI_ERROR (Status)) {
    640     goto ON_ERROR;
     652    goto UNINSTALL_PROTOCOL;
    641653  }
    642654
     
    648660  return EFI_SUCCESS;
    649661
    650 ON_ERROR:
     662UNINSTALL_PROTOCOL:
     663  gBS->UninstallMultipleProtocolInterfaces (
     664         ControllerHandle,
     665         &gEfiIp6ServiceBindingProtocolGuid,
     666         &IpSb->ServiceBinding,
     667         &gEfiIp6ConfigProtocolGuid,
     668         Ip6Cfg,
     669         NULL
     670         );
     671
     672FREE_SERVICE:
    651673  Ip6CleanService (IpSb);
    652674  FreePool (IpSb);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette