X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=DuetPkg%2FPciRootBridgeNoEnumerationDxe%2FPcatPciRootBridge.c;h=f633533835381d19c3bfcbf909ec42a5723abbd9;hb=b5bd21b01293fbc069008ebf6799ac23d3b05466;hp=c5895d98d83d96a7fe7c46c6ecd03874cb06de73;hpb=8e53d24672edba2361b05e6e9046358b199f10b5;p=mirror_edk2.git diff --git a/DuetPkg/PciRootBridgeNoEnumerationDxe/PcatPciRootBridge.c b/DuetPkg/PciRootBridgeNoEnumerationDxe/PcatPciRootBridge.c index c5895d98d8..f633533835 100644 --- a/DuetPkg/PciRootBridgeNoEnumerationDxe/PcatPciRootBridge.c +++ b/DuetPkg/PciRootBridgeNoEnumerationDxe/PcatPciRootBridge.c @@ -1,7 +1,7 @@ /*++ -Copyright (c) 2005 - 2008, Intel Corporation -All rights reserved. This program and the accompanying materials +Copyright (c) 2005 - 2009, 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 @@ -21,7 +21,7 @@ Abstract: #include "PcatPciRootBridge.h" #include "DeviceIo.h" -EFI_CPU_IO_PROTOCOL *gCpuIo; +EFI_CPU_IO2_PROTOCOL *gCpuIo; EFI_STATUS EFIAPI @@ -43,7 +43,7 @@ Returns: --*/ { - EFI_STATUS Status; + EFI_STATUS Status; PCAT_PCI_ROOT_BRIDGE_INSTANCE *PrivateData; UINTN PciSegmentIndex; UINTN PciRootBridgeIndex; @@ -62,7 +62,7 @@ Returns: // // Initialize gCpuIo now since the chipset init code requires it. // - Status = gBS->LocateProtocol (&gEfiCpuIoProtocolGuid, NULL, (VOID **)&gCpuIo); + Status = gBS->LocateProtocol (&gEfiCpuIo2ProtocolGuid, NULL, (VOID **)&gCpuIo); ASSERT_EFI_ERROR (Status); // @@ -93,7 +93,7 @@ Returns: PrivateData->Signature = PCAT_PCI_ROOT_BRIDGE_SIGNATURE; PrivateData->Handle = NULL; PrivateData->DevicePath = NULL; - InitializeListHead (&PrivateData->MapInfo); + InitializeListHead (&PrivateData->MapInfo); // // Initialize the PCI root bridge number and the bus range for that root bridge @@ -151,7 +151,7 @@ Returns: // // Build the EFI Device Path Protocol instance for this PCI Root Bridge // - Status = PcatRootBridgeDevicePathConstructor (&PrivateData->DevicePath, PciRootBridgeIndex, (PrivateData->PciExpressBaseAddress != 0) ? TRUE : FALSE); + Status = PcatRootBridgeDevicePathConstructor (&PrivateData->DevicePath, PciRootBridgeIndex, (BOOLEAN)((PrivateData->PciExpressBaseAddress != 0) ? TRUE : FALSE)); if (EFI_ERROR (Status)) { goto Done; } @@ -183,7 +183,7 @@ Returns: &PrivateData->Io, EfiPciWidthUint16, Address, - sizeof (VendorId), + sizeof (VendorId) / sizeof (UINT16), &VendorId ); if ((EFI_ERROR (Status)) || ((VendorId == 0xffff) && (Function == 0))) { @@ -205,9 +205,9 @@ Returns: // Status = PrivateData->Io.Pci.Read ( &PrivateData->Io, - EfiPciWidthUint32, + EfiPciWidthUint16, Address, - sizeof (PciConfigurationHeader) / sizeof (UINT32), + sizeof (PciConfigurationHeader) / sizeof (UINT16), &PciConfigurationHeader ); if (EFI_ERROR (Status)) { @@ -804,7 +804,7 @@ Returns: if ( *Value == 0 ) { return EFI_DEVICE_ERROR; } - return EFI_SUCCESS; + return Status; } EFI_STATUS