Fixup for review
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7120 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/**@file
|
||||
/** @file
|
||||
Driver Binding functions for PCI bus module.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
@@ -44,8 +44,8 @@ EFI_PCI_PLATFORM_PROTOCOL *gPciPlatformProtocol;
|
||||
Initialize the global variables
|
||||
publish the driver binding protocol
|
||||
|
||||
@param[IN] ImageHandle,
|
||||
@param[IN] *SystemTable
|
||||
@param[in] ImageHandle,
|
||||
@param[in] *SystemTable
|
||||
|
||||
@retval status of installing driver binding component name protocol.
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/**@file
|
||||
/** @file
|
||||
This module implement Pci register operation interface for
|
||||
Pci device.
|
||||
|
||||
@@ -81,7 +81,7 @@ PciOperateRegister (
|
||||
@param PciIoDevice Pointer to instance of PCI_IO_DEVICE
|
||||
|
||||
@retval TRUE Support
|
||||
@retval FALSE Not support
|
||||
@retval FALSE Not support.
|
||||
**/
|
||||
BOOLEAN
|
||||
PciCapabilitySupport (
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/**@file
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
@@ -87,7 +87,7 @@ PciOperateRegister (
|
||||
@param PciIoDevice Pointer to instance of PCI_IO_DEVICE
|
||||
|
||||
@retval TRUE Support
|
||||
@retval FALSE Not support
|
||||
@retval FALSE Not support.
|
||||
**/
|
||||
BOOLEAN
|
||||
PciCapabilitySupport (
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/**@file
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
@@ -22,7 +22,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
LIST_ENTRY gPciDevicePool;
|
||||
|
||||
/**
|
||||
Initialize the gPciDevicePool
|
||||
Initialize the gPciDevicePool.
|
||||
**/
|
||||
EFI_STATUS
|
||||
InitializePciDevicePool (
|
||||
@@ -75,7 +75,7 @@ InsertPciDevice (
|
||||
/**
|
||||
Destroy root bridge and remove it from deivce tree.
|
||||
|
||||
@param RootBridge The bridge want to be removed
|
||||
@param RootBridge The bridge want to be removed.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -174,7 +174,7 @@ DestroyRootBridgeByHandle (
|
||||
|
||||
CurrentLink = gPciDevicePool.ForwardLink;
|
||||
|
||||
while (CurrentLink && CurrentLink != &gPciDevicePool) {
|
||||
while (CurrentLink != NULL && CurrentLink != &gPciDevicePool) {
|
||||
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);
|
||||
|
||||
if (Temp->Handle == Controller) {
|
||||
@@ -456,7 +456,7 @@ DeRegisterPciDevice (
|
||||
|
||||
CurrentLink = PciIoDevice->ChildList.ForwardLink;
|
||||
|
||||
while (CurrentLink && CurrentLink != &PciIoDevice->ChildList) {
|
||||
while (CurrentLink != NULL && CurrentLink != &PciIoDevice->ChildList) {
|
||||
Node = PCI_IO_DEVICE_FROM_LINK (CurrentLink);
|
||||
Status = DeRegisterPciDevice (Controller, Node->Handle);
|
||||
|
||||
@@ -571,7 +571,7 @@ StartPciDevicesOnBridge (
|
||||
|
||||
CurrentLink = RootBridge->ChildList.ForwardLink;
|
||||
|
||||
while (CurrentLink && CurrentLink != &RootBridge->ChildList) {
|
||||
while (CurrentLink != NULL && CurrentLink != &RootBridge->ChildList) {
|
||||
|
||||
PciIoDevice = PCI_IO_DEVICE_FROM_LINK (CurrentLink);
|
||||
if (RemainingDevicePath != NULL) {
|
||||
@@ -728,7 +728,7 @@ StartPciDevices (
|
||||
|
||||
CurrentLink = gPciDevicePool.ForwardLink;
|
||||
|
||||
while (CurrentLink && CurrentLink != &gPciDevicePool) {
|
||||
while (CurrentLink != NULL && CurrentLink != &gPciDevicePool) {
|
||||
|
||||
RootBridge = PCI_IO_DEVICE_FROM_LINK (CurrentLink);
|
||||
//
|
||||
@@ -839,11 +839,11 @@ CreateRootBridge (
|
||||
}
|
||||
|
||||
/**
|
||||
Get root bridge device instance by specific handle
|
||||
Get root bridge device instance by specific handle.
|
||||
|
||||
@param RootBridgeHandle Given root bridge handle
|
||||
@param RootBridgeHandle Given root bridge handle.
|
||||
|
||||
@return root bridge device instance
|
||||
@return root bridge device instance.
|
||||
**/
|
||||
PCI_IO_DEVICE *
|
||||
GetRootBridgeByHandle (
|
||||
@@ -855,7 +855,7 @@ GetRootBridgeByHandle (
|
||||
|
||||
CurrentLink = gPciDevicePool.ForwardLink;
|
||||
|
||||
while (CurrentLink && CurrentLink != &gPciDevicePool) {
|
||||
while (CurrentLink != NULL && CurrentLink != &gPciDevicePool) {
|
||||
|
||||
RootBridgeDev = PCI_IO_DEVICE_FROM_LINK (CurrentLink);
|
||||
if (RootBridgeDev->Handle == RootBridgeHandle) {
|
||||
@@ -869,12 +869,12 @@ GetRootBridgeByHandle (
|
||||
}
|
||||
|
||||
/**
|
||||
Judege whether Pci device existed
|
||||
Judege whether Pci device existed.
|
||||
|
||||
@param Bridge Parent bridege instance
|
||||
@param PciIoDevice Device instance
|
||||
@param Bridge Parent bridege instance.
|
||||
@param PciIoDevice Device instance.
|
||||
|
||||
@return whether Pci device existed
|
||||
@return whether Pci device existed.
|
||||
**/
|
||||
BOOLEAN
|
||||
PciDeviceExisted (
|
||||
@@ -888,7 +888,7 @@ PciDeviceExisted (
|
||||
|
||||
CurrentLink = Bridge->ChildList.ForwardLink;
|
||||
|
||||
while (CurrentLink && CurrentLink != &Bridge->ChildList) {
|
||||
while (CurrentLink != NULL && CurrentLink != &Bridge->ChildList) {
|
||||
|
||||
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);
|
||||
|
||||
@@ -909,11 +909,11 @@ PciDeviceExisted (
|
||||
}
|
||||
|
||||
/**
|
||||
Active VGA device
|
||||
Active VGA device.
|
||||
|
||||
@param VgaDevice device instance for VGA
|
||||
@param VgaDevice device instance for VGA.
|
||||
|
||||
@return device instance
|
||||
@return device instance.
|
||||
**/
|
||||
PCI_IO_DEVICE *
|
||||
ActiveVGADeviceOnTheSameSegment (
|
||||
@@ -925,7 +925,7 @@ ActiveVGADeviceOnTheSameSegment (
|
||||
|
||||
CurrentLink = gPciDevicePool.ForwardLink;
|
||||
|
||||
while (CurrentLink && CurrentLink != &gPciDevicePool) {
|
||||
while (CurrentLink != NULL && CurrentLink != &gPciDevicePool) {
|
||||
|
||||
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);
|
||||
|
||||
@@ -945,11 +945,11 @@ ActiveVGADeviceOnTheSameSegment (
|
||||
}
|
||||
|
||||
/**
|
||||
Active VGA device on root bridge
|
||||
Active VGA device on root bridge.
|
||||
|
||||
@param RootBridge Root bridge device instance
|
||||
@param RootBridge Root bridge device instance.
|
||||
|
||||
@return VGA device instance
|
||||
@return VGA device instance.
|
||||
**/
|
||||
PCI_IO_DEVICE *
|
||||
ActiveVGADeviceOnTheRootBridge (
|
||||
@@ -961,7 +961,7 @@ ActiveVGADeviceOnTheRootBridge (
|
||||
|
||||
CurrentLink = RootBridge->ChildList.ForwardLink;
|
||||
|
||||
while (CurrentLink && CurrentLink != &RootBridge->ChildList) {
|
||||
while (CurrentLink != NULL && CurrentLink != &RootBridge->ChildList) {
|
||||
|
||||
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);
|
||||
|
||||
@@ -969,7 +969,7 @@ ActiveVGADeviceOnTheRootBridge (
|
||||
(Temp->Attributes &
|
||||
(EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY |
|
||||
EFI_PCI_IO_ATTRIBUTE_VGA_IO |
|
||||
EFI_PCI_IO_ATTRIBUTE_VGA_IO_16))) {
|
||||
EFI_PCI_IO_ATTRIBUTE_VGA_IO_16)) != 0) {
|
||||
return Temp;
|
||||
}
|
||||
|
||||
@@ -989,13 +989,13 @@ ActiveVGADeviceOnTheRootBridge (
|
||||
}
|
||||
|
||||
/**
|
||||
Get HPC PCI address according to its device path
|
||||
@param PciRootBridgeIo Root bridege Io instance
|
||||
@param HpcDevicePath Given searching device path
|
||||
@param PciAddress Buffer holding searched result
|
||||
Get HPC PCI address according to its device path.
|
||||
@param PciRootBridgeIo Root bridege Io instance.
|
||||
@param HpcDevicePath Given searching device path.
|
||||
@param PciAddress Buffer holding searched result.
|
||||
|
||||
@retval EFI_NOT_FOUND Can not find the specific device path.
|
||||
@retval EFI_SUCCESS Success to get the device path
|
||||
@retval EFI_SUCCESS Success to get the device path.
|
||||
**/
|
||||
EFI_STATUS
|
||||
GetHpcPciAddress (
|
||||
@@ -1041,7 +1041,7 @@ GetHpcPciAddress (
|
||||
|
||||
CurrentLink = gPciDevicePool.ForwardLink;
|
||||
|
||||
while (CurrentLink && CurrentLink != &gPciDevicePool) {
|
||||
while (CurrentLink != NULL && CurrentLink != &gPciDevicePool) {
|
||||
|
||||
RootBridge = PCI_IO_DEVICE_FROM_LINK (CurrentLink);
|
||||
//
|
||||
@@ -1068,10 +1068,10 @@ GetHpcPciAddress (
|
||||
}
|
||||
|
||||
/**
|
||||
Get HPC PCI address according to its device path
|
||||
@param RootBridge Root bridege Io instance
|
||||
@param RemainingDevicePath Given searching device path
|
||||
@param PciAddress Buffer holding searched result
|
||||
Get HPC PCI address according to its device path.
|
||||
@param RootBridge Root bridege Io instance.
|
||||
@param RemainingDevicePath Given searching device path.
|
||||
@param PciAddress Buffer holding searched result.
|
||||
|
||||
@retval EFI_NOT_FOUND Can not find the specific device path.
|
||||
**/
|
||||
@@ -1099,7 +1099,7 @@ GetHpcPciAddressFromRootBridge (
|
||||
CurrentLink = RootBridge->ChildList.ForwardLink;
|
||||
Node.DevPath = CurrentDevicePath;
|
||||
|
||||
while (CurrentLink && CurrentLink != &RootBridge->ChildList) {
|
||||
while (CurrentLink != NULL && CurrentLink != &RootBridge->ChildList) {
|
||||
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);
|
||||
|
||||
if (Node.Pci->Device == Temp->DeviceNumber &&
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/**@file
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
@@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#define _EFI_PCI_DEVICE_SUPPORT_H
|
||||
|
||||
/**
|
||||
Initialize the gPciDevicePool
|
||||
Initialize the gPciDevicePool.
|
||||
**/
|
||||
EFI_STATUS
|
||||
InitializePciDevicePool (
|
||||
@@ -183,11 +183,11 @@ CreateRootBridge (
|
||||
);
|
||||
|
||||
/**
|
||||
Get root bridge device instance by specific handle
|
||||
Get root bridge device instance by specific handle.
|
||||
|
||||
@param RootBridgeHandle Given root bridge handle
|
||||
@param RootBridgeHandle Given root bridge handle.
|
||||
|
||||
@return root bridge device instance
|
||||
@return root bridge device instance.
|
||||
**/
|
||||
PCI_IO_DEVICE *
|
||||
GetRootBridgeByHandle (
|
||||
@@ -200,12 +200,12 @@ RootBridgeExisted (
|
||||
);
|
||||
|
||||
/**
|
||||
Judege whether Pci device existed
|
||||
Judege whether Pci device existed.
|
||||
|
||||
@param Bridge Parent bridege instance
|
||||
@param PciIoDevice Device instance
|
||||
@param Bridge Parent bridege instance.
|
||||
@param PciIoDevice Device instance.
|
||||
|
||||
@return whether Pci device existed
|
||||
@return whether Pci device existed.
|
||||
**/
|
||||
BOOLEAN
|
||||
PciDeviceExisted (
|
||||
@@ -214,11 +214,11 @@ PciDeviceExisted (
|
||||
);
|
||||
|
||||
/**
|
||||
Active VGA device
|
||||
Active VGA device.
|
||||
|
||||
@param VgaDevice device instance for VGA
|
||||
@param VgaDevice device instance for VGA.
|
||||
|
||||
@return device instance
|
||||
@return device instance.
|
||||
**/
|
||||
PCI_IO_DEVICE *
|
||||
ActiveVGADeviceOnTheSameSegment (
|
||||
@@ -226,11 +226,11 @@ ActiveVGADeviceOnTheSameSegment (
|
||||
);
|
||||
|
||||
/**
|
||||
Active VGA device on root bridge
|
||||
Active VGA device on root bridge.
|
||||
|
||||
@param RootBridge Root bridge device instance
|
||||
@param RootBridge Root bridge device instance.
|
||||
|
||||
@return VGA device instance
|
||||
@return VGA device instance.
|
||||
**/
|
||||
PCI_IO_DEVICE *
|
||||
ActiveVGADeviceOnTheRootBridge (
|
||||
@@ -238,13 +238,13 @@ ActiveVGADeviceOnTheRootBridge (
|
||||
);
|
||||
|
||||
/**
|
||||
Get HPC PCI address according to its device path
|
||||
@param PciRootBridgeIo Root bridege Io instance
|
||||
@param HpcDevicePath Given searching device path
|
||||
@param PciAddress Buffer holding searched result
|
||||
Get HPC PCI address according to its device path.
|
||||
@param PciRootBridgeIo Root bridege Io instance.
|
||||
@param HpcDevicePath Given searching device path.
|
||||
@param PciAddress Buffer holding searched result.
|
||||
|
||||
@retval EFI_NOT_FOUND Can not find the specific device path.
|
||||
@retval EFI_SUCCESS Success to get the device path
|
||||
@retval EFI_SUCCESS Success to get the device path.
|
||||
**/
|
||||
EFI_STATUS
|
||||
GetHpcPciAddress (
|
||||
@@ -254,10 +254,10 @@ GetHpcPciAddress (
|
||||
);
|
||||
|
||||
/**
|
||||
Get HPC PCI address according to its device path
|
||||
@param RootBridge Root bridege Io instance
|
||||
@param RemainingDevicePath Given searching device path
|
||||
@param PciAddress Buffer holding searched result
|
||||
Get HPC PCI address according to its device path.
|
||||
@param RootBridge Root bridege Io instance.
|
||||
@param RemainingDevicePath Given searching device path.
|
||||
@param PciAddress Buffer holding searched result.
|
||||
|
||||
@retval EFI_NOT_FOUND Can not find the specific device path.
|
||||
**/
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/**@file
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
@@ -15,11 +15,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include "PciBus.h"
|
||||
|
||||
/**
|
||||
Initializes a PCI Driver Override Instance
|
||||
Initializes a PCI Driver Override Instance.
|
||||
|
||||
@param PciIoDevice Device instance
|
||||
@param PciIoDevice Device instance.
|
||||
|
||||
@retval EFI_SUCCESS Operation success
|
||||
@retval EFI_SUCCESS Operation success.
|
||||
**/
|
||||
EFI_STATUS
|
||||
InitializePciDriverOverrideInstance (
|
||||
@@ -31,13 +31,13 @@ InitializePciDriverOverrideInstance (
|
||||
}
|
||||
|
||||
/**
|
||||
Get a overriding driver image
|
||||
@param This Pointer to instance of EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL
|
||||
@param DriverImageHandle Override driver image,
|
||||
Get a overriding driver image.
|
||||
@param This Pointer to instance of EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL.
|
||||
@param DriverImageHandle Override driver image.
|
||||
|
||||
@retval EFI_SUCCESS Success to get driver image handle
|
||||
@retval EFI_NOT_FOUND can not find override driver image
|
||||
@retval EFI_INVALID_PARAMETER Invalid parameter
|
||||
@retval EFI_SUCCESS Success to get driver image handle.
|
||||
@retval EFI_NOT_FOUND can not find override driver image.
|
||||
@retval EFI_INVALID_PARAMETER Invalid parameter.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -54,7 +54,7 @@ GetDriver (
|
||||
|
||||
CurrentLink = PciIoDevice->OptionRomDriverList.ForwardLink;
|
||||
|
||||
while (CurrentLink && CurrentLink != &PciIoDevice->OptionRomDriverList) {
|
||||
while (CurrentLink != NULL && CurrentLink != &PciIoDevice->OptionRomDriverList) {
|
||||
|
||||
Node = DRIVER_OVERRIDE_FROM_LINK (CurrentLink);
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/**@file
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
@@ -28,11 +28,11 @@ typedef struct {
|
||||
CR (a, PCI_DRIVER_OVERRIDE_LIST, Link, DRIVER_OVERRIDE_SIGNATURE)
|
||||
|
||||
/**
|
||||
Initializes a PCI Driver Override Instance
|
||||
Initializes a PCI Driver Override Instance.
|
||||
|
||||
@param PciIoDevice Device instance
|
||||
@param PciIoDevice Device instance.
|
||||
|
||||
@retval EFI_SUCCESS Operation success
|
||||
@retval EFI_SUCCESS Operation success.
|
||||
**/
|
||||
EFI_STATUS
|
||||
InitializePciDriverOverrideInstance (
|
||||
@@ -40,13 +40,13 @@ InitializePciDriverOverrideInstance (
|
||||
);
|
||||
|
||||
/**
|
||||
Add an overriding driver image
|
||||
Add an overriding driver image.
|
||||
|
||||
@param PciIoDevice Instance of PciIo device
|
||||
@param DriverImageHandle new added driver image
|
||||
@param PciIoDevice Instance of PciIo device.
|
||||
@param DriverImageHandle new added driver image.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES no memory resource for new driver instance
|
||||
@retval EFI_SUCCESS Success add driver
|
||||
@retval EFI_OUT_OF_RESOURCES no memory resource for new driver instance.
|
||||
@retval EFI_SUCCESS Success add driver.
|
||||
**/
|
||||
EFI_STATUS
|
||||
AddDriver (
|
||||
@@ -56,13 +56,13 @@ AddDriver (
|
||||
|
||||
|
||||
/**
|
||||
Get a overriding driver image
|
||||
@param This Pointer to instance of EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL
|
||||
@param DriverImageHandle Override driver image,
|
||||
Get a overriding driver image.
|
||||
@param This Pointer to instance of EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL.
|
||||
@param DriverImageHandle Override driver image.
|
||||
|
||||
@retval EFI_SUCCESS Success to get driver image handle
|
||||
@retval EFI_NOT_FOUND can not find override driver image
|
||||
@retval EFI_INVALID_PARAMETER Invalid parameter
|
||||
@retval EFI_SUCCESS Success to get driver image handle.
|
||||
@retval EFI_NOT_FOUND can not find override driver image.
|
||||
@retval EFI_INVALID_PARAMETER Invalid parameter.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/**@file
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
@@ -19,11 +19,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
/**
|
||||
This routine is used to enumerate entire pci bus system
|
||||
in a given platform
|
||||
in a given platform.
|
||||
|
||||
@param Controller Parent controller handle
|
||||
@param Controller Parent controller handle.
|
||||
|
||||
@return Status of enumerating
|
||||
@return Status of enumerating.
|
||||
**/
|
||||
EFI_STATUS
|
||||
PciEnumerator (
|
||||
@@ -128,11 +128,11 @@ PciEnumerator (
|
||||
/**
|
||||
Enumerate PCI root bridge
|
||||
|
||||
@param PciResAlloc Pointer to protocol instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL
|
||||
@param RootBridgeDev Instance of root bridge device
|
||||
@param PciResAlloc Pointer to protocol instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.
|
||||
@param RootBridgeDev Instance of root bridge device.
|
||||
|
||||
@retval EFI_SUCCESS Success to enumerate root bridge
|
||||
@retval Others Fail to enumerate root bridge
|
||||
@retval EFI_SUCCESS Success to enumerate root bridge.
|
||||
@retval Others Fail to enumerate root bridge.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -256,7 +256,7 @@ ProcessOptionRom (
|
||||
// Go through bridges to reach all devices
|
||||
//
|
||||
CurrentLink = Bridge->ChildList.ForwardLink;
|
||||
while (CurrentLink && CurrentLink != &Bridge->ChildList) {
|
||||
while (CurrentLink != NULL && CurrentLink != &Bridge->ChildList) {
|
||||
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);
|
||||
if (!IsListEmpty (&Temp->ChildList)) {
|
||||
|
||||
@@ -283,11 +283,11 @@ ProcessOptionRom (
|
||||
/**
|
||||
This routine is used to assign bus number to the given PCI bus system
|
||||
|
||||
@param Bridge Parent root bridge instance
|
||||
@param StartBusNumber Number of beginning
|
||||
@param SubBusNumber the number of sub bus
|
||||
@param Bridge Parent root bridge instance.
|
||||
@param StartBusNumber Number of beginning.
|
||||
@param SubBusNumber the number of sub bus.
|
||||
|
||||
@retval EFI_SUCCESS Success to assign bus number
|
||||
@retval EFI_SUCCESS Success to assign bus number.
|
||||
**/
|
||||
EFI_STATUS
|
||||
PciAssignBusNumber (
|
||||
@@ -462,11 +462,11 @@ DetermineRootBridgeAttributes (
|
||||
// Currently we hardcoded for ea815
|
||||
//
|
||||
|
||||
if (Attributes & EFI_PCI_HOST_BRIDGE_COMBINE_MEM_PMEM) {
|
||||
if ((Attributes & EFI_PCI_HOST_BRIDGE_COMBINE_MEM_PMEM) != 0) {
|
||||
RootBridgeDev->Decodes |= EFI_BRIDGE_PMEM_MEM_COMBINE_SUPPORTED;
|
||||
}
|
||||
|
||||
if (Attributes & EFI_PCI_HOST_BRIDGE_MEM64_DECODE) {
|
||||
if ((Attributes & EFI_PCI_HOST_BRIDGE_MEM64_DECODE) != 0) {
|
||||
RootBridgeDev->Decodes |= EFI_BRIDGE_PMEM64_DECODE_SUPPORTED;
|
||||
}
|
||||
|
||||
@@ -480,8 +480,8 @@ DetermineRootBridgeAttributes (
|
||||
/**
|
||||
Get Max Option Rom size on this bridge
|
||||
|
||||
@param Bridge Bridge device instance
|
||||
@return Max size of option rom
|
||||
@param Bridge Bridge device instance.
|
||||
@return Max size of option rom.
|
||||
**/
|
||||
UINT64
|
||||
GetMaxOptionRomSize (
|
||||
@@ -499,7 +499,7 @@ GetMaxOptionRomSize (
|
||||
// Go through bridges to reach all devices
|
||||
//
|
||||
CurrentLink = Bridge->ChildList.ForwardLink;
|
||||
while (CurrentLink && CurrentLink != &Bridge->ChildList) {
|
||||
while (CurrentLink != NULL && CurrentLink != &Bridge->ChildList) {
|
||||
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);
|
||||
if (!IsListEmpty (&Temp->ChildList)) {
|
||||
|
||||
@@ -540,11 +540,11 @@ GetMaxOptionRomSize (
|
||||
/**
|
||||
Process attributes of devices on this host bridge
|
||||
|
||||
@param PciResAlloc Protocol instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL
|
||||
@param PciResAlloc Protocol instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.
|
||||
|
||||
@retval EFI_NOT_FOUND Can not find the specific root bridge device
|
||||
@retval EFI_SUCCESS Success Process attribute
|
||||
@retval Others Can not determine the root bridge device's attribute
|
||||
@retval EFI_NOT_FOUND Can not find the specific root bridge device.
|
||||
@retval EFI_SUCCESS Success Process attribute.
|
||||
@retval Others Can not determine the root bridge device's attribute.
|
||||
**/
|
||||
EFI_STATUS
|
||||
PciHostBridgeDeviceAttribute (
|
||||
@@ -667,10 +667,10 @@ GetResourceAllocationStatus (
|
||||
/**
|
||||
Remove a PCI device from device pool and mark its bar
|
||||
|
||||
@param PciDevice Instance of Pci device
|
||||
@param PciDevice Instance of Pci device.
|
||||
|
||||
@retval EFI_SUCCESS Success Operation
|
||||
@retval EFI_ABORTED Pci device is a root bridge
|
||||
@retval EFI_SUCCESS Success Operation.
|
||||
@retval EFI_ABORTED Pci device is a root bridge.
|
||||
**/
|
||||
EFI_STATUS
|
||||
RejectPciDevice (
|
||||
@@ -685,7 +685,7 @@ RejectPciDevice (
|
||||
// Remove the padding resource from a bridge
|
||||
//
|
||||
if ( IS_PCI_BRIDGE(&PciDevice->Pci) && \
|
||||
PciDevice->ResourcePaddingDescriptors ) {
|
||||
PciDevice->ResourcePaddingDescriptors != NULL ) {
|
||||
gBS->FreePool (PciDevice->ResourcePaddingDescriptors);
|
||||
PciDevice->ResourcePaddingDescriptors = NULL;
|
||||
return EFI_SUCCESS;
|
||||
@@ -694,7 +694,7 @@ RejectPciDevice (
|
||||
//
|
||||
// Skip RB and PPB
|
||||
//
|
||||
if (IS_PCI_BRIDGE (&PciDevice->Pci) || (!PciDevice->Parent)) {
|
||||
if (IS_PCI_BRIDGE (&PciDevice->Pci) || (PciDevice->Parent == NULL)) {
|
||||
return EFI_ABORTED;
|
||||
}
|
||||
|
||||
@@ -703,7 +703,7 @@ RejectPciDevice (
|
||||
// Get the root bridge device
|
||||
//
|
||||
Bridge = PciDevice;
|
||||
while (Bridge->Parent) {
|
||||
while (Bridge->Parent != NULL) {
|
||||
Bridge = Bridge->Parent;
|
||||
}
|
||||
|
||||
@@ -720,7 +720,7 @@ RejectPciDevice (
|
||||
//
|
||||
Bridge = PciDevice->Parent;
|
||||
CurrentLink = Bridge->ChildList.ForwardLink;
|
||||
while (CurrentLink && CurrentLink != &Bridge->ChildList) {
|
||||
while (CurrentLink != NULL && CurrentLink != &Bridge->ChildList) {
|
||||
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);
|
||||
if (Temp == PciDevice) {
|
||||
InitializePciDevice (Temp);
|
||||
@@ -736,11 +736,11 @@ RejectPciDevice (
|
||||
}
|
||||
|
||||
/**
|
||||
Determine whethter a PCI device can be rejected
|
||||
Determine whethter a PCI device can be rejected.
|
||||
|
||||
@param PciResNode Pointer to Pci resource node instance
|
||||
@param PciResNode Pointer to Pci resource node instance.
|
||||
|
||||
@return whethter a PCI device can be rejected
|
||||
@return whethter a PCI device can be rejected.
|
||||
**/
|
||||
BOOLEAN
|
||||
IsRejectiveDevice (
|
||||
@@ -754,21 +754,21 @@ IsRejectiveDevice (
|
||||
//
|
||||
// Ensure the device is present
|
||||
//
|
||||
if (!Temp) {
|
||||
if (Temp == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//
|
||||
// PPB and RB should go ahead
|
||||
//
|
||||
if (IS_PCI_BRIDGE (&Temp->Pci) || (!Temp->Parent)) {
|
||||
if (IS_PCI_BRIDGE (&Temp->Pci) || (Temp->Parent == NULL)) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//
|
||||
// Skip device on Bus0
|
||||
//
|
||||
if ((Temp->Parent) && (Temp->BusNumber == 0)) {
|
||||
if ((Temp->Parent != NULL) && (Temp->BusNumber == 0)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -796,17 +796,17 @@ GetLargerConsumerDevice (
|
||||
IN PCI_RESOURCE_NODE *PciResNode2
|
||||
)
|
||||
{
|
||||
if (!PciResNode2) {
|
||||
if (PciResNode2 == NULL) {
|
||||
return PciResNode1;
|
||||
}
|
||||
|
||||
if ((IS_PCI_BRIDGE(&(PciResNode2->PciDev->Pci)) || !(PciResNode2->PciDev->Parent)) \
|
||||
if ((IS_PCI_BRIDGE(&(PciResNode2->PciDev->Pci)) || (PciResNode2->PciDev->Parent == NULL)) \
|
||||
&& (PciResNode2->ResourceUsage != PciResUsagePadding) )
|
||||
{
|
||||
return PciResNode1;
|
||||
}
|
||||
|
||||
if (!PciResNode1) {
|
||||
if (PciResNode1 == NULL) {
|
||||
return PciResNode2;
|
||||
}
|
||||
|
||||
@@ -820,11 +820,11 @@ GetLargerConsumerDevice (
|
||||
|
||||
|
||||
/**
|
||||
Get the max resource consumer in the host resource pool
|
||||
Get the max resource consumer in the host resource pool.
|
||||
|
||||
@param ResPool Pointer to resource pool node
|
||||
@param ResPool Pointer to resource pool node.
|
||||
|
||||
@return the max resource consumer in the host resource pool
|
||||
@return the max resource consumer in the host resource pool.
|
||||
**/
|
||||
PCI_RESOURCE_NODE *
|
||||
GetMaxResourceConsumerDevice (
|
||||
@@ -839,7 +839,7 @@ GetMaxResourceConsumerDevice (
|
||||
PciResNode = NULL;
|
||||
|
||||
CurrentLink = ResPool->ChildList.ForwardLink;
|
||||
while (CurrentLink && CurrentLink != &ResPool->ChildList) {
|
||||
while (CurrentLink != NULL && CurrentLink != &ResPool->ChildList) {
|
||||
|
||||
Temp = RESOURCE_NODE_FROM_LINK (CurrentLink);
|
||||
|
||||
@@ -848,7 +848,7 @@ GetMaxResourceConsumerDevice (
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((IS_PCI_BRIDGE (&(Temp->PciDev->Pci)) || (!Temp->PciDev->Parent)) \
|
||||
if ((IS_PCI_BRIDGE (&(Temp->PciDev->Pci)) || (Temp->PciDev->Parent == NULL)) \
|
||||
&& (Temp->ResourceUsage != PciResUsagePadding))
|
||||
{
|
||||
PPBResNode = GetMaxResourceConsumerDevice (Temp);
|
||||
@@ -866,16 +866,16 @@ GetMaxResourceConsumerDevice (
|
||||
/**
|
||||
Adjust host bridge allocation so as to reduce resource requirement
|
||||
|
||||
@param IoPool Pointer to instance of I/O resource Node
|
||||
@param Mem32Pool Pointer to instance of 32-bit memory resource Node
|
||||
@param PMem32Pool Pointer to instance of 32-bit Pmemory resource node
|
||||
@param Mem64Pool Pointer to instance of 64-bit memory resource node
|
||||
@param PMem64Pool Pointer to instance of 64-bit Pmemory resource node
|
||||
@param IoResStatus Status of I/O resource Node
|
||||
@param Mem32ResStatus Status of 32-bit memory resource Node
|
||||
@param PMem32ResStatus Status of 32-bit Pmemory resource node
|
||||
@param Mem64ResStatus Status of 64-bit memory resource node
|
||||
@param PMem64ResStatus Status of 64-bit Pmemory resource node
|
||||
@param IoPool Pointer to instance of I/O resource Node.
|
||||
@param Mem32Pool Pointer to instance of 32-bit memory resource Node.
|
||||
@param PMem32Pool Pointer to instance of 32-bit Pmemory resource node.
|
||||
@param Mem64Pool Pointer to instance of 64-bit memory resource node.
|
||||
@param PMem64Pool Pointer to instance of 64-bit Pmemory resource node.
|
||||
@param IoResStatus Status of I/O resource Node.
|
||||
@param Mem32ResStatus Status of 32-bit memory resource Node.
|
||||
@param PMem32ResStatus Status of 32-bit Pmemory resource node.
|
||||
@param Mem64ResStatus Status of 64-bit memory resource node.
|
||||
@param PMem64ResStatus Status of 64-bit Pmemory resource node.
|
||||
**/
|
||||
EFI_STATUS
|
||||
PciHostBridgeAdjustAllocation (
|
||||
@@ -937,7 +937,7 @@ PciHostBridgeAdjustAllocation (
|
||||
// Hostbridge hasn't enough resource
|
||||
//
|
||||
PciResNode = GetMaxResourceConsumerDevice (ResPool[ResType]);
|
||||
if (!PciResNode) {
|
||||
if (PciResNode == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1091,7 +1091,7 @@ ConstructAcpiResourceRequestor (
|
||||
//
|
||||
// Deal with io aperture
|
||||
//
|
||||
if (Aperture & 0x01) {
|
||||
if ((Aperture & 0x01) != 0) {
|
||||
Ptr->Desc = ACPI_ADDRESS_SPACE_DESCRIPTOR;
|
||||
Ptr->Len = sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) - 3;
|
||||
//
|
||||
@@ -1110,7 +1110,7 @@ ConstructAcpiResourceRequestor (
|
||||
//
|
||||
// Deal with mem32 aperture
|
||||
//
|
||||
if (Aperture & 0x02) {
|
||||
if ((Aperture & 0x02) != 0) {
|
||||
Ptr->Desc = ACPI_ADDRESS_SPACE_DESCRIPTOR;
|
||||
Ptr->Len = sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) - 3;
|
||||
//
|
||||
@@ -1134,7 +1134,7 @@ ConstructAcpiResourceRequestor (
|
||||
//
|
||||
// Deal with Pmem32 aperture
|
||||
//
|
||||
if (Aperture & 0x04) {
|
||||
if ((Aperture & 0x04) != 0) {
|
||||
Ptr->Desc = ACPI_ADDRESS_SPACE_DESCRIPTOR;
|
||||
Ptr->Len = sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) - 3;
|
||||
//
|
||||
@@ -1157,7 +1157,7 @@ ConstructAcpiResourceRequestor (
|
||||
//
|
||||
// Deal with mem64 aperture
|
||||
//
|
||||
if (Aperture & 0x08) {
|
||||
if ((Aperture & 0x08) != 0) {
|
||||
Ptr->Desc = ACPI_ADDRESS_SPACE_DESCRIPTOR;
|
||||
Ptr->Len = sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) - 3;
|
||||
//
|
||||
@@ -1180,7 +1180,7 @@ ConstructAcpiResourceRequestor (
|
||||
//
|
||||
// Deal with Pmem64 aperture
|
||||
//
|
||||
if (Aperture & 0x10) {
|
||||
if ((Aperture & 0x10) != 0) {
|
||||
Ptr->Desc = ACPI_ADDRESS_SPACE_DESCRIPTOR;
|
||||
Ptr->Len = sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) - 3;
|
||||
//
|
||||
@@ -1238,13 +1238,13 @@ ConstructAcpiResourceRequestor (
|
||||
Get resource base from a acpi configuration descriptor.
|
||||
|
||||
@param pConfig an acpi configuration descriptor.
|
||||
@param IoBase output of I/O resource base address
|
||||
@param Mem32Base output of 32-bit memory base address
|
||||
@param PMem32Base output of 32-bit pmemory base address
|
||||
@param Mem64Base output of 64-bit memory base address
|
||||
@param PMem64Base output of 64-bit pmemory base address
|
||||
@param IoBase output of I/O resource base address.
|
||||
@param Mem32Base output of 32-bit memory base address.
|
||||
@param PMem32Base output of 32-bit pmemory base address.
|
||||
@param Mem64Base output of 64-bit memory base address.
|
||||
@param PMem64Base output of 64-bit pmemory base address.
|
||||
|
||||
@return EFI_SUCCESS Success operation
|
||||
@return EFI_SUCCESS Success operation.
|
||||
**/
|
||||
EFI_STATUS
|
||||
GetResourceBase (
|
||||
@@ -1331,10 +1331,10 @@ GetResourceBase (
|
||||
Enumerate pci bridge, allocate resource and determine attribute
|
||||
for devices on this bridge
|
||||
|
||||
@param BridgeDev Pointer to instance of bridge device
|
||||
@param BridgeDev Pointer to instance of bridge device.
|
||||
|
||||
@retval EFI_SUCCESS Success operation
|
||||
@retval Others Fail to enumerate
|
||||
@retval EFI_SUCCESS Success operation.
|
||||
@retval Others Fail to enumerate.
|
||||
**/
|
||||
EFI_STATUS
|
||||
PciBridgeEnumerator (
|
||||
@@ -1390,10 +1390,10 @@ PciBridgeEnumerator (
|
||||
/**
|
||||
Allocate all kinds of resource for bridge
|
||||
|
||||
@param Bridge Pointer to bridge instance
|
||||
@param Bridge Pointer to bridge instance.
|
||||
|
||||
@retval EFI_SUCCESS Success operation.
|
||||
@retval Others Fail to allocate resource for bridge
|
||||
@retval Others Fail to allocate resource for bridge.
|
||||
**/
|
||||
EFI_STATUS
|
||||
PciBridgeResourceAllocator (
|
||||
@@ -1544,14 +1544,14 @@ PciBridgeResourceAllocator (
|
||||
/**
|
||||
Get resource base address for a pci bridge device
|
||||
|
||||
@param Bridge Given Pci driver instance
|
||||
@param IoBase output for base address of I/O type resource
|
||||
@param Mem32Base output for base address of 32-bit memory type resource
|
||||
@param PMem32Base output for base address of 32-bit Pmemory type resource
|
||||
@param Mem64Base output for base address of 64-bit memory type resource
|
||||
@param PMem64Base output for base address of 64-bit Pmemory type resource
|
||||
@param Bridge Given Pci driver instance.
|
||||
@param IoBase output for base address of I/O type resource.
|
||||
@param Mem32Base output for base address of 32-bit memory type resource.
|
||||
@param PMem32Base output for base address of 32-bit Pmemory type resource.
|
||||
@param Mem64Base output for base address of 64-bit memory type resource.
|
||||
@param PMem64Base output for base address of 64-bit Pmemory type resource.
|
||||
|
||||
@retval EFI_SUCCESS Succes to get resource base address
|
||||
@retval EFI_SUCCESS Succes to get resource base address.
|
||||
**/
|
||||
EFI_STATUS
|
||||
GetResourceBaseFromBridge (
|
||||
@@ -1575,19 +1575,19 @@ GetResourceBaseFromBridge (
|
||||
|
||||
if (IS_PCI_BRIDGE (&Bridge->Pci)) {
|
||||
|
||||
if (Bridge->PciBar[PPB_IO_RANGE].Length) {
|
||||
if (Bridge->PciBar[PPB_IO_RANGE].Length > 0) {
|
||||
*IoBase = Bridge->PciBar[PPB_IO_RANGE].BaseAddress;
|
||||
}
|
||||
|
||||
if (Bridge->PciBar[PPB_MEM32_RANGE].Length) {
|
||||
if (Bridge->PciBar[PPB_MEM32_RANGE].Length > 0) {
|
||||
*Mem32Base = Bridge->PciBar[PPB_MEM32_RANGE].BaseAddress;
|
||||
}
|
||||
|
||||
if (Bridge->PciBar[PPB_PMEM32_RANGE].Length) {
|
||||
if (Bridge->PciBar[PPB_PMEM32_RANGE].Length > 0) {
|
||||
*PMem32Base = Bridge->PciBar[PPB_PMEM32_RANGE].BaseAddress;
|
||||
}
|
||||
|
||||
if (Bridge->PciBar[PPB_PMEM64_RANGE].Length) {
|
||||
if (Bridge->PciBar[PPB_PMEM64_RANGE].Length > 0) {
|
||||
*PMem64Base = Bridge->PciBar[PPB_PMEM64_RANGE].BaseAddress;
|
||||
} else {
|
||||
*PMem64Base = gAllOne;
|
||||
@@ -1596,15 +1596,15 @@ GetResourceBaseFromBridge (
|
||||
}
|
||||
|
||||
if (IS_CARDBUS_BRIDGE (&Bridge->Pci)) {
|
||||
if (Bridge->PciBar[P2C_IO_1].Length) {
|
||||
if (Bridge->PciBar[P2C_IO_1].Length > 0) {
|
||||
*IoBase = Bridge->PciBar[P2C_IO_1].BaseAddress;
|
||||
} else {
|
||||
if (Bridge->PciBar[P2C_IO_2].Length) {
|
||||
if (Bridge->PciBar[P2C_IO_2].Length > 0) {
|
||||
*IoBase = Bridge->PciBar[P2C_IO_2].BaseAddress;
|
||||
}
|
||||
}
|
||||
|
||||
if (Bridge->PciBar[P2C_MEM_1].Length) {
|
||||
if (Bridge->PciBar[P2C_MEM_1].Length > 0) {
|
||||
if (Bridge->PciBar[P2C_MEM_1].BarType == PciBarTypePMem32) {
|
||||
*PMem32Base = Bridge->PciBar[P2C_MEM_1].BaseAddress;
|
||||
}
|
||||
@@ -1614,7 +1614,7 @@ GetResourceBaseFromBridge (
|
||||
}
|
||||
}
|
||||
|
||||
if (Bridge->PciBar[P2C_MEM_2].Length) {
|
||||
if (Bridge->PciBar[P2C_MEM_2].Length > 0) {
|
||||
if (Bridge->PciBar[P2C_MEM_2].BarType == PciBarTypePMem32) {
|
||||
*PMem32Base = Bridge->PciBar[P2C_MEM_2].BaseAddress;
|
||||
}
|
||||
@@ -1673,7 +1673,7 @@ GetResourceBaseFromBridge (
|
||||
required here. This notification can be used to perform any chipsetspecific
|
||||
programming.
|
||||
|
||||
@param[in] This The instance pointer of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL
|
||||
@param[in] PciResAlloc The instance pointer of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL
|
||||
@param[in] Phase The phase during enumeration
|
||||
|
||||
@retval EFI_NOT_READY This phase cannot be entered at this time. For example, this error
|
||||
@@ -1822,7 +1822,7 @@ PreprocessController (
|
||||
//
|
||||
// Get Root Brige Handle
|
||||
//
|
||||
while (Bridge->Parent) {
|
||||
while (Bridge->Parent != NULL) {
|
||||
Bridge = Bridge->Parent;
|
||||
}
|
||||
|
||||
@@ -1882,8 +1882,8 @@ PreprocessController (
|
||||
@param NumberOfChildren - A the number of child handle in the ChildHandleBuffer.
|
||||
@param ChildHandleBuffer - A pointer to the array contain the child handle.
|
||||
|
||||
@retval EFI_NOT_FOUND Can not find bridge according to controller handle
|
||||
@retval EFI_SUCCESS Success operating
|
||||
@retval EFI_NOT_FOUND Can not find bridge according to controller handle.
|
||||
@retval EFI_SUCCESS Success operating.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -1922,7 +1922,7 @@ PciHotPlugRequestNotify (
|
||||
// Get root bridge handle
|
||||
//
|
||||
Temp = Bridge;
|
||||
while (Temp->Parent) {
|
||||
while (Temp->Parent != NULL) {
|
||||
Temp = Temp->Parent;
|
||||
}
|
||||
|
||||
@@ -2029,7 +2029,7 @@ SearchHostBridgeHandle (
|
||||
/**
|
||||
Add host bridge handle to global variable for enumating.
|
||||
|
||||
@param HostBridgeHandle host bridge handle
|
||||
@param HostBridgeHandle host bridge handle.
|
||||
**/
|
||||
EFI_STATUS
|
||||
AddHostBridgeEnumerator (
|
||||
@@ -2038,7 +2038,7 @@ AddHostBridgeEnumerator (
|
||||
{
|
||||
UINTN Index;
|
||||
|
||||
if (!HostBridgeHandle) {
|
||||
if (HostBridgeHandle == NULL) {
|
||||
return EFI_ABORTED;
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/**@file
|
||||
/** @file
|
||||
Header file declares all logic function for PCI bus enumeration.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
@@ -22,9 +22,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
This routine is used to enumerate entire pci bus system
|
||||
in a given platform
|
||||
|
||||
@param Controller Parent controller handle
|
||||
@param Controller Parent controller handle.
|
||||
|
||||
@return Status of enumerating
|
||||
@return Status of enumerating.
|
||||
**/
|
||||
EFI_STATUS
|
||||
PciEnumerator (
|
||||
@@ -35,10 +35,10 @@ PciEnumerator (
|
||||
Enumerate PCI root bridge
|
||||
|
||||
@param PciResAlloc Pointer to protocol instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL
|
||||
@param RootBridgeDev Instance of root bridge device
|
||||
@param RootBridgeDev Instance of root bridge device.
|
||||
|
||||
@retval EFI_SUCCESS Success to enumerate root bridge
|
||||
@retval Others Fail to enumerate root bridge
|
||||
@retval EFI_SUCCESS Success to enumerate root bridge.
|
||||
@retval Others Fail to enumerate root bridge.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -50,9 +50,9 @@ PciRootBridgeEnumerator (
|
||||
/**
|
||||
This routine is used to process option rom on a certain root bridge
|
||||
|
||||
@param Bridge Given parent's root bridge
|
||||
@param RomBase Base address of ROM driver loaded from
|
||||
@param MaxLength Max rom size
|
||||
@param Bridge Given parent's root bridge.
|
||||
@param RomBase Base address of ROM driver loaded from.
|
||||
@param MaxLength Max rom size.
|
||||
|
||||
@retval EFI_SUCCESS Success to process option rom image.
|
||||
**/
|
||||
@@ -66,11 +66,11 @@ ProcessOptionRom (
|
||||
/**
|
||||
This routine is used to assign bus number to the given PCI bus system
|
||||
|
||||
@param Bridge Parent root bridge instance
|
||||
@param StartBusNumber Number of beginning
|
||||
@param SubBusNumber the number of sub bus
|
||||
@param Bridge Parent root bridge instance.
|
||||
@param StartBusNumber Number of beginning.
|
||||
@param SubBusNumber the number of sub bus.
|
||||
|
||||
@retval EFI_SUCCESS Success to assign bus number
|
||||
@retval EFI_SUCCESS Success to assign bus number.
|
||||
**/
|
||||
EFI_STATUS
|
||||
PciAssignBusNumber (
|
||||
@@ -83,11 +83,11 @@ PciAssignBusNumber (
|
||||
This routine is used to determine the root bridge attribute by interfacing
|
||||
the host bridge resource allocation protocol.
|
||||
|
||||
@param PciResAlloc Protocol instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL
|
||||
@param RootBridgeDev Root bridge instance
|
||||
@param PciResAlloc Protocol instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.
|
||||
@param RootBridgeDev Root bridge instance.
|
||||
|
||||
@retval EFI_SUCCESS Success to get root bridge's attribute
|
||||
@retval Others Fail to get attribute
|
||||
@retval EFI_SUCCESS Success to get root bridge's attribute.
|
||||
@retval Others Fail to get attribute.
|
||||
**/
|
||||
EFI_STATUS
|
||||
DetermineRootBridgeAttributes (
|
||||
@@ -98,8 +98,8 @@ DetermineRootBridgeAttributes (
|
||||
/**
|
||||
Get Max Option Rom size on this bridge
|
||||
|
||||
@param Bridge Bridge device instance
|
||||
@return Max size of option rom
|
||||
@param Bridge Bridge device instance.
|
||||
@return Max size of option rom.
|
||||
**/
|
||||
UINT64
|
||||
GetMaxOptionRomSize (
|
||||
@@ -111,9 +111,9 @@ GetMaxOptionRomSize (
|
||||
|
||||
@param PciResAlloc Protocol instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL
|
||||
|
||||
@retval EFI_NOT_FOUND Can not find the specific root bridge device
|
||||
@retval EFI_SUCCESS Success Process attribute
|
||||
@retval Others Can not determine the root bridge device's attribute
|
||||
@retval EFI_NOT_FOUND Can not find the specific root bridge device.
|
||||
@retval EFI_SUCCESS Success Process attribute.
|
||||
@retval Others Can not determine the root bridge device's attribute.
|
||||
**/
|
||||
EFI_STATUS
|
||||
PciHostBridgeDeviceAttribute (
|
||||
@@ -123,12 +123,12 @@ PciHostBridgeDeviceAttribute (
|
||||
/**
|
||||
Get resource allocation status from the ACPI pointer
|
||||
|
||||
@param AcpiConfig Point to Acpi configuration table
|
||||
@param IoResStatus Return the status of I/O resource
|
||||
@param Mem32ResStatus Return the status of 32-bit Memory resource
|
||||
@param PMem32ResStatus Return the status of 32-bit PMemory resource
|
||||
@param Mem64ResStatus Return the status of 64-bit Memory resource
|
||||
@param PMem64ResStatus Return the status of 64-bit PMemory resource
|
||||
@param AcpiConfig Point to Acpi configuration table.
|
||||
@param IoResStatus Return the status of I/O resource.
|
||||
@param Mem32ResStatus Return the status of 32-bit Memory resource.
|
||||
@param PMem32ResStatus Return the status of 32-bit PMemory resource.
|
||||
@param Mem64ResStatus Return the status of 64-bit Memory resource.
|
||||
@param PMem64ResStatus Return the status of 64-bit PMemory resource.
|
||||
|
||||
@retval EFI_SUCCESS Success to get resource allocation status from ACPI configuration table.
|
||||
**/
|
||||
@@ -145,10 +145,10 @@ GetResourceAllocationStatus (
|
||||
/**
|
||||
Remove a PCI device from device pool and mark its bar
|
||||
|
||||
@param PciDevice Instance of Pci device
|
||||
@param PciDevice Instance of Pci device.
|
||||
|
||||
@retval EFI_SUCCESS Success Operation
|
||||
@retval EFI_ABORTED Pci device is a root bridge
|
||||
@retval EFI_SUCCESS Success Operation.
|
||||
@retval EFI_ABORTED Pci device is a root bridge.
|
||||
**/
|
||||
EFI_STATUS
|
||||
RejectPciDevice (
|
||||
@@ -158,9 +158,9 @@ RejectPciDevice (
|
||||
/**
|
||||
Determine whethter a PCI device can be rejected
|
||||
|
||||
@param PciResNode Pointer to Pci resource node instance
|
||||
@param PciResNode Pointer to Pci resource node instance.
|
||||
|
||||
@return whethter a PCI device can be rejected
|
||||
@return whethter a PCI device can be rejected.
|
||||
**/
|
||||
BOOLEAN
|
||||
IsRejectiveDevice (
|
||||
@@ -170,8 +170,8 @@ IsRejectiveDevice (
|
||||
/**
|
||||
Compare two resource node and get the larger resource consumer
|
||||
|
||||
@param PciResNode1 resource node 1 want to be compared
|
||||
@param PciResNode2 resource node 2 want to be compared
|
||||
@param PciResNode1 resource node 1 want to be compared.
|
||||
@param PciResNode2 resource node 2 want to be compared.
|
||||
|
||||
@return Larger resource consumer.
|
||||
**/
|
||||
@@ -184,9 +184,9 @@ GetLargerConsumerDevice (
|
||||
/**
|
||||
Get the max resource consumer in the host resource pool
|
||||
|
||||
@param ResPool Pointer to resource pool node
|
||||
@param ResPool Pointer to resource pool node.
|
||||
|
||||
@return the max resource consumer in the host resource pool
|
||||
@return the max resource consumer in the host resource pool.
|
||||
**/
|
||||
PCI_RESOURCE_NODE *
|
||||
GetMaxResourceConsumerDevice (
|
||||
@@ -196,16 +196,16 @@ GetMaxResourceConsumerDevice (
|
||||
/**
|
||||
Adjust host bridge allocation so as to reduce resource requirement
|
||||
|
||||
@param IoPool Pointer to instance of I/O resource Node
|
||||
@param Mem32Pool Pointer to instance of 32-bit memory resource Node
|
||||
@param PMem32Pool Pointer to instance of 32-bit Pmemory resource node
|
||||
@param Mem64Pool Pointer to instance of 64-bit memory resource node
|
||||
@param PMem64Pool Pointer to instance of 64-bit Pmemory resource node
|
||||
@param IoResStatus Status of I/O resource Node
|
||||
@param Mem32ResStatus Status of 32-bit memory resource Node
|
||||
@param PMem32ResStatus Status of 32-bit Pmemory resource node
|
||||
@param Mem64ResStatus Status of 64-bit memory resource node
|
||||
@param PMem64ResStatus Status of 64-bit Pmemory resource node
|
||||
@param IoPool Pointer to instance of I/O resource Node.
|
||||
@param Mem32Pool Pointer to instance of 32-bit memory resource Node.
|
||||
@param PMem32Pool Pointer to instance of 32-bit Pmemory resource node.
|
||||
@param Mem64Pool Pointer to instance of 64-bit memory resource node.
|
||||
@param PMem64Pool Pointer to instance of 64-bit Pmemory resource node.
|
||||
@param IoResStatus Status of I/O resource Node.
|
||||
@param Mem32ResStatus Status of 32-bit memory resource Node.
|
||||
@param PMem32ResStatus Status of 32-bit Pmemory resource node.
|
||||
@param Mem64ResStatus Status of 64-bit memory resource node.
|
||||
@param PMem64ResStatus Status of 64-bit Pmemory resource node.
|
||||
**/
|
||||
EFI_STATUS
|
||||
PciHostBridgeAdjustAllocation (
|
||||
@@ -225,13 +225,13 @@ PciHostBridgeAdjustAllocation (
|
||||
Summary requests for all resource type, and contruct ACPI resource
|
||||
requestor instance.
|
||||
|
||||
@param Bridge detecting bridge
|
||||
@param IoNode Pointer to instance of I/O resource Node
|
||||
@param Mem32Node Pointer to instance of 32-bit memory resource Node
|
||||
@param PMem32Node Pointer to instance of 32-bit Pmemory resource node
|
||||
@param Mem64Node Pointer to instance of 64-bit memory resource node
|
||||
@param PMem64Node Pointer to instance of 64-bit Pmemory resource node
|
||||
@param pConfig outof buffer holding new constructed APCI resource requestor
|
||||
@param Bridge detecting bridge.
|
||||
@param IoNode Pointer to instance of I/O resource Node.
|
||||
@param Mem32Node Pointer to instance of 32-bit memory resource Node.
|
||||
@param PMem32Node Pointer to instance of 32-bit Pmemory resource node.
|
||||
@param Mem64Node Pointer to instance of 64-bit memory resource node.
|
||||
@param PMem64Node Pointer to instance of 64-bit Pmemory resource node.
|
||||
@param pConfig outof buffer holding new constructed APCI resource requestor.
|
||||
**/
|
||||
EFI_STATUS
|
||||
ConstructAcpiResourceRequestor (
|
||||
@@ -248,13 +248,13 @@ ConstructAcpiResourceRequestor (
|
||||
Get resource base from a acpi configuration descriptor.
|
||||
|
||||
@param pConfig an acpi configuration descriptor.
|
||||
@param IoBase output of I/O resource base address
|
||||
@param Mem32Base output of 32-bit memory base address
|
||||
@param PMem32Base output of 32-bit pmemory base address
|
||||
@param Mem64Base output of 64-bit memory base address
|
||||
@param PMem64Base output of 64-bit pmemory base address
|
||||
@param IoBase output of I/O resource base address.
|
||||
@param Mem32Base output of 32-bit memory base address.
|
||||
@param PMem32Base output of 32-bit pmemory base address.
|
||||
@param Mem64Base output of 64-bit memory base address.
|
||||
@param PMem64Base output of 64-bit pmemory base address.
|
||||
|
||||
@return EFI_SUCCESS Success operation
|
||||
@return EFI_SUCCESS Success operation.
|
||||
**/
|
||||
EFI_STATUS
|
||||
GetResourceBase (
|
||||
@@ -270,10 +270,10 @@ GetResourceBase (
|
||||
Enumerate pci bridge, allocate resource and determine attribute
|
||||
for devices on this bridge
|
||||
|
||||
@param BridgeDev Pointer to instance of bridge device
|
||||
@param BridgeDev Pointer to instance of bridge device.
|
||||
|
||||
@retval EFI_SUCCESS Success operation
|
||||
@retval Others Fail to enumerate
|
||||
@retval EFI_SUCCESS Success operation.
|
||||
@retval Others Fail to enumerate.
|
||||
**/
|
||||
EFI_STATUS
|
||||
PciBridgeEnumerator (
|
||||
@@ -283,10 +283,10 @@ PciBridgeEnumerator (
|
||||
/**
|
||||
Allocate all kinds of resource for bridge
|
||||
|
||||
@param Bridge Pointer to bridge instance
|
||||
@param Bridge Pointer to bridge instance.
|
||||
|
||||
@retval EFI_SUCCESS Success operation.
|
||||
@retval Others Fail to allocate resource for bridge
|
||||
@retval Others Fail to allocate resource for bridge.
|
||||
**/
|
||||
EFI_STATUS
|
||||
PciBridgeResourceAllocator (
|
||||
@@ -296,14 +296,14 @@ PciBridgeResourceAllocator (
|
||||
/**
|
||||
Get resource base address for a pci bridge device
|
||||
|
||||
@param Bridge Given Pci driver instance
|
||||
@param IoBase output for base address of I/O type resource
|
||||
@param Mem32Base output for base address of 32-bit memory type resource
|
||||
@param PMem32Base output for base address of 32-bit Pmemory type resource
|
||||
@param Mem64Base output for base address of 64-bit memory type resource
|
||||
@param PMem64Base output for base address of 64-bit Pmemory type resource
|
||||
@param Bridge Given Pci driver instance.
|
||||
@param IoBase output for base address of I/O type resource.
|
||||
@param Mem32Base output for base address of 32-bit memory type resource.
|
||||
@param PMem32Base output for base address of 32-bit Pmemory type resource.
|
||||
@param Mem64Base output for base address of 64-bit memory type resource.
|
||||
@param PMem64Base output for base address of 64-bit Pmemory type resource.
|
||||
|
||||
@retval EFI_SUCCESS Succes to get resource base address
|
||||
@retval EFI_SUCCESS Succes to get resource base address.
|
||||
**/
|
||||
EFI_STATUS
|
||||
GetResourceBaseFromBridge (
|
||||
@@ -318,10 +318,10 @@ GetResourceBaseFromBridge (
|
||||
/**
|
||||
Process Option Rom on this host bridge
|
||||
|
||||
@param PciResAlloc Pointer to instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL
|
||||
@param PciResAlloc Pointer to instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.
|
||||
|
||||
@retval EFI_NOT_FOUND Can not find the root bridge instance
|
||||
@retval EFI_SUCCESS Success process
|
||||
@retval EFI_NOT_FOUND Can not find the root bridge instance.
|
||||
@retval EFI_SUCCESS Success process.
|
||||
**/
|
||||
EFI_STATUS
|
||||
PciHostBridgeP2CProcess (
|
||||
@@ -373,7 +373,7 @@ PciHostBridgeP2CProcess (
|
||||
required here. This notification can be used to perform any chipsetspecific
|
||||
programming.
|
||||
|
||||
@param[in] This The instance pointer of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL
|
||||
@param[in] PciResAlloc The instance pointer of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL
|
||||
@param[in] Phase The phase during enumeration
|
||||
|
||||
@retval EFI_NOT_READY This phase cannot be entered at this time. For example, this error
|
||||
@@ -438,12 +438,12 @@ PreprocessController (
|
||||
@param This - A pointer to the hot plug request protocol.
|
||||
@param Operation - The operation.
|
||||
@param Controller - A pointer to the controller.
|
||||
@param RemainningDevicePath - A pointer to the device path.
|
||||
@param RemainingDevicePath - A pointer to the device path.
|
||||
@param NumberOfChildren - A the number of child handle in the ChildHandleBuffer.
|
||||
@param ChildHandleBuffer - A pointer to the array contain the child handle.
|
||||
|
||||
@retval EFI_NOT_FOUND Can not find bridge according to controller handle
|
||||
@retval EFI_SUCCESS Success operating
|
||||
@retval EFI_NOT_FOUND Can not find bridge according to controller handle.
|
||||
@retval EFI_SUCCESS Success operating.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -459,7 +459,7 @@ PciHotPlugRequestNotify (
|
||||
/**
|
||||
Search hostbridge according to given handle
|
||||
|
||||
@return whether found
|
||||
@return whether found.
|
||||
**/
|
||||
BOOLEAN
|
||||
SearchHostBridgeHandle (
|
||||
@@ -469,7 +469,7 @@ SearchHostBridgeHandle (
|
||||
/**
|
||||
Add host bridge handle to global variable for enumating.
|
||||
|
||||
@param HostBridgeHandle host bridge handle
|
||||
@param HostBridgeHandle host bridge handle.
|
||||
**/
|
||||
EFI_STATUS
|
||||
AddHostBridgeEnumerator (
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/**@file
|
||||
/**@ file
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
@@ -20,13 +20,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
/**
|
||||
This routine is used to check whether the pci device is present.
|
||||
|
||||
@param PciRootBridgeIo Pointer to instance of EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL
|
||||
@param Pci Output buffer for PCI device structure
|
||||
@param Bus PCI bus NO
|
||||
@param Device PCI device NO
|
||||
@param Func PCI Func NO
|
||||
@param PciRootBridgeIo Pointer to instance of EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.
|
||||
@param Pci Output buffer for PCI device structure.
|
||||
@param Bus PCI bus NO.
|
||||
@param Device PCI device NO.
|
||||
@param Func PCI Func NO.
|
||||
|
||||
@retval EFI_NOT_FOUND device not present
|
||||
@retval EFI_NOT_FOUND device not present.
|
||||
@retval EFI_SUCCESS device is found.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -84,8 +84,8 @@ PciDevicePresent (
|
||||
A database that records all the information about pci device subject to this
|
||||
root bridge will then be created.
|
||||
|
||||
@param Bridge Parent bridge instance
|
||||
@param StartBusNumer Bus number of begining
|
||||
@param Bridge Parent bridge instance.
|
||||
@param StartBusNumer Bus number of begining.
|
||||
**/
|
||||
EFI_STATUS
|
||||
PciPciDeviceInfoCollector (
|
||||
@@ -190,12 +190,12 @@ PciPciDeviceInfoCollector (
|
||||
/**
|
||||
Seach required device and get PCI device info block
|
||||
|
||||
@param Bridge Parent bridge instance
|
||||
@param Pci Output of PCI device info block
|
||||
@param Bridge Parent bridge instance.
|
||||
@param Pci Output of PCI device info block.
|
||||
@param Bus PCI bus NO.
|
||||
@param Device PCI device NO.
|
||||
@param Func PCI func NO.
|
||||
@param PciDevice output of searched PCI device instance
|
||||
@param PciDevice output of searched PCI device instance.
|
||||
**/
|
||||
EFI_STATUS
|
||||
PciSearchDevice (
|
||||
@@ -260,7 +260,7 @@ PciSearchDevice (
|
||||
}
|
||||
}
|
||||
|
||||
if (!PciIoDevice) {
|
||||
if (PciIoDevice == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@ PciSearchDevice (
|
||||
/**
|
||||
Create PCI private data for PCI device
|
||||
|
||||
@param Bridge Parent bridge instance
|
||||
@param Bridge Parent bridge instance.
|
||||
@param Pci PCI bar block
|
||||
@param Bus PCI device Bus NO.
|
||||
@param Device PCI device DeviceNO.
|
||||
@@ -338,7 +338,7 @@ GatherDeviceInfo (
|
||||
Func
|
||||
);
|
||||
|
||||
if (!PciIoDevice) {
|
||||
if (PciIoDevice == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -378,7 +378,7 @@ GatherDeviceInfo (
|
||||
@param Device Bridge device's device NO.
|
||||
@param Func Bridge device's func NO.
|
||||
|
||||
@return bridge device instance
|
||||
@return bridge device instance.
|
||||
**/
|
||||
PCI_IO_DEVICE *
|
||||
GatherPpbInfo (
|
||||
@@ -405,7 +405,7 @@ GatherPpbInfo (
|
||||
Func
|
||||
);
|
||||
|
||||
if (!PciIoDevice) {
|
||||
if (PciIoDevice == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -447,8 +447,8 @@ GatherPpbInfo (
|
||||
PciIoRead (PciIo, EfiPciIoWidthUint8, 0x1C, 1, &Value);
|
||||
PciIoWrite (PciIo, EfiPciIoWidthUint8, 0x1C, 1, &Temp);
|
||||
|
||||
if (Value) {
|
||||
if (Value & 0x01) {
|
||||
if (Value != 0) {
|
||||
if ((Value & 0x01) != 0) {
|
||||
PciIoDevice->Decodes |= EFI_BRIDGE_IO32_DECODE_SUPPORTED;
|
||||
} else {
|
||||
PciIoDevice->Decodes |= EFI_BRIDGE_IO16_DECODE_SUPPORTED;
|
||||
@@ -501,7 +501,7 @@ GatherPpbInfo (
|
||||
@param Device hotplug bridge device's device NO.
|
||||
@param Func hotplug bridge device's Func NO.
|
||||
|
||||
@return hotplug bridge device instance
|
||||
@return hotplug bridge device instance.
|
||||
**/
|
||||
PCI_IO_DEVICE *
|
||||
GatherP2CInfo (
|
||||
@@ -524,7 +524,7 @@ GatherP2CInfo (
|
||||
Func
|
||||
);
|
||||
|
||||
if (!PciIoDevice) {
|
||||
if (PciIoDevice == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -564,8 +564,8 @@ GatherP2CInfo (
|
||||
/**
|
||||
Create device path for pci deivce
|
||||
|
||||
@param ParentDevicePath Parent bridge's path
|
||||
@param PciIoDevice Pci device instance
|
||||
@param ParentDevicePath Parent bridge's path.
|
||||
@param PciIoDevice Pci device instance.
|
||||
|
||||
@return device path protocol instance for specific pci device.
|
||||
**/
|
||||
@@ -662,13 +662,13 @@ BarExisted (
|
||||
/**
|
||||
Test whether the device can support attributes
|
||||
|
||||
@param PciIoDevice Pci device instance
|
||||
@param PciIoDevice Pci device instance.
|
||||
@param Command Command register value.
|
||||
@param BridgeControl Bridge control value for PPB or P2C.
|
||||
@param OldCommand Old command register offset
|
||||
@param OldCommand Old command register offset.
|
||||
@param OldBridgeControl Old Bridge control value for PPB or P2C.
|
||||
|
||||
@return EFI_SUCCESS
|
||||
@return EFI_SUCCESS.
|
||||
**/
|
||||
EFI_STATUS
|
||||
PciTestSupportedAttribute (
|
||||
@@ -758,33 +758,33 @@ PciSetDeviceAttribute (
|
||||
|
||||
Attributes = 0;
|
||||
|
||||
if (Command & EFI_PCI_COMMAND_IO_SPACE) {
|
||||
if ((Command & EFI_PCI_COMMAND_IO_SPACE) != 0) {
|
||||
Attributes |= EFI_PCI_IO_ATTRIBUTE_IO;
|
||||
}
|
||||
|
||||
if (Command & EFI_PCI_COMMAND_MEMORY_SPACE) {
|
||||
if ((Command & EFI_PCI_COMMAND_MEMORY_SPACE) != 0) {
|
||||
Attributes |= EFI_PCI_IO_ATTRIBUTE_MEMORY;
|
||||
}
|
||||
|
||||
if (Command & EFI_PCI_COMMAND_BUS_MASTER) {
|
||||
if ((Command & EFI_PCI_COMMAND_BUS_MASTER) != 0) {
|
||||
Attributes |= EFI_PCI_IO_ATTRIBUTE_BUS_MASTER;
|
||||
}
|
||||
|
||||
if (Command & EFI_PCI_COMMAND_VGA_PALETTE_SNOOP) {
|
||||
if ((Command & EFI_PCI_COMMAND_VGA_PALETTE_SNOOP) != 0) {
|
||||
Attributes |= EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO;
|
||||
}
|
||||
|
||||
if (BridgeControl & EFI_PCI_BRIDGE_CONTROL_ISA) {
|
||||
if ((BridgeControl & EFI_PCI_BRIDGE_CONTROL_ISA) != 0) {
|
||||
Attributes |= EFI_PCI_IO_ATTRIBUTE_ISA_IO;
|
||||
}
|
||||
|
||||
if (BridgeControl & EFI_PCI_BRIDGE_CONTROL_VGA) {
|
||||
if ((BridgeControl & EFI_PCI_BRIDGE_CONTROL_VGA) != 0) {
|
||||
Attributes |= EFI_PCI_IO_ATTRIBUTE_VGA_IO;
|
||||
Attributes |= EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY;
|
||||
Attributes |= EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO;
|
||||
}
|
||||
|
||||
if (BridgeControl & EFI_PCI_BRIDGE_CONTROL_VGA_16) {
|
||||
if ((BridgeControl & EFI_PCI_BRIDGE_CONTROL_VGA_16) != 0) {
|
||||
Attributes |= EFI_PCI_IO_ATTRIBUTE_VGA_IO_16;
|
||||
Attributes |= EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16;
|
||||
}
|
||||
@@ -798,7 +798,7 @@ PciSetDeviceAttribute (
|
||||
EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM |
|
||||
EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE;
|
||||
|
||||
if (Attributes & EFI_PCI_IO_ATTRIBUTE_IO) {
|
||||
if ((Attributes & EFI_PCI_IO_ATTRIBUTE_IO) != 0) {
|
||||
Attributes |= EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO;
|
||||
Attributes |= EFI_PCI_IO_ATTRIBUTE_ISA_IO;
|
||||
}
|
||||
@@ -835,10 +835,10 @@ PciSetDeviceAttribute (
|
||||
}
|
||||
|
||||
/**
|
||||
Determine if the device can support Fast Back to Back attribute
|
||||
Determine if the device can support Fast Back to Back attribute.
|
||||
|
||||
@param PciIoDevice Pci device instance
|
||||
@param StatusIndex Status register value
|
||||
@param PciIoDevice Pci device instance.
|
||||
@param StatusIndex Status register value.
|
||||
**/
|
||||
EFI_STATUS
|
||||
GetFastBackToBackSupport (
|
||||
@@ -862,7 +862,7 @@ GetFastBackToBackSupport (
|
||||
//
|
||||
// Check the Fast B2B bit
|
||||
//
|
||||
if (StatusRegister & EFI_PCI_FAST_BACK_TO_BACK_CAPABLE) {
|
||||
if ((StatusRegister & EFI_PCI_FAST_BACK_TO_BACK_CAPABLE) != 0) {
|
||||
return EFI_SUCCESS;
|
||||
} else {
|
||||
return EFI_UNSUPPORTED;
|
||||
@@ -874,7 +874,7 @@ GetFastBackToBackSupport (
|
||||
Process the option ROM for all the children of the specified parent PCI device.
|
||||
It can only be used after the first full Option ROM process.
|
||||
|
||||
@param PciIoDevice Pci device instance
|
||||
@param PciIoDevice Pci device instance.
|
||||
|
||||
@retval EFI_SUCCESS Success Operation.
|
||||
**/
|
||||
@@ -890,7 +890,7 @@ ProcessOptionRomLight (
|
||||
// For RootBridge, PPB , P2C, go recursively to traverse all its children
|
||||
//
|
||||
CurrentLink = PciIoDevice->ChildList.ForwardLink;
|
||||
while (CurrentLink && CurrentLink != &PciIoDevice->ChildList) {
|
||||
while (CurrentLink != NULL && CurrentLink != &PciIoDevice->ChildList) {
|
||||
|
||||
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);
|
||||
|
||||
@@ -914,7 +914,7 @@ ProcessOptionRomLight (
|
||||
/**
|
||||
Determine the related attributes of all devices under a Root Bridge
|
||||
|
||||
@param PciIoDevice PCI device instance
|
||||
@param PciIoDevice PCI device instance.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -940,7 +940,7 @@ DetermineDeviceAttribute (
|
||||
// For Root Bridge, just copy it by RootBridgeIo proctocol
|
||||
// so as to keep consistent with the actual attribute
|
||||
//
|
||||
if (!PciIoDevice->Parent) {
|
||||
if (PciIoDevice->Parent == NULL) {
|
||||
Status = PciIoDevice->PciRootBridgeIo->GetAttributes (
|
||||
PciIoDevice->PciRootBridgeIo,
|
||||
&PciIoDevice->Supports,
|
||||
@@ -1029,7 +1029,7 @@ DetermineDeviceAttribute (
|
||||
// For RootBridge, PPB , P2C, go recursively to traverse all its children
|
||||
//
|
||||
CurrentLink = PciIoDevice->ChildList.ForwardLink;
|
||||
while (CurrentLink && CurrentLink != &PciIoDevice->ChildList) {
|
||||
while (CurrentLink != NULL && CurrentLink != &PciIoDevice->ChildList) {
|
||||
|
||||
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);
|
||||
Status = DetermineDeviceAttribute (Temp);
|
||||
@@ -1064,7 +1064,7 @@ DetermineDeviceAttribute (
|
||||
}
|
||||
|
||||
CurrentLink = PciIoDevice->ChildList.ForwardLink;
|
||||
while (CurrentLink && CurrentLink != &PciIoDevice->ChildList) {
|
||||
while (CurrentLink != NULL && CurrentLink != &PciIoDevice->ChildList) {
|
||||
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);
|
||||
if (FastB2BSupport) {
|
||||
PciEnableCommandRegister (Temp, EFI_PCI_COMMAND_FAST_BACK_TO_BACK);
|
||||
@@ -1084,8 +1084,8 @@ DetermineDeviceAttribute (
|
||||
/**
|
||||
This routine is used to update the bar information for those incompatible PCI device
|
||||
|
||||
@param PciIoDevice Pci device instance
|
||||
@return EFI_UNSUPPORTED failed to update Pci Info
|
||||
@param PciIoDevice Pci device instance.
|
||||
@return EFI_UNSUPPORTED failed to update Pci Info.
|
||||
**/
|
||||
EFI_STATUS
|
||||
UpdatePciInfo (
|
||||
@@ -1232,8 +1232,8 @@ UpdatePciInfo (
|
||||
/**
|
||||
This routine will update the alignment with the new alignment
|
||||
|
||||
@param Alignment old alignment
|
||||
@param NewAlignment new alignment
|
||||
@param Alignment old alignment.
|
||||
@param NewAlignment new alignment.
|
||||
|
||||
**/
|
||||
VOID
|
||||
@@ -1277,15 +1277,15 @@ SetNewAlign (
|
||||
// Adjust the alignment to even, quad or double quad boundary
|
||||
//
|
||||
if (NewAlignment == PCI_BAR_EVEN_ALIGN) {
|
||||
if (OldAlignment & 0x01) {
|
||||
if ((OldAlignment & 0x01) != 0) {
|
||||
OldAlignment = OldAlignment + 2 - (OldAlignment & 0x01);
|
||||
}
|
||||
} else if (NewAlignment == PCI_BAR_SQUAD_ALIGN) {
|
||||
if (OldAlignment & 0x03) {
|
||||
if ((OldAlignment & 0x03) != 0) {
|
||||
OldAlignment = OldAlignment + 4 - (OldAlignment & 0x03);
|
||||
}
|
||||
} else if (NewAlignment == PCI_BAR_DQUAD_ALIGN) {
|
||||
if (OldAlignment & 0x07) {
|
||||
if ((OldAlignment & 0x07) != 0) {
|
||||
OldAlignment = OldAlignment + 8 - (OldAlignment & 0x07);
|
||||
}
|
||||
}
|
||||
@@ -1302,9 +1302,9 @@ SetNewAlign (
|
||||
/**
|
||||
Parse PCI bar bit.
|
||||
|
||||
@param PciIoDevice Pci device instance
|
||||
@param Offset bar offset
|
||||
@param BarIndex bar index
|
||||
@param PciIoDevice Pci device instance.
|
||||
@param Offset bar offset.
|
||||
@param BarIndex bar index.
|
||||
|
||||
@return next bar offset.
|
||||
**/
|
||||
@@ -1345,13 +1345,13 @@ PciParseBar (
|
||||
}
|
||||
|
||||
PciIoDevice->PciBar[BarIndex].Offset = (UINT8) Offset;
|
||||
if (Value & 0x01) {
|
||||
if ((Value & 0x01) != 0) {
|
||||
//
|
||||
// Device I/Os
|
||||
//
|
||||
Mask = 0xfffffffc;
|
||||
|
||||
if (Value & 0xFFFF0000) {
|
||||
if ((Value & 0xFFFF0000) != 0) {
|
||||
//
|
||||
// It is a IO32 bar
|
||||
//
|
||||
@@ -1391,7 +1391,7 @@ PciParseBar (
|
||||
//memory space; anywhere in 32 bit address space
|
||||
//
|
||||
case 0x00:
|
||||
if (Value & 0x08) {
|
||||
if ((Value & 0x08) != 0) {
|
||||
PciIoDevice->PciBar[BarIndex].BarType = PciBarTypePMem32;
|
||||
} else {
|
||||
PciIoDevice->PciBar[BarIndex].BarType = PciBarTypeMem32;
|
||||
@@ -1406,7 +1406,7 @@ PciParseBar (
|
||||
// memory space; anywhere in 64 bit address space
|
||||
//
|
||||
case 0x04:
|
||||
if (Value & 0x08) {
|
||||
if ((Value & 0x08) != 0) {
|
||||
PciIoDevice->PciBar[BarIndex].BarType = PciBarTypePMem64;
|
||||
} else {
|
||||
PciIoDevice->PciBar[BarIndex].BarType = PciBarTypeMem64;
|
||||
@@ -1487,10 +1487,10 @@ PciParseBar (
|
||||
}
|
||||
|
||||
/**
|
||||
This routine is used to initialize the bar of a PCI device
|
||||
It can be called typically when a device is going to be rejected
|
||||
This routine is used to initialize the bar of a PCI device.
|
||||
It can be called typically when a device is going to be rejected.
|
||||
|
||||
@param PciIoDevice Pci device instance
|
||||
@param PciIoDevice Pci device instance.
|
||||
**/
|
||||
EFI_STATUS
|
||||
InitializePciDevice (
|
||||
@@ -1517,7 +1517,7 @@ InitializePciDevice (
|
||||
/**
|
||||
Init PPB for bridge device
|
||||
|
||||
@param PciIoDevice Pci device instance
|
||||
@param PciIoDevice Pci device instance.
|
||||
**/
|
||||
EFI_STATUS
|
||||
InitializePpb (
|
||||
@@ -1562,7 +1562,7 @@ InitializePpb (
|
||||
/**
|
||||
Init private data for Hotplug bridge device
|
||||
|
||||
@param PciIoDevice hotplug bridge device
|
||||
@param PciIoDevice hotplug bridge device.
|
||||
**/
|
||||
EFI_STATUS
|
||||
InitializeP2C (
|
||||
@@ -1601,13 +1601,13 @@ InitializeP2C (
|
||||
Create and initiliaze general PCI I/O device instance for
|
||||
PCI device/bridge device/hotplug bridge device.
|
||||
|
||||
@param PciRootBridgeIo Pointer to instance of EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL
|
||||
@param Pci Pci bar block
|
||||
@param PciRootBridgeIo Pointer to instance of EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.
|
||||
@param Pci Pci bar block.
|
||||
@param Bus device Bus NO.
|
||||
@param Device device device NO.
|
||||
@param Func device func NO.
|
||||
|
||||
@return instance of PCI device
|
||||
@return instance of PCI device.
|
||||
**/
|
||||
PCI_IO_DEVICE *
|
||||
CreatePciIoDevice (
|
||||
@@ -1695,7 +1695,7 @@ CreatePciIoDevice (
|
||||
in a given platform
|
||||
It is only called on the second start on the same Root Bridge.
|
||||
|
||||
@param Controller Parent bridge handler
|
||||
@param Controller Parent bridge handler.
|
||||
|
||||
@return status of operation.
|
||||
**/
|
||||
@@ -1751,7 +1751,7 @@ PciEnumeratorLight (
|
||||
//
|
||||
RootBridgeDev = CreateRootBridge (Controller);
|
||||
|
||||
if (!RootBridgeDev) {
|
||||
if (RootBridgeDev == NULL) {
|
||||
Descriptors++;
|
||||
continue;
|
||||
}
|
||||
@@ -1887,10 +1887,10 @@ StartManagingRootBridge (
|
||||
/**
|
||||
This routine can be used to check whether a PCI device should be rejected when light enumeration
|
||||
|
||||
@param PciIoDevice Pci device instance
|
||||
@param PciIoDevice Pci device instance.
|
||||
|
||||
@retval TRUE This device should be rejected
|
||||
@retval FALSE This device shouldn't be rejected
|
||||
@retval TRUE This device should be rejected.
|
||||
@retval FALSE This device shouldn't be rejected.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
@@ -1944,7 +1944,7 @@ IsPciDeviceRejected (
|
||||
continue;
|
||||
}
|
||||
|
||||
if (TestValue & 0x01) {
|
||||
if ((TestValue & 0x01) != 0) {
|
||||
|
||||
//
|
||||
// IO Bar
|
||||
@@ -2001,8 +2001,8 @@ IsPciDeviceRejected (
|
||||
/**
|
||||
Reset and all bus number from specific bridge.
|
||||
|
||||
@param Bridge Parent specific bridge
|
||||
@param StartBusNumber start bus number
|
||||
@param Bridge Parent specific bridge.
|
||||
@param StartBusNumber start bus number.
|
||||
**/
|
||||
EFI_STATUS
|
||||
ResetAllPpbBusNumber (
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/**@file
|
||||
/**@ file
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
@@ -99,7 +99,7 @@ GatherDeviceInfo (
|
||||
@param Device Bridge device's device NO.
|
||||
@param Func Bridge device's func NO.
|
||||
|
||||
@return bridge device instance
|
||||
@return bridge device instance.
|
||||
**/
|
||||
PCI_IO_DEVICE *
|
||||
GatherPpbInfo (
|
||||
@@ -133,8 +133,8 @@ GatherP2CInfo (
|
||||
/**
|
||||
Create device path for pci deivce
|
||||
|
||||
@param ParentDevicePath Parent bridge's path
|
||||
@param PciIoDevice Pci device instance
|
||||
@param ParentDevicePath Parent bridge's path.
|
||||
@param PciIoDevice Pci device instance.
|
||||
|
||||
@return device path protocol instance for specific pci device.
|
||||
**/
|
||||
@@ -173,7 +173,7 @@ BarExisted (
|
||||
@param OldCommand Old command register offset
|
||||
@param OldBridgeControl Old Bridge control value for PPB or P2C.
|
||||
|
||||
@return EFI_SUCCESS
|
||||
@return EFI_SUCCESS.
|
||||
**/
|
||||
EFI_STATUS
|
||||
PciTestSupportedAttribute (
|
||||
@@ -204,8 +204,8 @@ PciSetDeviceAttribute (
|
||||
/**
|
||||
Determine if the device can support Fast Back to Back attribute
|
||||
|
||||
@param PciIoDevice Pci device instance
|
||||
@param StatusIndex Status register value
|
||||
@param PciIoDevice Pci device instance.
|
||||
@param StatusIndex Status register value.
|
||||
**/
|
||||
EFI_STATUS
|
||||
GetFastBackToBackSupport (
|
||||
@@ -216,7 +216,7 @@ GetFastBackToBackSupport (
|
||||
/**
|
||||
Determine the related attributes of all devices under a Root Bridge
|
||||
|
||||
@param PciIoDevice PCI device instance
|
||||
@param PciIoDevice PCI device instance.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -227,8 +227,8 @@ DetermineDeviceAttribute (
|
||||
/**
|
||||
This routine is used to update the bar information for those incompatible PCI device
|
||||
|
||||
@param PciIoDevice Pci device instance
|
||||
@return EFI_UNSUPPORTED failed to update Pci Info
|
||||
@param PciIoDevice Pci device instance.
|
||||
@return EFI_UNSUPPORTED failed to update Pci Info.
|
||||
**/
|
||||
EFI_STATUS
|
||||
UpdatePciInfo (
|
||||
@@ -238,8 +238,8 @@ UpdatePciInfo (
|
||||
/**
|
||||
This routine will update the alignment with the new alignment
|
||||
|
||||
@param Alignment old alignment
|
||||
@param NewAlignment new alignment
|
||||
@param Alignment old alignment.
|
||||
@param NewAlignment new alignment.
|
||||
|
||||
**/
|
||||
VOID
|
||||
@@ -251,9 +251,9 @@ SetNewAlign (
|
||||
/**
|
||||
Parse PCI bar bit.
|
||||
|
||||
@param PciIoDevice Pci device instance
|
||||
@param Offset bar offset
|
||||
@param BarIndex bar index
|
||||
@param PciIoDevice Pci device instance.
|
||||
@param Offset bar offset.
|
||||
@param BarIndex bar index.
|
||||
|
||||
@return next bar offset.
|
||||
**/
|
||||
@@ -266,9 +266,9 @@ PciParseBar (
|
||||
|
||||
/**
|
||||
This routine is used to initialize the bar of a PCI device
|
||||
It can be called typically when a device is going to be rejected
|
||||
It can be called typically when a device is going to be rejected.
|
||||
|
||||
@param PciIoDevice Pci device instance
|
||||
@param PciIoDevice Pci device instance.
|
||||
**/
|
||||
EFI_STATUS
|
||||
InitializePciDevice (
|
||||
@@ -278,7 +278,7 @@ InitializePciDevice (
|
||||
/**
|
||||
Init PPB for bridge device
|
||||
|
||||
@param PciIoDevice Pci device instance
|
||||
@param PciIoDevice Pci device instance.
|
||||
**/
|
||||
EFI_STATUS
|
||||
InitializePpb (
|
||||
@@ -288,7 +288,7 @@ InitializePpb (
|
||||
/**
|
||||
Init private data for Hotplug bridge device
|
||||
|
||||
@param PciIoDevice hotplug bridge device
|
||||
@param PciIoDevice hotplug bridge device.
|
||||
**/
|
||||
EFI_STATUS
|
||||
InitializeP2C (
|
||||
@@ -299,13 +299,13 @@ InitializeP2C (
|
||||
Create and initiliaze general PCI I/O device instance for
|
||||
PCI device/bridge device/hotplug bridge device.
|
||||
|
||||
@param PciRootBridgeIo Pointer to instance of EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL
|
||||
@param PciRootBridgeIo Pointer to instance of EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.
|
||||
@param Pci Pci bar block
|
||||
@param Bus device Bus NO.
|
||||
@param Device device device NO.
|
||||
@param Func device func NO.
|
||||
|
||||
@return instance of PCI device
|
||||
@return instance of PCI device.
|
||||
**/
|
||||
PCI_IO_DEVICE *
|
||||
CreatePciIoDevice (
|
||||
@@ -321,7 +321,7 @@ CreatePciIoDevice (
|
||||
in a given platform
|
||||
It is only called on the second start on the same Root Bridge.
|
||||
|
||||
@param Controller Parent bridge handler
|
||||
@param Controller Parent bridge handler.
|
||||
|
||||
@return status of operation.
|
||||
**/
|
||||
@@ -357,10 +357,10 @@ StartManagingRootBridge (
|
||||
/**
|
||||
This routine can be used to check whether a PCI device should be rejected when light enumeration
|
||||
|
||||
@param PciIoDevice Pci device instance
|
||||
@param PciIoDevice Pci device instance.
|
||||
|
||||
@retval TRUE This device should be rejected
|
||||
@retval FALSE This device shouldn't be rejected
|
||||
@retval TRUE This device should be rejected.
|
||||
@retval FALSE This device shouldn't be rejected.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/**@file
|
||||
/**@ file
|
||||
This module provide support function for hot plug device.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
@@ -44,11 +44,11 @@ PciHPCInitialized (
|
||||
/**
|
||||
Compare two device path
|
||||
|
||||
@param DevicePath1 the first device path want to be compared
|
||||
@param DevicePath2 the first device path want to be compared
|
||||
@param DevicePath1 the first device path want to be compared.
|
||||
@param DevicePath2 the first device path want to be compared.
|
||||
|
||||
@retval TRUE equal
|
||||
@retval FALSE different
|
||||
@retval TRUE equal.
|
||||
@retval FALSE different.
|
||||
**/
|
||||
BOOLEAN
|
||||
EfiCompareDevicePath (
|
||||
@@ -131,11 +131,11 @@ InitializeHotPlugSupport (
|
||||
/**
|
||||
Test whether device path is for root pci hot plug bus
|
||||
|
||||
@param HpbdevicePath tested device path
|
||||
@param HpbdevicePath tested device path.
|
||||
@param HpIndex Return the index of root hot plug in global array.
|
||||
|
||||
@retval TRUE device path is for root pci hot plug
|
||||
@retval FALSE device path is not for root pci hot plug
|
||||
@retval TRUE device path is for root pci hot plug.
|
||||
@retval FALSE device path is not for root pci hot plug.
|
||||
**/
|
||||
BOOLEAN
|
||||
IsRootPciHotPlugBus (
|
||||
@@ -163,11 +163,11 @@ IsRootPciHotPlugBus (
|
||||
/**
|
||||
Test whether device path is for root pci hot plug controller
|
||||
|
||||
@param HpbdevicePath tested device path
|
||||
@param HpbdevicePath tested device path.
|
||||
@param HpIndex Return the index of root hot plug in global array.
|
||||
|
||||
@retval TRUE device path is for root pci hot plug controller
|
||||
@retval FALSE device path is not for root pci hot plug controller
|
||||
@retval TRUE device path is for root pci hot plug controller.
|
||||
@retval FALSE device path is not for root pci hot plug controller.
|
||||
**/
|
||||
BOOLEAN
|
||||
IsRootPciHotPlugController (
|
||||
@@ -195,10 +195,10 @@ IsRootPciHotPlugController (
|
||||
/**
|
||||
Wrapper for creating event object for HPC
|
||||
|
||||
@param HpIndex index of hot plug device in global array
|
||||
@param Event event object
|
||||
@param HpIndex index of hot plug device in global array.
|
||||
@param Event event object.
|
||||
|
||||
@return status of create event invoken
|
||||
@return status of create event invoken.
|
||||
**/
|
||||
EFI_STATUS
|
||||
CreateEventForHpc (
|
||||
@@ -226,7 +226,7 @@ CreateEventForHpc (
|
||||
/**
|
||||
Wait for all root HPC initialized.
|
||||
|
||||
@param TimeoutInMicroSeconds microseconds to wait for all root hpc's initialization
|
||||
@param TimeoutInMicroSeconds microseconds to wait for all root hpc's initialization.
|
||||
**/
|
||||
EFI_STATUS
|
||||
AllRootHPCInitialized (
|
||||
@@ -257,7 +257,7 @@ AllRootHPCInitialized (
|
||||
|
||||
Delay--;
|
||||
|
||||
} while (Delay);
|
||||
} while (Delay > 0);
|
||||
|
||||
return EFI_TIMEOUT;
|
||||
}
|
||||
@@ -265,10 +265,10 @@ AllRootHPCInitialized (
|
||||
/**
|
||||
Check HPC capability register block
|
||||
|
||||
@param PciIoDevice PCI device instance
|
||||
@param PciIoDevice PCI device instance.
|
||||
|
||||
@retval EFI_SUCCESS PCI device is HPC
|
||||
@retval EFI_NOT_FOUND PCI device is not HPC
|
||||
@retval EFI_SUCCESS PCI device is HPC.
|
||||
@retval EFI_NOT_FOUND PCI device is not HPC.
|
||||
**/
|
||||
EFI_STATUS
|
||||
IsSHPC (
|
||||
@@ -279,7 +279,7 @@ IsSHPC (
|
||||
EFI_STATUS Status;
|
||||
UINT8 Offset;
|
||||
|
||||
if (!PciIoDevice) {
|
||||
if (PciIoDevice == NULL) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
@@ -352,7 +352,7 @@ Returns:
|
||||
return Status;
|
||||
}
|
||||
|
||||
if ((State & EFI_HPC_STATE_ENABLED) && (State & EFI_HPC_STATE_INITIALIZED)) {
|
||||
if ((State & EFI_HPC_STATE_ENABLED) != 0 && (State & EFI_HPC_STATE_INITIALIZED) != 0) {
|
||||
PciIoDevice->ResourcePaddingDescriptors = Descriptors;
|
||||
PciIoDevice->PaddingAttributes = Attributes;
|
||||
}
|
||||
@@ -366,10 +366,10 @@ Returns:
|
||||
/**
|
||||
Test whether PCI device is hot plug bus.
|
||||
|
||||
@param PciIoDevice PCI device instance
|
||||
@param PciIoDevice PCI device instance.
|
||||
|
||||
@retval EFI_SUCCESS PCI device is hot plug bus
|
||||
@retval EFI_NOT_FOUND PCI device is not hot plug bus
|
||||
@retval EFI_SUCCESS PCI device is hot plug bus.
|
||||
@retval EFI_NOT_FOUND PCI device is not hot plug bus.
|
||||
**/
|
||||
EFI_STATUS
|
||||
IsPciHotPlugBus (
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/**@file
|
||||
/**@ file
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
@@ -48,11 +48,11 @@ PciHPCInitialized (
|
||||
/**
|
||||
Compare two device path
|
||||
|
||||
@param DevicePath1 the first device path want to be compared
|
||||
@param DevicePath2 the first device path want to be compared
|
||||
@param DevicePath1 the first device path want to be compared.
|
||||
@param DevicePath2 the first device path want to be compared.
|
||||
|
||||
@retval TRUE equal
|
||||
@retval FALSE different
|
||||
@retval TRUE equal.
|
||||
@retval FALSE different.
|
||||
**/
|
||||
BOOLEAN
|
||||
EfiCompareDevicePath (
|
||||
@@ -72,10 +72,10 @@ InitializeHotPlugSupport (
|
||||
/**
|
||||
Test whether PCI device is hot plug bus.
|
||||
|
||||
@param PciIoDevice PCI device instance
|
||||
@param PciIoDevice PCI device instance.
|
||||
|
||||
@retval EFI_SUCCESS PCI device is hot plug bus
|
||||
@retval EFI_NOT_FOUND PCI device is not hot plug bus
|
||||
@retval EFI_SUCCESS PCI device is hot plug bus.
|
||||
@retval EFI_NOT_FOUND PCI device is not hot plug bus.
|
||||
**/
|
||||
EFI_STATUS
|
||||
IsPciHotPlugBus (
|
||||
@@ -85,7 +85,7 @@ IsPciHotPlugBus (
|
||||
/**
|
||||
Test whether device path is for root pci hot plug bus
|
||||
|
||||
@param HpbdevicePath tested device path
|
||||
@param HpbDevicePath tested device path
|
||||
@param HpIndex Return the index of root hot plug in global array.
|
||||
|
||||
@retval TRUE device path is for root pci hot plug
|
||||
@@ -100,11 +100,11 @@ IsRootPciHotPlugBus (
|
||||
/**
|
||||
Test whether device path is for root pci hot plug controller
|
||||
|
||||
@param HpbdevicePath tested device path
|
||||
@param HpcDevicePath tested device path.
|
||||
@param HpIndex Return the index of root hot plug in global array.
|
||||
|
||||
@retval TRUE device path is for root pci hot plug controller
|
||||
@retval FALSE device path is not for root pci hot plug controller
|
||||
@retval TRUE device path is for root pci hot plug controller.
|
||||
@retval FALSE device path is not for root pci hot plug controller.
|
||||
**/
|
||||
BOOLEAN
|
||||
IsRootPciHotPlugController (
|
||||
@@ -115,10 +115,10 @@ IsRootPciHotPlugController (
|
||||
/**
|
||||
Wrapper for creating event object for HPC
|
||||
|
||||
@param HpIndex index of hot plug device in global array
|
||||
@param Event event object
|
||||
@param HpIndex index of hot plug device in global array.
|
||||
@param Event event object.
|
||||
|
||||
@return status of create event invoken
|
||||
@return status of create event invoken.
|
||||
**/
|
||||
EFI_STATUS
|
||||
CreateEventForHpc (
|
||||
@@ -129,7 +129,7 @@ CreateEventForHpc (
|
||||
/**
|
||||
Wait for all root HPC initialized.
|
||||
|
||||
@param TimeoutInMicroSeconds microseconds to wait for all root hpc's initialization
|
||||
@param TimeoutInMicroSeconds microseconds to wait for all root hpc's initialization.
|
||||
**/
|
||||
EFI_STATUS
|
||||
AllRootHPCInitialized (
|
||||
@@ -139,10 +139,10 @@ AllRootHPCInitialized (
|
||||
/**
|
||||
Check HPC capability register block
|
||||
|
||||
@param PciIoDevice PCI device instance
|
||||
@param PciIoDevice PCI device instance.
|
||||
|
||||
@retval EFI_SUCCESS PCI device is HPC
|
||||
@retval EFI_NOT_FOUND PCI device is not HPC
|
||||
@retval EFI_SUCCESS PCI device is HPC.
|
||||
@retval EFI_NOT_FOUND PCI device is not HPC.
|
||||
**/
|
||||
EFI_STATUS
|
||||
IsSHPC (
|
||||
@@ -152,9 +152,9 @@ IsSHPC (
|
||||
/**
|
||||
Get resource padding for hot plug bus
|
||||
|
||||
@param PciIoDevice PCI device instance
|
||||
@param PciIoDevice PCI device instance.
|
||||
|
||||
@retval EFI_SUCCESS success get padding and set it into PCI device instance
|
||||
@retval EFI_SUCCESS success get padding and set it into PCI device instance.
|
||||
@retval EFI_NOT_FOUND PCI device is not a hot plug bus.
|
||||
**/
|
||||
EFI_STATUS
|
||||
|
@@ -831,7 +831,7 @@ PciIoMap (
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if (PciIoDevice->Attributes & EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE) {
|
||||
if ((PciIoDevice->Attributes & EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE) != 0) {
|
||||
Operation = (EFI_PCI_IO_PROTOCOL_OPERATION) (Operation + EfiPciOperationBusMasterRead64);
|
||||
}
|
||||
|
||||
@@ -919,14 +919,14 @@ PciIoAllocateBuffer (
|
||||
EFI_STATUS Status;
|
||||
PCI_IO_DEVICE *PciIoDevice;
|
||||
|
||||
if (Attributes &
|
||||
(~(EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE | EFI_PCI_ATTRIBUTE_MEMORY_CACHED))) {
|
||||
if ((Attributes &
|
||||
(~(EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE | EFI_PCI_ATTRIBUTE_MEMORY_CACHED))) != 0){
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);
|
||||
|
||||
if (PciIoDevice->Attributes & EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE) {
|
||||
if ((PciIoDevice->Attributes & EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE) != 0) {
|
||||
Attributes |= EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE;
|
||||
}
|
||||
|
||||
@@ -1146,7 +1146,7 @@ ModifyRootBridgeAttributes (
|
||||
//
|
||||
// Call the PCI Root Bridge to attempt to modify the attributes
|
||||
//
|
||||
if (NewPciRootBridgeAttributes ^ PciRootBridgeAttributes) {
|
||||
if ((NewPciRootBridgeAttributes ^ PciRootBridgeAttributes) != 0) {
|
||||
|
||||
Status = PciIoDevice->PciRootBridgeIo->SetAttributes (
|
||||
PciIoDevice->PciRootBridgeIo,
|
||||
@@ -1200,7 +1200,7 @@ SupportPaletteSnoopAttributes (
|
||||
//
|
||||
Temp = ActiveVGADeviceOnTheSameSegment (PciIoDevice);
|
||||
|
||||
if (!Temp) {
|
||||
if (Temp == NULL) {
|
||||
//
|
||||
// If there is no VGA device on the segement, set
|
||||
// this graphics card to decode the palette range
|
||||
@@ -1228,7 +1228,7 @@ SupportPaletteSnoopAttributes (
|
||||
// If they are on the same bus, either one can
|
||||
// be set to snoop, the other set to decode
|
||||
//
|
||||
if (VGACommand & EFI_PCI_COMMAND_VGA_PALETTE_SNOOP) {
|
||||
if ((VGACommand & EFI_PCI_COMMAND_VGA_PALETTE_SNOOP) != 0) {
|
||||
//
|
||||
// VGA has set to snoop, so GFX can be only set to disable snoop
|
||||
//
|
||||
@@ -1399,7 +1399,7 @@ PciIoAttributes (
|
||||
//
|
||||
// For Root Bridge, just call RootBridgeIo to set attributes;
|
||||
//
|
||||
if (!PciIoDevice->Parent) {
|
||||
if (PciIoDevice->Parent == NULL) {
|
||||
Status = ModifyRootBridgeAttributes (PciIoDevice, Attributes, Operation);
|
||||
return Status;
|
||||
}
|
||||
@@ -1410,14 +1410,14 @@ PciIoAttributes (
|
||||
//
|
||||
// Check VGA and VGA16, they can not be set at the same time
|
||||
//
|
||||
if (((Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_IO) &&
|
||||
(Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_IO_16)) ||
|
||||
((Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_IO) &&
|
||||
(Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16)) ||
|
||||
((Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO) &&
|
||||
(Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_IO_16)) ||
|
||||
((Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO) &&
|
||||
(Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16)) ) {
|
||||
if (((Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_IO) != 0 &&
|
||||
(Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_IO_16) != 0) ||
|
||||
((Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_IO) != 0 &&
|
||||
(Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16) != 0) ||
|
||||
((Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO) != 0 &&
|
||||
(Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_IO_16) != 0) ||
|
||||
((Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO) != 0 &&
|
||||
(Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16) != 0) ) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
@@ -1426,19 +1426,19 @@ PciIoAttributes (
|
||||
//
|
||||
if (IS_PCI_BRIDGE (&PciIoDevice->Pci) || IS_CARDBUS_BRIDGE (&PciIoDevice->Pci)) {
|
||||
|
||||
if (Attributes & (EFI_PCI_IO_ATTRIBUTE_VGA_IO | EFI_PCI_IO_ATTRIBUTE_VGA_IO_16)) {
|
||||
if ((Attributes & (EFI_PCI_IO_ATTRIBUTE_VGA_IO | EFI_PCI_IO_ATTRIBUTE_VGA_IO_16)) != 0) {
|
||||
BridgeControl |= EFI_PCI_BRIDGE_CONTROL_VGA;
|
||||
}
|
||||
|
||||
if (Attributes & EFI_PCI_IO_ATTRIBUTE_ISA_IO) {
|
||||
if ((Attributes & EFI_PCI_IO_ATTRIBUTE_ISA_IO) != 0) {
|
||||
BridgeControl |= EFI_PCI_BRIDGE_CONTROL_ISA;
|
||||
}
|
||||
|
||||
if (Attributes & (EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO | EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16)) {
|
||||
if ((Attributes & (EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO | EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16)) != 0) {
|
||||
Command |= EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO;
|
||||
}
|
||||
|
||||
if (Attributes & (EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16 | EFI_PCI_IO_ATTRIBUTE_VGA_IO_16)) {
|
||||
if ((Attributes & (EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16 | EFI_PCI_IO_ATTRIBUTE_VGA_IO_16)) != 0) {
|
||||
BridgeControl |= EFI_PCI_BRIDGE_CONTROL_VGA_16;
|
||||
}
|
||||
|
||||
@@ -1447,10 +1447,10 @@ PciIoAttributes (
|
||||
// Do with the attributes on VGA
|
||||
// Only for VGA's legacy resource, we just can enable once.
|
||||
//
|
||||
if (Attributes &
|
||||
if ((Attributes &
|
||||
(EFI_PCI_IO_ATTRIBUTE_VGA_IO |
|
||||
EFI_PCI_IO_ATTRIBUTE_VGA_IO_16 |
|
||||
EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY)) {
|
||||
EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY)) != 0) {
|
||||
//
|
||||
// Check if a VGA has been enabled before enabling a new one
|
||||
//
|
||||
@@ -1471,7 +1471,7 @@ PciIoAttributes (
|
||||
//
|
||||
// Do with the attributes on GFX
|
||||
//
|
||||
if (Attributes & (EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO | EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16)) {
|
||||
if ((Attributes & (EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO | EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16)) != 0) {
|
||||
|
||||
if (Operation == EfiPciIoAttributeOperationEnable) {
|
||||
//
|
||||
@@ -1501,15 +1501,15 @@ PciIoAttributes (
|
||||
}
|
||||
}
|
||||
|
||||
if (Attributes & EFI_PCI_IO_ATTRIBUTE_IO) {
|
||||
if ((Attributes & EFI_PCI_IO_ATTRIBUTE_IO) != 0) {
|
||||
Command |= EFI_PCI_COMMAND_IO_SPACE;
|
||||
}
|
||||
|
||||
if (Attributes & EFI_PCI_IO_ATTRIBUTE_MEMORY) {
|
||||
if ((Attributes & EFI_PCI_IO_ATTRIBUTE_MEMORY) != 0) {
|
||||
Command |= EFI_PCI_COMMAND_MEMORY_SPACE;
|
||||
}
|
||||
|
||||
if (Attributes & EFI_PCI_IO_ATTRIBUTE_BUS_MASTER) {
|
||||
if ((Attributes & EFI_PCI_IO_ATTRIBUTE_BUS_MASTER) != 0) {
|
||||
Command |= EFI_PCI_COMMAND_BUS_MASTER;
|
||||
}
|
||||
//
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/**@file
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
@@ -59,9 +59,9 @@ PciIoVerifyBarAccess (
|
||||
@param Count The number of memory or I/O operations to perform.
|
||||
@param Offset The offset within the PCI configuration space for the PCI controller.
|
||||
|
||||
@retval EFI_INVALID_PARAMETER Invalid Width
|
||||
@retval EFI_UNSUPPORTED Offset overflow
|
||||
@retval EFI_SUCCESS Success operation
|
||||
@retval EFI_INVALID_PARAMETER Invalid Width.
|
||||
@retval EFI_UNSUPPORTED Offset overflow.
|
||||
@retval EFI_SUCCESS Success operation.
|
||||
**/
|
||||
EFI_STATUS
|
||||
PciIoVerifyConfigAccess (
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/**@file
|
||||
/** @file
|
||||
|
||||
PCI Bus Driver Lib file
|
||||
It abstracts some functions that can be different
|
||||
@@ -217,7 +217,7 @@ RemoveRejectedPciDevices (
|
||||
|
||||
CurrentLink = Bridge->ChildList.ForwardLink;
|
||||
|
||||
while (CurrentLink && CurrentLink != &Bridge->ChildList) {
|
||||
while (CurrentLink != NULL && CurrentLink != &Bridge->ChildList) {
|
||||
|
||||
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);
|
||||
|
||||
@@ -650,7 +650,6 @@ PciHostBridgeResourceAllocator_WithoutHotPlugDeviceSupport (
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
**/
|
||||
|
||||
EFI_STATUS
|
||||
PciHostBridgeResourceAllocator_WithHotPlugDeviceSupport (
|
||||
IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc
|
||||
@@ -1605,8 +1604,8 @@ PciScanBus_WithHotPlugDeviceSupport (
|
||||
// Ensure the device is enabled and initialized
|
||||
//
|
||||
if ((Attributes == EfiPaddingPciRootBridge) &&
|
||||
(State & EFI_HPC_STATE_ENABLED) &&
|
||||
(State & EFI_HPC_STATE_INITIALIZED) ) {
|
||||
(State & EFI_HPC_STATE_ENABLED) != 0 &&
|
||||
(State & EFI_HPC_STATE_INITIALIZED) != 0) {
|
||||
*PaddedBusRange = (UINT8) ((UINT8) (BusRange) +*PaddedBusRange);
|
||||
} else {
|
||||
*SubBusNumber = (UINT8) ((UINT8) (BusRange) +*SubBusNumber);
|
||||
@@ -1662,13 +1661,13 @@ PciRootBridgeP2CProcess (
|
||||
|
||||
CurrentLink = Bridge->ChildList.ForwardLink;
|
||||
|
||||
while (CurrentLink && CurrentLink != &Bridge->ChildList) {
|
||||
while (CurrentLink != NULL && CurrentLink != &Bridge->ChildList) {
|
||||
|
||||
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);
|
||||
|
||||
if (IS_CARDBUS_BRIDGE (&Temp->Pci)) {
|
||||
|
||||
if (gPciHotPlugInit && Temp->Allocated) {
|
||||
if (gPciHotPlugInit != NULL && Temp->Allocated) {
|
||||
|
||||
//
|
||||
// Raise the EFI_IOB_PCI_HPC_INIT status code
|
||||
|
@@ -53,7 +53,7 @@ typedef struct {
|
||||
Install protocol gEfiPciHotPlugRequestProtocolGuid
|
||||
@param Status return status of protocol installation.
|
||||
**/
|
||||
void
|
||||
VOID
|
||||
InstallHotPlugRequestProtocol (
|
||||
IN EFI_STATUS *Status
|
||||
);
|
||||
|
@@ -215,7 +215,7 @@ CalculateApertureIo16 (
|
||||
|
||||
Aperture = 0;
|
||||
|
||||
if (!Bridge) {
|
||||
if (Bridge == NULL) {
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ CalculateApertureIo16 (
|
||||
//
|
||||
offset = Aperture & (Node->Alignment);
|
||||
|
||||
if (offset) {
|
||||
if (offset != 0) {
|
||||
|
||||
Aperture = Aperture + (Node->Alignment + 1) - offset;
|
||||
|
||||
@@ -257,7 +257,7 @@ CalculateApertureIo16 (
|
||||
Node->Length
|
||||
);
|
||||
offset = Aperture & (Node->Alignment);
|
||||
if (offset) {
|
||||
if (offset != 0) {
|
||||
Aperture = Aperture + (Node->Alignment + 1) - offset;
|
||||
}
|
||||
} else if (VGAEnable) {
|
||||
@@ -266,7 +266,7 @@ CalculateApertureIo16 (
|
||||
Node->Length
|
||||
);
|
||||
offset = Aperture & (Node->Alignment);
|
||||
if (offset) {
|
||||
if (offset != 0) {
|
||||
Aperture = Aperture + (Node->Alignment + 1) - offset;
|
||||
}
|
||||
}
|
||||
@@ -289,7 +289,7 @@ CalculateApertureIo16 (
|
||||
//
|
||||
offset = Aperture & (Bridge->Alignment);
|
||||
|
||||
if (offset) {
|
||||
if (offset != 0) {
|
||||
Aperture = Aperture + (Bridge->Alignment + 1) - offset;
|
||||
}
|
||||
|
||||
@@ -330,7 +330,7 @@ CalculateResourceAperture (
|
||||
|
||||
Aperture = 0;
|
||||
|
||||
if (!Bridge) {
|
||||
if (Bridge == NULL) {
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -353,7 +353,7 @@ CalculateResourceAperture (
|
||||
|
||||
offset = Aperture & (Node->Alignment);
|
||||
|
||||
if (offset) {
|
||||
if (offset != 0) {
|
||||
|
||||
Aperture = Aperture + (Node->Alignment + 1) - offset;
|
||||
|
||||
@@ -382,7 +382,7 @@ CalculateResourceAperture (
|
||||
// alignment
|
||||
//
|
||||
offset = Aperture & (Bridge->Alignment);
|
||||
if (offset) {
|
||||
if (offset != 0) {
|
||||
Aperture = Aperture + (Bridge->Alignment + 1) - offset;
|
||||
}
|
||||
|
||||
@@ -634,7 +634,7 @@ CreateResourceMap (
|
||||
|
||||
CurrentLink = Bridge->ChildList.ForwardLink;
|
||||
|
||||
while (CurrentLink && CurrentLink != &Bridge->ChildList) {
|
||||
while (CurrentLink != NULL && CurrentLink != &Bridge->ChildList) {
|
||||
|
||||
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);
|
||||
|
||||
@@ -923,7 +923,7 @@ DegradeResource (
|
||||
//
|
||||
HasOprom = FALSE;
|
||||
CurrentLink = Bridge->ChildList.ForwardLink;
|
||||
while (CurrentLink && CurrentLink != &Bridge->ChildList) {
|
||||
while (CurrentLink != NULL && CurrentLink != &Bridge->ChildList) {
|
||||
|
||||
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);
|
||||
if (Temp->RomSize != 0) {
|
||||
@@ -1021,7 +1021,7 @@ BridgeSupportResourceDecode (
|
||||
)
|
||||
{
|
||||
|
||||
if ((Bridge->Decodes) & Decode) {
|
||||
if (((Bridge->Decodes) & Decode) != 0) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -1362,7 +1362,7 @@ ProgrameUpstreamBridgeForRom (
|
||||
//
|
||||
Parent = PciDevice->Parent;
|
||||
ZeroMem (&Node, sizeof (Node));
|
||||
while (Parent) {
|
||||
while (Parent != NULL) {
|
||||
if (!IS_PCI_BRIDGE (&Parent->Pci)) {
|
||||
break;
|
||||
}
|
||||
@@ -2128,7 +2128,7 @@ GetResourcePaddingPpb (
|
||||
IN PCI_IO_DEVICE *PciIoDevice
|
||||
)
|
||||
{
|
||||
if (gPciHotPlugInit) {
|
||||
if (gPciHotPlugInit != NULL) {
|
||||
if (PciIoDevice->ResourcePaddingDescriptors == NULL) {
|
||||
GetResourcePaddingForHpb (PciIoDevice);
|
||||
}
|
||||
|
Reference in New Issue
Block a user