X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FBus%2FPci%2FPciBusDxe%2FPciDeviceSupport.c;h=48cf57a24f8f4cb2347c0cd05b6ac83483729658;hp=e76c8f00468a87e9db7d6b014b3cffa257cd2a89;hb=07eba7069d4c23e9b15caa1e729682a88ddf4ada;hpb=a8035b908655afd59321173752b29970ae61601b diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c index e76c8f0046..48cf57a24f 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c @@ -1,7 +1,8 @@ /** @file Supporting functions implementaion for PCI devices management. -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+(C) Copyright 2018 Hewlett Packard Enterprise Development LP
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 @@ -105,6 +106,10 @@ FreePciDevice ( FreePool (PciIoDevice->DevicePath); } + if (PciIoDevice->BusNumberRanges != NULL) { + FreePool (PciIoDevice->BusNumberRanges); + } + FreePool (PciIoDevice); } @@ -211,7 +216,6 @@ RegisterPciDevice ( EFI_STATUS Status; VOID *PlatformOpRomBuffer; UINTN PlatformOpRomSize; - UINT8 PciExpressCapRegOffset; EFI_PCI_IO_PROTOCOL *PciIo; UINT8 Data8; BOOLEAN HasEfiImage; @@ -231,27 +235,13 @@ RegisterPciDevice ( return Status; } - // - // Detect if PCI Express Device - // - PciExpressCapRegOffset = 0; - Status = LocateCapabilityRegBlock ( - PciIoDevice, - EFI_PCI_CAPABILITY_ID_PCIEXP, - &PciExpressCapRegOffset, - NULL - ); - if (!EFI_ERROR (Status)) { - PciIoDevice->IsPciExp = TRUE; - } - // // Force Interrupt line to "Unknown" or "No Connection" // PciIo = &(PciIoDevice->PciIo); Data8 = PCI_INT_LINE_UNKNOWN; PciIo->Pci.Write (PciIo, EfiPciIoWidthUint8, 0x3C, 1, &Data8); - + // // Process OpRom // @@ -311,7 +301,7 @@ RegisterPciDevice ( PciIoDevice->PciIo.RomImage, PciIoDevice->PciIo.RomSize ); - } + } } }