\r
DEBUG_CODE_BEGIN ();\r
\r
- if (StatusRegister & ATA_STSREG_DWF) {\r
+ if ((StatusRegister & ATA_STSREG_DWF) != 0) {\r
DEBUG (\r
(EFI_D_BLKIO,\r
"CheckErrorStatus()-- %02x : Error : Write Fault\n",\r
);\r
}\r
\r
- if (StatusRegister & ATA_STSREG_CORR) {\r
+ if ((StatusRegister & ATA_STSREG_CORR) != 0) {\r
DEBUG (\r
(EFI_D_BLKIO,\r
"CheckErrorStatus()-- %02x : Error : Corrected Data\n",\r
);\r
}\r
\r
- if (StatusRegister & ATA_STSREG_ERR) {\r
+ if ((StatusRegister & ATA_STSREG_ERR) != 0) {\r
ErrorRegister = IDEReadPortB (IdeDev->PciIo, IdeDev->IoPort->Reg1.Error);\r
\r
- if (ErrorRegister & ATA_ERRREG_BBK) {\r
+ if ((ErrorRegister & ATA_ERRREG_BBK) != 0) {\r
DEBUG (\r
(EFI_D_BLKIO,\r
"CheckErrorStatus()-- %02x : Error : Bad Block Detected\n",\r
);\r
}\r
\r
- if (ErrorRegister & ATA_ERRREG_UNC) {\r
+ if ((ErrorRegister & ATA_ERRREG_UNC) != 0) {\r
DEBUG (\r
(EFI_D_BLKIO,\r
"CheckErrorStatus()-- %02x : Error : Uncorrectable Data\n",\r
);\r
}\r
\r
- if (ErrorRegister & ATA_ERRREG_MC) {\r
+ if ((ErrorRegister & ATA_ERRREG_MC) != 0) {\r
DEBUG (\r
(EFI_D_BLKIO,\r
"CheckErrorStatus()-- %02x : Error : Media Change\n",\r
);\r
}\r
\r
- if (ErrorRegister & ATA_ERRREG_ABRT) {\r
+ if ((ErrorRegister & ATA_ERRREG_ABRT) != 0) {\r
DEBUG (\r
(EFI_D_BLKIO,\r
"CheckErrorStatus()-- %02x : Error : Abort\n",\r
);\r
}\r
\r
- if (ErrorRegister & ATA_ERRREG_TK0NF) {\r
+ if ((ErrorRegister & ATA_ERRREG_TK0NF) != 0) {\r
DEBUG (\r
(EFI_D_BLKIO,\r
"CheckErrorStatus()-- %02x : Error : Track 0 Not Found\n",\r
);\r
}\r
\r
- if (ErrorRegister & ATA_ERRREG_AMNF) {\r
+ if ((ErrorRegister & ATA_ERRREG_AMNF) != 0) {\r
DEBUG (\r
(EFI_D_BLKIO,\r
"CheckErrorStatus()-- %02x : Error : Address Mark Not Found\n",\r
@param[in] *DataBuffer\r
A pointer to the source buffer for the data.\r
\r
- @param[in] Lba\r
+ @param[in] StartLba\r
The starting logical block address to write onto\r
the device media.\r
\r
@param[in] *IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used\r
to record all the information of the IDE device.\r
\r
- @param[in,out] *Buffer buffer contained data transferred from device to host.\r
+ @param[in, out] *Buffer buffer contained data transferred from device to host.\r
@param[in] ByteCount data size in byte unit of the buffer.\r
@param[in] AtaCommand value of the Command Register\r
@param[in] StartLba the start LBA of this transaction\r
@param LbaAddress The LBA address in 48-bit mode\r
\r
@retval EFI_SUCCESS Reading succeed\r
- @retval EFI_DEVICE_ERROR Error executing commands on this device\r
+ @retval EFI_DEVICE_ERROR Error executing commands on this device.\r
\r
**/\r
EFI_STATUS\r
@param LbaAddress The LBA address in 48-bit mode\r
\r
@retval EFI_SUCCESS Reading succeed\r
- @retval EFI_DEVICE_ERROR Error executing commands on this device\r
+ @retval EFI_DEVICE_ERROR Error executing commands on this device.\r
\r
**/\r
EFI_STATUS\r
1,\r
&RegisterValue\r
);\r
- if ((RegisterValue & (BMIS_INTERRUPT | BMIS_ERROR)) || (Count == 0)) {\r
- if ((RegisterValue & BMIS_ERROR) || (Count == 0)) {\r
+ if (((RegisterValue & (BMIS_INTERRUPT | BMIS_ERROR)) != 0) || (Count == 0)) {\r
+ if (((RegisterValue & BMIS_ERROR) != 0) || (Count == 0)) {\r
Status = EFI_DEVICE_ERROR;\r
break;\r
}\r
&RegisterValue\r
);\r
\r
- if (RegisterValue & BMIS_ERROR) {\r
+ if ((RegisterValue & BMIS_ERROR) != 0) {\r
return EFI_DEVICE_ERROR;\r
}\r
\r
//\r
StatusValue = IDEReadPortB (IdeDev->PciIo, IdeDev->IoPort->Reg1.Error);\r
\r
- if (StatusValue & BIT1) {\r
+ if ((StatusValue & BIT1) != 0) {\r
return EFI_NO_MEDIA;\r
}\r
\r
- if (StatusValue & BIT6) {\r
+ if ((StatusValue & BIT6) != 0) {\r
return EFI_WRITE_PROTECTED;\r
} else {\r
return EFI_SUCCESS;\r
\r
@param[in] *IdeDev Pointer pointing to IDE_BLK_IO_DEV data structure, used\r
to record all the information of the IDE device.\r
- @param[in] *SResult Sense result for this packet command.\r
+ @param[out] *SResult Sense result for this packet command.\r
\r
@retval EFI_SUCCESS Device is accessible.\r
@retval EFI_DEVICE_ERROR Device is not accessible.\r
pointer pointing to IDE_BLK_IO_DEV data structure, used\r
to record all the information of the IDE device.\r
\r
- @param[out] **SenseBuffers\r
+ @param[out] **SenseCounts\r
allocated in this function, and freed by the calling function.\r
This buffer is used to accommodate all the sense data returned \r
by the device.\r
\r
- @param[out] *BufUnit\r
- record the unit size of the sense data block in the SenseBuffers,\r
-\r
- @param[out] *BufNumbers\r
- record the number of units in the SenseBuffers.\r
-\r
@retval EFI_SUCCESS\r
Request Sense command completes successfully.\r
\r
\r
@param[in] *IdeDev Pointer pointing to IDE_BLK_IO_DEV data structure, used\r
to record all the information of the IDE device.\r
- @param[in] SResult Sense result for this packet command\r
+ @param[out] SResult Sense result for this packet command\r
\r
@retval EFI_SUCCESS Read Capacity Command finally completes successfully.\r
@retval EFI_DEVICE_ERROR Read Capacity Command failed because of device error.\r
This function is the ATAPI implementation for ReadBlocks in the\r
Block I/O Protocol interface.\r
\r
- @param[in] *IdeBlkIoDev\r
+ @param[in] *IdeBlkIoDevice\r
Indicates the calling context.\r
\r
@param[in] MediaId\r
//\r
// save the first block to the cache for performance\r
//\r
- if (LBA == 0 && !IdeBlkIoDevice->Cache) {\r
+ if (LBA == 0 && (IdeBlkIoDevice->Cache == NULL)) {\r
IdeBlkIoDevice->Cache = AllocatePool (BlockSize);\r
if (IdeBlkIoDevice != NULL) {\r
CopyMem ((UINT8 *) IdeBlkIoDevice->Cache, (UINT8 *) Buffer, BlockSize);\r
This function is the ATAPI implementation for WriteBlocks in the\r
Block I/O Protocol interface.\r
\r
- @param[in] *This\r
+ @param[in] *IdeBlkIoDevice\r
Indicates the calling context.\r
\r
@param[in] MediaId\r
EFI_STATUS Status;\r
BOOLEAN MediaChange;\r
\r
- if (LBA == 0 && IdeBlkIoDevice->Cache) {\r
+ if (LBA == 0 && IdeBlkIoDevice->Cache != NULL) {\r
gBS->FreePool (IdeBlkIoDevice->Cache);\r
IdeBlkIoDevice->Cache = NULL;\r
}\r
Status = AtapiDetectMedia (IdeBlkIoDevice, &MediaChange);\r
if (EFI_ERROR (Status)) {\r
\r
- if (LBA == 0 && IdeBlkIoDevice->Cache) {\r
+ if (LBA == 0 && IdeBlkIoDevice->Cache != NULL) {\r
gBS->FreePool (IdeBlkIoDevice->Cache);\r
IdeBlkIoDevice->Cache = NULL;\r
}\r
\r
if (!(Media->MediaPresent)) {\r
\r
- if (LBA == 0 && IdeBlkIoDevice->Cache) {\r
+ if (LBA == 0 && IdeBlkIoDevice->Cache != NULL) {\r
gBS->FreePool (IdeBlkIoDevice->Cache);\r
IdeBlkIoDevice->Cache = NULL;\r
}\r
\r
if ((MediaId != Media->MediaId) || MediaChange) {\r
\r
- if (LBA == 0 && IdeBlkIoDevice->Cache) {\r
+ if (LBA == 0 && IdeBlkIoDevice->Cache != NULL) {\r
gBS->FreePool (IdeBlkIoDevice->Cache);\r
IdeBlkIoDevice->Cache = NULL;\r
}\r
\r
@retval EFI_DEVICE_ERROR TODO: Add description for return value\r
@retval EFI_DEVICE_ERROR TODO: Add description for return value\r
- @retval EFI_SUCCESS TODO: Add description for return value\r
+ @retval EFI_SUCCESS TODO: Add description for return value.\r
\r
**/\r
EFI_STATUS\r
\r
@param IdeBlkIoDevicePtr TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
VOID\r
/**\r
TODO: Add function description\r
\r
- @retval EFI_ABORTED TODO: Add description for return value\r
- @retval EFI_SUCCESS TODO: Add description for return value\r
- @retval EFI_NOT_FOUND TODO: Add description for return value\r
+ @retval EFI_ABORTED TODO: Add description for return value.\r
+ @retval EFI_SUCCESS TODO: Add description for return value.\r
+ @retval EFI_NOT_FOUND TODO: Add description for return value.\r
\r
**/\r
EFI_STATUS\r
@param PciIo TODO: add argument description\r
@param Port TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
UINT8\r
IN EFI_PCI_IO_PROTOCOL *PciIo,\r
IN UINT16 Port,\r
IN UINTN Count,\r
- IN VOID *Buffer\r
+ OUT VOID *Buffer\r
)\r
{\r
UINT16 *AlignedBuffer;\r
@param Port TODO: add argument description\r
@param Data TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
VOID\r
@param Port TODO: add argument description\r
@param Data TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
VOID\r
/**\r
Detect if there is disk connected to this port\r
\r
- @param IdeDev The BLK_IO private data which specifies the IDE device\r
+ @param IdeDev The BLK_IO private data which specifies the IDE device.\r
\r
**/\r
EFI_STATUS\r
// If a channel has not been checked, check it now. Then set it to "checked" state\r
// After this step, all devices in this channel have been checked.\r
//\r
- if (ChannelDeviceDetected == FALSE) {\r
+ if (!ChannelDeviceDetected) {\r
Status = DetectIDEController (IdeDev);\r
if (EFI_ERROR (Status)) {\r
return EFI_NOT_FOUND;\r
\r
Delay--;\r
\r
- } while (Delay);\r
+ } while (Delay > 0);\r
\r
if (Delay == 0) {\r
return EFI_TIMEOUT;\r
\r
Delay--;\r
\r
- } while (Delay);\r
+ } while (Delay > 0);\r
\r
if (Delay == 0) {\r
return EFI_TIMEOUT;\r
gBS->Stall (30);\r
\r
Delay--;\r
- } while (Delay);\r
+ } while (Delay > 0);\r
\r
if (Delay == 0) {\r
return EFI_TIMEOUT;\r
gBS->Stall (30);\r
\r
Delay--;\r
- } while (Delay);\r
+ } while (Delay > 0);\r
\r
if (Delay == 0) {\r
return EFI_TIMEOUT;\r
\r
Delay--;\r
\r
- } while (Delay);\r
+ } while (Delay > 0);\r
\r
if (Delay == 0) {\r
return EFI_TIMEOUT;\r
\r
Delay--;\r
\r
- } while (Delay);\r
+ } while (Delay > 0);\r
\r
if (Delay == 0) {\r
return EFI_TIMEOUT;\r
pointer pointing to IDE_BLK_IO_DEV data structure, used\r
to record all the information of the IDE device.\r
\r
- @param[in] UINTN IN TimeoutInMilliSeconds\r
+ @param[in] UINTN IN DelayInMilliSeconds\r
used to designate the timeout for the DRQ ready.\r
\r
@retval EFI_SUCCESS\r
gBS->Stall (30);\r
\r
Delay--;\r
- } while (Delay);\r
+ } while (Delay > 0);\r
\r
if (Delay == 0) {\r
return EFI_TIMEOUT;\r
pointer pointing to IDE_BLK_IO_DEV data structure, used\r
to record all the information of the IDE device.\r
\r
- @param[in] UINTN IN TimeoutInMilliSeconds\r
+ @param[in] UINTN IN DelayInMilliSeconds\r
used to designate the timeout for the DRQ ready.\r
\r
@retval EFI_SUCCESS\r
gBS->Stall (30);\r
\r
Delay--;\r
- } while (Delay);\r
+ } while (Delay > 0);\r
\r
if (Delay == 0) {\r
return EFI_TIMEOUT;\r
@param[in] *IdeDev Standard IDE device private data structure\r
@param[in] *TransferMode The device transfer mode to be set\r
\r
- @return Set transfer mode Command execute status\r
+ @return Set transfer mode Command execute status.\r
\r
**/\r
EFI_STATUS\r
\r
@retval EFI_SUCCESS Reading succeed\r
@retval EFI_ABORTED Command failed\r
- @retval EFI_DEVICE_ERROR Device status error\r
+ @retval EFI_DEVICE_ERROR Device status error.\r
\r
**/\r
EFI_STATUS\r
\r
@retval EFI_SUCCESS Reading succeed\r
@retval EFI_ABORTED Command failed\r
- @retval EFI_DEVICE_ERROR Device status error\r
+ @retval EFI_DEVICE_ERROR Device status error.\r
\r
**/\r
EFI_STATUS\r
@param[in] IdeDev Standard IDE device private data structure\r
@param[in] DriveParameters The device parameters to be set into the disk\r
\r
- @return SetParameters Command execute status\r
+ @return SetParameters Command execute status.\r
\r
**/\r
EFI_STATUS\r
\r
@param IdeDev TODO: add argument description\r
\r
- @retval EFI_SUCCESS TODO: Add description for return value\r
+ @retval EFI_SUCCESS TODO: Add description for return value.\r
\r
**/\r
EFI_STATUS\r
@param Controller TODO: add argument description\r
@param Handle TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param ParentDevicePath TODO: add argument description\r
@param RemainingDevicePath TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param PciIo TODO: add argument description\r
@param Port TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
UINT8\r
@param Count TODO: add argument description\r
@param Buffer TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
VOID\r
@param Port TODO: add argument description\r
@param Data TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
VOID\r
@param Count TODO: add argument description\r
@param Buffer TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
VOID\r
@param PciIo TODO: add argument description\r
@param IdeRegsBaseAddr TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
\r
@param IdeDev TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
\r
@param IdeDev TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
\r
@param IdeDev TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param IdeDev TODO: add argument description\r
@param TimeoutInMilliSeconds TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param IdeDev TODO: add argument description\r
@param TimeoutInMilliSeconds TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param IdeDev TODO: add argument description\r
@param TimeoutInMilliSeconds TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param IdeDev TODO: add argument description\r
@param TimeoutInMilliSeconds TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param IdeDev TODO: add argument description\r
@param TimeoutInMilliSeconds TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param IdeDev TODO: add argument description\r
@param TimeoutInMilliSeconds TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param IdeDev TODO: add argument description\r
@param DelayInMilliSeconds TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param IdeDev TODO: add argument description\r
@param DelayInMilliSeconds TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param Source TODO: add argument description\r
@param Size TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
VOID\r
\r
@param IdeDev TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
\r
@param IdeDev TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
VOID\r
@param CylinderLsb TODO: add argument description\r
@param CylinderMsb TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param CylinderLsb TODO: add argument description\r
@param CylinderMsb TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param Lba TODO: add argument description\r
@param NumberOfBlocks TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param Lba TODO: add argument description\r
@param NumberOfBlocks TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
\r
@param IdeDev TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param BufferSize TODO: add argument description\r
@param Buffer TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param BufferSize TODO: add argument description\r
@param Buffer TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
\r
@param IdeDev TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
\r
@param IdeDev TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param ByteCount TODO: add argument description\r
@param TimeOut TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param ByteCount TODO: add argument description\r
@param TimeOut TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param Read TODO: add argument description\r
@param TimeOut TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
/**\r
TODO: Add function description\r
\r
- @param IdeDev TODO: add argument description\r
- @param IdeDev TODO: add argument description\r
+ @param IdeDev TODO: add argument description\r
+ @param SResult TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param IdeDev TODO: add argument description\r
@param SenseCounts TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
/**\r
TODO: Add function description\r
\r
- @param IdeDev TODO: add argument description\r
- @param IdeDev TODO: add argument description\r
+ @param IdeDev TODO: add argument description\r
+ @param SResult TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param IdeDev TODO: add argument description\r
@param MediaChange TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param Lba TODO: add argument description\r
@param NumberOfBlocks TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param Lba TODO: add argument description\r
@param NumberOfBlocks TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
\r
@param IdeDev TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param BufferSize TODO: add argument description\r
@param Buffer TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param BufferSize TODO: add argument description\r
@param Buffer TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param SenseCount TODO: add argument description\r
@param Result TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
\r
@param IdeDev TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param IdeDev TODO: add argument description\r
@param WriteProtected TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
\r
@param IdeBlkIoDevice TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
VOID\r
@param IdeDev TODO: add argument description\r
@param TransferMode TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param IdeDev TODO: add argument description\r
@param NativeMaxAddress TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param MaxAddress TODO: add argument description\r
@param bVolatile TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param LbaMiddle TODO: add argument description\r
@param LbaHigh TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param SectorCount TODO: add argument description\r
@param LbaAddress TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param StartLba TODO: add argument description\r
@param NumberOfBlocks TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param StartLba TODO: add argument description\r
@param NumberOfBlocks TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param StartLba TODO: add argument description\r
@param NumberOfBlocks TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param StartLba TODO: add argument description\r
@param NumberOfBlocks TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param StartLba TODO: add argument description\r
@param NumberOfBlocks TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param StartLba TODO: add argument description\r
@param NumberOfBlocks TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param SectorCount TODO: add argument description\r
@param LbaAddress TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param SectorCount TODO: add argument description\r
@param LbaAddress TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
\r
@param IdeDev TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
\r
@param IdeDev TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
VOID\r
@param StartLba TODO: add argument description\r
@param SectorCount TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param StartLba TODO: add argument description\r
@param SectorCount TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param IdeDev TODO: add argument description\r
@param DriveParameters TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
\r
@param IdeDev TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param[in] Event Pointer to this event\r
@param[in] Context Event hanlder private data\r
\r
- @retval EFI_SUCCESS - Interrupt cleared\r
+ @retval EFI_SUCCESS - Interrupt cleared.\r
\r
**/\r
VOID\r
//\r
// Check whether the configuration options allow this device\r
//\r
- if (!(ConfigurationOptions & (1 << (IdeChannel * 2 + IdeDevice)))) {\r
+ if ((ConfigurationOptions & (1 << (IdeChannel * 2 + IdeDevice))) == 0) {\r
continue;\r
}\r
\r
Stop this driver on Controller Handle.\r
\r
@param This Protocol instance pointer.\r
- @param DeviceHandle Handle of device to stop driver on\r
+ @param Controller Handle of device to stop driver on\r
@param NumberOfChildren Not used\r
@param ChildHandleBuffer Not used\r
\r
@param ImageHandle TODO: add argument description\r
@param SystemTable TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param Controller TODO: add argument description\r
@param RemainingDevicePath TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param Controller TODO: add argument description\r
@param RemainingDevicePath TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param NumberOfChildren TODO: add argument description\r
@param ChildHandleBuffer TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param This TODO: add argument description\r
@param ExtendedVerification TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param BufferSize TODO: add argument description\r
@param Buffer TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
\r
@param This TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param PciIo TODO: add argument description\r
@param Enable TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param InquiryData TODO: add argument description\r
@param IntquiryDataSize TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param IdentifyData TODO: add argument description\r
@param IdentifyDataSize TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param SenseDataSize TODO: add argument description\r
@param SenseDataNumber TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
@param IdeChannel TODO: add argument description\r
@param IdeDevice TODO: add argument description\r
\r
- TODO: add return values\r
+ TODO: add return values.\r
\r
**/\r
EFI_STATUS\r
-/**@file\r
+/** @file\r
Driver Binding functions for PCI bus module.\r
\r
Copyright (c) 2006, Intel Corporation \r
Initialize the global variables\r
publish the driver binding protocol\r
\r
- @param[IN] ImageHandle,\r
- @param[IN] *SystemTable\r
+ @param[in] ImageHandle,\r
+ @param[in] *SystemTable\r
\r
@retval status of installing driver binding component name protocol.\r
\r
-/**@file\r
+/** @file\r
This module implement Pci register operation interface for \r
Pci device.\r
\r
@param PciIoDevice Pointer to instance of PCI_IO_DEVICE\r
\r
@retval TRUE Support\r
- @retval FALSE Not support\r
+ @retval FALSE Not support.\r
**/\r
BOOLEAN\r
PciCapabilitySupport (\r
-/**@file\r
+/** @file\r
\r
Copyright (c) 2006, Intel Corporation \r
All rights reserved. This program and the accompanying materials \r
@param PciIoDevice Pointer to instance of PCI_IO_DEVICE\r
\r
@retval TRUE Support\r
- @retval FALSE Not support\r
+ @retval FALSE Not support.\r
**/\r
BOOLEAN\r
PciCapabilitySupport (\r
-/**@file\r
+/** @file\r
\r
Copyright (c) 2006, Intel Corporation \r
All rights reserved. This program and the accompanying materials \r
LIST_ENTRY gPciDevicePool;\r
\r
/**\r
- Initialize the gPciDevicePool\r
+ Initialize the gPciDevicePool.\r
**/\r
EFI_STATUS\r
InitializePciDevicePool (\r
/**\r
Destroy root bridge and remove it from deivce tree.\r
\r
- @param RootBridge The bridge want to be removed\r
+ @param RootBridge The bridge want to be removed.\r
\r
**/\r
EFI_STATUS\r
\r
CurrentLink = gPciDevicePool.ForwardLink;\r
\r
- while (CurrentLink && CurrentLink != &gPciDevicePool) {\r
+ while (CurrentLink != NULL && CurrentLink != &gPciDevicePool) {\r
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
\r
if (Temp->Handle == Controller) {\r
\r
CurrentLink = PciIoDevice->ChildList.ForwardLink;\r
\r
- while (CurrentLink && CurrentLink != &PciIoDevice->ChildList) {\r
+ while (CurrentLink != NULL && CurrentLink != &PciIoDevice->ChildList) {\r
Node = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
Status = DeRegisterPciDevice (Controller, Node->Handle);\r
\r
\r
CurrentLink = RootBridge->ChildList.ForwardLink;\r
\r
- while (CurrentLink && CurrentLink != &RootBridge->ChildList) {\r
+ while (CurrentLink != NULL && CurrentLink != &RootBridge->ChildList) {\r
\r
PciIoDevice = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
if (RemainingDevicePath != NULL) {\r
\r
CurrentLink = gPciDevicePool.ForwardLink;\r
\r
- while (CurrentLink && CurrentLink != &gPciDevicePool) {\r
+ while (CurrentLink != NULL && CurrentLink != &gPciDevicePool) {\r
\r
RootBridge = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
//\r
}\r
\r
/**\r
- Get root bridge device instance by specific handle\r
+ Get root bridge device instance by specific handle.\r
\r
- @param RootBridgeHandle Given root bridge handle\r
+ @param RootBridgeHandle Given root bridge handle.\r
\r
- @return root bridge device instance\r
+ @return root bridge device instance.\r
**/\r
PCI_IO_DEVICE *\r
GetRootBridgeByHandle (\r
\r
CurrentLink = gPciDevicePool.ForwardLink;\r
\r
- while (CurrentLink && CurrentLink != &gPciDevicePool) {\r
+ while (CurrentLink != NULL && CurrentLink != &gPciDevicePool) {\r
\r
RootBridgeDev = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
if (RootBridgeDev->Handle == RootBridgeHandle) {\r
}\r
\r
/**\r
- Judege whether Pci device existed\r
+ Judege whether Pci device existed.\r
\r
- @param Bridge Parent bridege instance \r
- @param PciIoDevice Device instance\r
+ @param Bridge Parent bridege instance.\r
+ @param PciIoDevice Device instance.\r
\r
- @return whether Pci device existed\r
+ @return whether Pci device existed.\r
**/\r
BOOLEAN\r
PciDeviceExisted (\r
\r
CurrentLink = Bridge->ChildList.ForwardLink;\r
\r
- while (CurrentLink && CurrentLink != &Bridge->ChildList) {\r
+ while (CurrentLink != NULL && CurrentLink != &Bridge->ChildList) {\r
\r
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
\r
}\r
\r
/**\r
- Active VGA device\r
+ Active VGA device.\r
\r
- @param VgaDevice device instance for VGA\r
+ @param VgaDevice device instance for VGA.\r
\r
- @return device instance\r
+ @return device instance.\r
**/\r
PCI_IO_DEVICE *\r
ActiveVGADeviceOnTheSameSegment (\r
\r
CurrentLink = gPciDevicePool.ForwardLink;\r
\r
- while (CurrentLink && CurrentLink != &gPciDevicePool) {\r
+ while (CurrentLink != NULL && CurrentLink != &gPciDevicePool) {\r
\r
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
\r
}\r
\r
/**\r
- Active VGA device on root bridge\r
+ Active VGA device on root bridge.\r
\r
- @param RootBridge Root bridge device instance\r
+ @param RootBridge Root bridge device instance.\r
\r
- @return VGA device instance\r
+ @return VGA device instance.\r
**/\r
PCI_IO_DEVICE *\r
ActiveVGADeviceOnTheRootBridge (\r
\r
CurrentLink = RootBridge->ChildList.ForwardLink;\r
\r
- while (CurrentLink && CurrentLink != &RootBridge->ChildList) {\r
+ while (CurrentLink != NULL && CurrentLink != &RootBridge->ChildList) {\r
\r
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
\r
(Temp->Attributes &\r
(EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY |\r
EFI_PCI_IO_ATTRIBUTE_VGA_IO |\r
- EFI_PCI_IO_ATTRIBUTE_VGA_IO_16))) {\r
+ EFI_PCI_IO_ATTRIBUTE_VGA_IO_16)) != 0) {\r
return Temp;\r
}\r
\r
}\r
\r
/**\r
- Get HPC PCI address according to its device path\r
- @param PciRootBridgeIo Root bridege Io instance\r
- @param HpcDevicePath Given searching device path\r
- @param PciAddress Buffer holding searched result\r
+ Get HPC PCI address according to its device path.\r
+ @param PciRootBridgeIo Root bridege Io instance.\r
+ @param HpcDevicePath Given searching device path.\r
+ @param PciAddress Buffer holding searched result.\r
\r
@retval EFI_NOT_FOUND Can not find the specific device path.\r
- @retval EFI_SUCCESS Success to get the device path\r
+ @retval EFI_SUCCESS Success to get the device path.\r
**/\r
EFI_STATUS\r
GetHpcPciAddress (\r
\r
CurrentLink = gPciDevicePool.ForwardLink;\r
\r
- while (CurrentLink && CurrentLink != &gPciDevicePool) {\r
+ while (CurrentLink != NULL && CurrentLink != &gPciDevicePool) {\r
\r
RootBridge = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
//\r
}\r
\r
/**\r
- Get HPC PCI address according to its device path\r
- @param RootBridge Root bridege Io instance\r
- @param RemainingDevicePath Given searching device path\r
- @param PciAddress Buffer holding searched result\r
+ Get HPC PCI address according to its device path.\r
+ @param RootBridge Root bridege Io instance.\r
+ @param RemainingDevicePath Given searching device path.\r
+ @param PciAddress Buffer holding searched result.\r
\r
@retval EFI_NOT_FOUND Can not find the specific device path.\r
**/\r
CurrentLink = RootBridge->ChildList.ForwardLink;\r
Node.DevPath = CurrentDevicePath;\r
\r
- while (CurrentLink && CurrentLink != &RootBridge->ChildList) {\r
+ while (CurrentLink != NULL && CurrentLink != &RootBridge->ChildList) {\r
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
\r
if (Node.Pci->Device == Temp->DeviceNumber &&\r
-/**@file\r
+/** @file\r
\r
Copyright (c) 2006, Intel Corporation \r
All rights reserved. This program and the accompanying materials \r
#define _EFI_PCI_DEVICE_SUPPORT_H\r
\r
/**\r
- Initialize the gPciDevicePool\r
+ Initialize the gPciDevicePool.\r
**/\r
EFI_STATUS\r
InitializePciDevicePool (\r
);\r
\r
/**\r
- Get root bridge device instance by specific handle\r
+ Get root bridge device instance by specific handle.\r
\r
- @param RootBridgeHandle Given root bridge handle\r
+ @param RootBridgeHandle Given root bridge handle.\r
\r
- @return root bridge device instance\r
+ @return root bridge device instance.\r
**/\r
PCI_IO_DEVICE *\r
GetRootBridgeByHandle (\r
);\r
\r
/**\r
- Judege whether Pci device existed\r
+ Judege whether Pci device existed.\r
\r
- @param Bridge Parent bridege instance \r
- @param PciIoDevice Device instance\r
+ @param Bridge Parent bridege instance. \r
+ @param PciIoDevice Device instance.\r
\r
- @return whether Pci device existed\r
+ @return whether Pci device existed.\r
**/\r
BOOLEAN\r
PciDeviceExisted (\r
);\r
\r
/**\r
- Active VGA device\r
+ Active VGA device.\r
\r
- @param VgaDevice device instance for VGA\r
+ @param VgaDevice device instance for VGA.\r
\r
- @return device instance\r
+ @return device instance.\r
**/\r
PCI_IO_DEVICE *\r
ActiveVGADeviceOnTheSameSegment (\r
);\r
\r
/**\r
- Active VGA device on root bridge\r
+ Active VGA device on root bridge.\r
\r
- @param RootBridge Root bridge device instance\r
+ @param RootBridge Root bridge device instance.\r
\r
- @return VGA device instance\r
+ @return VGA device instance.\r
**/\r
PCI_IO_DEVICE *\r
ActiveVGADeviceOnTheRootBridge (\r
);\r
\r
/**\r
- Get HPC PCI address according to its device path\r
- @param PciRootBridgeIo Root bridege Io instance\r
- @param HpcDevicePath Given searching device path\r
- @param PciAddress Buffer holding searched result\r
+ Get HPC PCI address according to its device path.\r
+ @param PciRootBridgeIo Root bridege Io instance.\r
+ @param HpcDevicePath Given searching device path.\r
+ @param PciAddress Buffer holding searched result.\r
\r
@retval EFI_NOT_FOUND Can not find the specific device path.\r
- @retval EFI_SUCCESS Success to get the device path\r
+ @retval EFI_SUCCESS Success to get the device path.\r
**/\r
EFI_STATUS\r
GetHpcPciAddress (\r
);\r
\r
/**\r
- Get HPC PCI address according to its device path\r
- @param RootBridge Root bridege Io instance\r
- @param RemainingDevicePath Given searching device path\r
- @param PciAddress Buffer holding searched result\r
+ Get HPC PCI address according to its device path.\r
+ @param RootBridge Root bridege Io instance.\r
+ @param RemainingDevicePath Given searching device path.\r
+ @param PciAddress Buffer holding searched result.\r
\r
@retval EFI_NOT_FOUND Can not find the specific device path.\r
**/\r
-/**@file\r
+/** @file\r
\r
Copyright (c) 2006, Intel Corporation \r
All rights reserved. This program and the accompanying materials \r
#include "PciBus.h"\r
\r
/**\r
- Initializes a PCI Driver Override Instance\r
+ Initializes a PCI Driver Override Instance.\r
\r
- @param PciIoDevice Device instance\r
+ @param PciIoDevice Device instance.\r
\r
- @retval EFI_SUCCESS Operation success\r
+ @retval EFI_SUCCESS Operation success.\r
**/\r
EFI_STATUS\r
InitializePciDriverOverrideInstance (\r
}\r
\r
/**\r
- Get a overriding driver image\r
- @param This Pointer to instance of EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL\r
- @param DriverImageHandle Override driver image,\r
+ Get a overriding driver image.\r
+ @param This Pointer to instance of EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL.\r
+ @param DriverImageHandle Override driver image.\r
\r
- @retval EFI_SUCCESS Success to get driver image handle\r
- @retval EFI_NOT_FOUND can not find override driver image\r
- @retval EFI_INVALID_PARAMETER Invalid parameter\r
+ @retval EFI_SUCCESS Success to get driver image handle.\r
+ @retval EFI_NOT_FOUND can not find override driver image.\r
+ @retval EFI_INVALID_PARAMETER Invalid parameter.\r
**/\r
EFI_STATUS\r
EFIAPI\r
\r
CurrentLink = PciIoDevice->OptionRomDriverList.ForwardLink;\r
\r
- while (CurrentLink && CurrentLink != &PciIoDevice->OptionRomDriverList) {\r
+ while (CurrentLink != NULL && CurrentLink != &PciIoDevice->OptionRomDriverList) {\r
\r
Node = DRIVER_OVERRIDE_FROM_LINK (CurrentLink);\r
\r
-/**@file\r
+/** @file\r
\r
Copyright (c) 2006, Intel Corporation \r
All rights reserved. This program and the accompanying materials \r
CR (a, PCI_DRIVER_OVERRIDE_LIST, Link, DRIVER_OVERRIDE_SIGNATURE)\r
\r
/**\r
- Initializes a PCI Driver Override Instance\r
+ Initializes a PCI Driver Override Instance.\r
\r
- @param PciIoDevice Device instance\r
+ @param PciIoDevice Device instance.\r
\r
- @retval EFI_SUCCESS Operation success\r
+ @retval EFI_SUCCESS Operation success.\r
**/\r
EFI_STATUS\r
InitializePciDriverOverrideInstance (\r
);\r
\r
/**\r
- Add an overriding driver image\r
+ Add an overriding driver image.\r
\r
- @param PciIoDevice Instance of PciIo device\r
- @param DriverImageHandle new added driver image\r
+ @param PciIoDevice Instance of PciIo device.\r
+ @param DriverImageHandle new added driver image.\r
\r
- @retval EFI_OUT_OF_RESOURCES no memory resource for new driver instance\r
- @retval EFI_SUCCESS Success add driver\r
+ @retval EFI_OUT_OF_RESOURCES no memory resource for new driver instance.\r
+ @retval EFI_SUCCESS Success add driver.\r
**/\r
EFI_STATUS\r
AddDriver (\r
\r
\r
/**\r
- Get a overriding driver image\r
- @param This Pointer to instance of EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL\r
- @param DriverImageHandle Override driver image,\r
+ Get a overriding driver image.\r
+ @param This Pointer to instance of EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL.\r
+ @param DriverImageHandle Override driver image.\r
\r
- @retval EFI_SUCCESS Success to get driver image handle\r
- @retval EFI_NOT_FOUND can not find override driver image\r
- @retval EFI_INVALID_PARAMETER Invalid parameter\r
+ @retval EFI_SUCCESS Success to get driver image handle.\r
+ @retval EFI_NOT_FOUND can not find override driver image.\r
+ @retval EFI_INVALID_PARAMETER Invalid parameter.\r
**/\r
EFI_STATUS\r
EFIAPI\r
-/**@file\r
+/** @file\r
\r
Copyright (c) 2006 - 2008, Intel Corporation \r
All rights reserved. This program and the accompanying materials \r
\r
/**\r
This routine is used to enumerate entire pci bus system\r
- in a given platform\r
+ in a given platform.\r
\r
- @param Controller Parent controller handle\r
+ @param Controller Parent controller handle.\r
\r
- @return Status of enumerating\r
+ @return Status of enumerating.\r
**/\r
EFI_STATUS\r
PciEnumerator (\r
/**\r
Enumerate PCI root bridge\r
\r
- @param PciResAlloc Pointer to protocol instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL\r
- @param RootBridgeDev Instance of root bridge device\r
+ @param PciResAlloc Pointer to protocol instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.\r
+ @param RootBridgeDev Instance of root bridge device.\r
\r
- @retval EFI_SUCCESS Success to enumerate root bridge\r
- @retval Others Fail to enumerate root bridge\r
+ @retval EFI_SUCCESS Success to enumerate root bridge.\r
+ @retval Others Fail to enumerate root bridge.\r
\r
**/\r
EFI_STATUS\r
// Go through bridges to reach all devices\r
//\r
CurrentLink = Bridge->ChildList.ForwardLink;\r
- while (CurrentLink && CurrentLink != &Bridge->ChildList) {\r
+ while (CurrentLink != NULL && CurrentLink != &Bridge->ChildList) {\r
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
if (!IsListEmpty (&Temp->ChildList)) {\r
\r
/**\r
This routine is used to assign bus number to the given PCI bus system\r
\r
- @param Bridge Parent root bridge instance\r
- @param StartBusNumber Number of beginning\r
- @param SubBusNumber the number of sub bus\r
+ @param Bridge Parent root bridge instance.\r
+ @param StartBusNumber Number of beginning.\r
+ @param SubBusNumber the number of sub bus.\r
\r
- @retval EFI_SUCCESS Success to assign bus number\r
+ @retval EFI_SUCCESS Success to assign bus number.\r
**/\r
EFI_STATUS\r
PciAssignBusNumber (\r
// Currently we hardcoded for ea815\r
//\r
\r
- if (Attributes & EFI_PCI_HOST_BRIDGE_COMBINE_MEM_PMEM) {\r
+ if ((Attributes & EFI_PCI_HOST_BRIDGE_COMBINE_MEM_PMEM) != 0) {\r
RootBridgeDev->Decodes |= EFI_BRIDGE_PMEM_MEM_COMBINE_SUPPORTED;\r
}\r
\r
- if (Attributes & EFI_PCI_HOST_BRIDGE_MEM64_DECODE) {\r
+ if ((Attributes & EFI_PCI_HOST_BRIDGE_MEM64_DECODE) != 0) {\r
RootBridgeDev->Decodes |= EFI_BRIDGE_PMEM64_DECODE_SUPPORTED;\r
}\r
\r
/**\r
Get Max Option Rom size on this bridge\r
\r
- @param Bridge Bridge device instance\r
- @return Max size of option rom\r
+ @param Bridge Bridge device instance.\r
+ @return Max size of option rom.\r
**/\r
UINT64\r
GetMaxOptionRomSize (\r
// Go through bridges to reach all devices\r
//\r
CurrentLink = Bridge->ChildList.ForwardLink;\r
- while (CurrentLink && CurrentLink != &Bridge->ChildList) {\r
+ while (CurrentLink != NULL && CurrentLink != &Bridge->ChildList) {\r
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
if (!IsListEmpty (&Temp->ChildList)) {\r
\r
/**\r
Process attributes of devices on this host bridge\r
\r
- @param PciResAlloc Protocol instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL\r
+ @param PciResAlloc Protocol instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.\r
\r
- @retval EFI_NOT_FOUND Can not find the specific root bridge device\r
- @retval EFI_SUCCESS Success Process attribute\r
- @retval Others Can not determine the root bridge device's attribute\r
+ @retval EFI_NOT_FOUND Can not find the specific root bridge device.\r
+ @retval EFI_SUCCESS Success Process attribute.\r
+ @retval Others Can not determine the root bridge device's attribute.\r
**/\r
EFI_STATUS\r
PciHostBridgeDeviceAttribute (\r
/**\r
Remove a PCI device from device pool and mark its bar\r
\r
- @param PciDevice Instance of Pci device\r
+ @param PciDevice Instance of Pci device.\r
\r
- @retval EFI_SUCCESS Success Operation\r
- @retval EFI_ABORTED Pci device is a root bridge\r
+ @retval EFI_SUCCESS Success Operation.\r
+ @retval EFI_ABORTED Pci device is a root bridge.\r
**/\r
EFI_STATUS\r
RejectPciDevice (\r
// Remove the padding resource from a bridge\r
//\r
if ( IS_PCI_BRIDGE(&PciDevice->Pci) && \\r
- PciDevice->ResourcePaddingDescriptors ) {\r
+ PciDevice->ResourcePaddingDescriptors != NULL ) {\r
gBS->FreePool (PciDevice->ResourcePaddingDescriptors);\r
PciDevice->ResourcePaddingDescriptors = NULL;\r
return EFI_SUCCESS;\r
//\r
// Skip RB and PPB\r
//\r
- if (IS_PCI_BRIDGE (&PciDevice->Pci) || (!PciDevice->Parent)) {\r
+ if (IS_PCI_BRIDGE (&PciDevice->Pci) || (PciDevice->Parent == NULL)) {\r
return EFI_ABORTED;\r
}\r
\r
// Get the root bridge device\r
//\r
Bridge = PciDevice;\r
- while (Bridge->Parent) {\r
+ while (Bridge->Parent != NULL) {\r
Bridge = Bridge->Parent;\r
}\r
\r
//\r
Bridge = PciDevice->Parent;\r
CurrentLink = Bridge->ChildList.ForwardLink;\r
- while (CurrentLink && CurrentLink != &Bridge->ChildList) {\r
+ while (CurrentLink != NULL && CurrentLink != &Bridge->ChildList) {\r
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
if (Temp == PciDevice) {\r
InitializePciDevice (Temp);\r
}\r
\r
/**\r
- Determine whethter a PCI device can be rejected\r
+ Determine whethter a PCI device can be rejected.\r
\r
- @param PciResNode Pointer to Pci resource node instance \r
+ @param PciResNode Pointer to Pci resource node instance.\r
\r
- @return whethter a PCI device can be rejected\r
+ @return whethter a PCI device can be rejected.\r
**/\r
BOOLEAN\r
IsRejectiveDevice (\r
//\r
// Ensure the device is present\r
//\r
- if (!Temp) {\r
+ if (Temp == NULL) {\r
return FALSE;\r
}\r
\r
//\r
// PPB and RB should go ahead\r
//\r
- if (IS_PCI_BRIDGE (&Temp->Pci) || (!Temp->Parent)) {\r
+ if (IS_PCI_BRIDGE (&Temp->Pci) || (Temp->Parent == NULL)) {\r
return TRUE;\r
}\r
\r
//\r
// Skip device on Bus0\r
//\r
- if ((Temp->Parent) && (Temp->BusNumber == 0)) {\r
+ if ((Temp->Parent != NULL) && (Temp->BusNumber == 0)) {\r
return FALSE;\r
}\r
\r
IN PCI_RESOURCE_NODE *PciResNode2\r
)\r
{\r
- if (!PciResNode2) {\r
+ if (PciResNode2 == NULL) {\r
return PciResNode1;\r
}\r
\r
- if ((IS_PCI_BRIDGE(&(PciResNode2->PciDev->Pci)) || !(PciResNode2->PciDev->Parent)) \\r
+ if ((IS_PCI_BRIDGE(&(PciResNode2->PciDev->Pci)) || (PciResNode2->PciDev->Parent == NULL)) \\r
&& (PciResNode2->ResourceUsage != PciResUsagePadding) )\r
{\r
return PciResNode1;\r
}\r
\r
- if (!PciResNode1) {\r
+ if (PciResNode1 == NULL) {\r
return PciResNode2;\r
}\r
\r
\r
\r
/**\r
- Get the max resource consumer in the host resource pool\r
+ Get the max resource consumer in the host resource pool.\r
\r
- @param ResPool Pointer to resource pool node\r
+ @param ResPool Pointer to resource pool node.\r
\r
- @return the max resource consumer in the host resource pool\r
+ @return the max resource consumer in the host resource pool.\r
**/\r
PCI_RESOURCE_NODE *\r
GetMaxResourceConsumerDevice (\r
PciResNode = NULL;\r
\r
CurrentLink = ResPool->ChildList.ForwardLink;\r
- while (CurrentLink && CurrentLink != &ResPool->ChildList) {\r
+ while (CurrentLink != NULL && CurrentLink != &ResPool->ChildList) {\r
\r
Temp = RESOURCE_NODE_FROM_LINK (CurrentLink);\r
\r
continue;\r
}\r
\r
- if ((IS_PCI_BRIDGE (&(Temp->PciDev->Pci)) || (!Temp->PciDev->Parent)) \\r
+ if ((IS_PCI_BRIDGE (&(Temp->PciDev->Pci)) || (Temp->PciDev->Parent == NULL)) \\r
&& (Temp->ResourceUsage != PciResUsagePadding))\r
{\r
PPBResNode = GetMaxResourceConsumerDevice (Temp);\r
/**\r
Adjust host bridge allocation so as to reduce resource requirement\r
\r
- @param IoPool Pointer to instance of I/O resource Node\r
- @param Mem32Pool Pointer to instance of 32-bit memory resource Node\r
- @param PMem32Pool Pointer to instance of 32-bit Pmemory resource node\r
- @param Mem64Pool Pointer to instance of 64-bit memory resource node\r
- @param PMem64Pool Pointer to instance of 64-bit Pmemory resource node\r
- @param IoResStatus Status of I/O resource Node\r
- @param Mem32ResStatus Status of 32-bit memory resource Node\r
- @param PMem32ResStatus Status of 32-bit Pmemory resource node\r
- @param Mem64ResStatus Status of 64-bit memory resource node\r
- @param PMem64ResStatus Status of 64-bit Pmemory resource node\r
+ @param IoPool Pointer to instance of I/O resource Node.\r
+ @param Mem32Pool Pointer to instance of 32-bit memory resource Node.\r
+ @param PMem32Pool Pointer to instance of 32-bit Pmemory resource node.\r
+ @param Mem64Pool Pointer to instance of 64-bit memory resource node.\r
+ @param PMem64Pool Pointer to instance of 64-bit Pmemory resource node.\r
+ @param IoResStatus Status of I/O resource Node.\r
+ @param Mem32ResStatus Status of 32-bit memory resource Node.\r
+ @param PMem32ResStatus Status of 32-bit Pmemory resource node.\r
+ @param Mem64ResStatus Status of 64-bit memory resource node.\r
+ @param PMem64ResStatus Status of 64-bit Pmemory resource node.\r
**/\r
EFI_STATUS\r
PciHostBridgeAdjustAllocation (\r
// Hostbridge hasn't enough resource\r
//\r
PciResNode = GetMaxResourceConsumerDevice (ResPool[ResType]);\r
- if (!PciResNode) {\r
+ if (PciResNode == NULL) {\r
continue;\r
}\r
\r
//\r
// Deal with io aperture\r
//\r
- if (Aperture & 0x01) {\r
+ if ((Aperture & 0x01) != 0) {\r
Ptr->Desc = ACPI_ADDRESS_SPACE_DESCRIPTOR;\r
Ptr->Len = sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) - 3;\r
//\r
//\r
// Deal with mem32 aperture\r
//\r
- if (Aperture & 0x02) {\r
+ if ((Aperture & 0x02) != 0) {\r
Ptr->Desc = ACPI_ADDRESS_SPACE_DESCRIPTOR;\r
Ptr->Len = sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) - 3;\r
//\r
//\r
// Deal with Pmem32 aperture\r
//\r
- if (Aperture & 0x04) {\r
+ if ((Aperture & 0x04) != 0) {\r
Ptr->Desc = ACPI_ADDRESS_SPACE_DESCRIPTOR;\r
Ptr->Len = sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) - 3;\r
//\r
//\r
// Deal with mem64 aperture\r
//\r
- if (Aperture & 0x08) {\r
+ if ((Aperture & 0x08) != 0) {\r
Ptr->Desc = ACPI_ADDRESS_SPACE_DESCRIPTOR;\r
Ptr->Len = sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) - 3;\r
//\r
//\r
// Deal with Pmem64 aperture\r
//\r
- if (Aperture & 0x10) {\r
+ if ((Aperture & 0x10) != 0) {\r
Ptr->Desc = ACPI_ADDRESS_SPACE_DESCRIPTOR;\r
Ptr->Len = sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) - 3;\r
//\r
Get resource base from a acpi configuration descriptor.\r
\r
@param pConfig an acpi configuration descriptor.\r
- @param IoBase output of I/O resource base address\r
- @param Mem32Base output of 32-bit memory base address\r
- @param PMem32Base output of 32-bit pmemory base address\r
- @param Mem64Base output of 64-bit memory base address\r
- @param PMem64Base output of 64-bit pmemory base address\r
+ @param IoBase output of I/O resource base address.\r
+ @param Mem32Base output of 32-bit memory base address.\r
+ @param PMem32Base output of 32-bit pmemory base address.\r
+ @param Mem64Base output of 64-bit memory base address.\r
+ @param PMem64Base output of 64-bit pmemory base address.\r
\r
- @return EFI_SUCCESS Success operation\r
+ @return EFI_SUCCESS Success operation.\r
**/\r
EFI_STATUS\r
GetResourceBase (\r
Enumerate pci bridge, allocate resource and determine attribute\r
for devices on this bridge\r
\r
- @param BridgeDev Pointer to instance of bridge device\r
+ @param BridgeDev Pointer to instance of bridge device.\r
\r
- @retval EFI_SUCCESS Success operation\r
- @retval Others Fail to enumerate\r
+ @retval EFI_SUCCESS Success operation.\r
+ @retval Others Fail to enumerate.\r
**/\r
EFI_STATUS\r
PciBridgeEnumerator (\r
/**\r
Allocate all kinds of resource for bridge\r
\r
- @param Bridge Pointer to bridge instance\r
+ @param Bridge Pointer to bridge instance.\r
\r
@retval EFI_SUCCESS Success operation.\r
- @retval Others Fail to allocate resource for bridge\r
+ @retval Others Fail to allocate resource for bridge.\r
**/\r
EFI_STATUS\r
PciBridgeResourceAllocator (\r
/**\r
Get resource base address for a pci bridge device\r
\r
- @param Bridge Given Pci driver instance\r
- @param IoBase output for base address of I/O type resource\r
- @param Mem32Base output for base address of 32-bit memory type resource\r
- @param PMem32Base output for base address of 32-bit Pmemory type resource\r
- @param Mem64Base output for base address of 64-bit memory type resource\r
- @param PMem64Base output for base address of 64-bit Pmemory type resource\r
+ @param Bridge Given Pci driver instance.\r
+ @param IoBase output for base address of I/O type resource.\r
+ @param Mem32Base output for base address of 32-bit memory type resource.\r
+ @param PMem32Base output for base address of 32-bit Pmemory type resource.\r
+ @param Mem64Base output for base address of 64-bit memory type resource.\r
+ @param PMem64Base output for base address of 64-bit Pmemory type resource.\r
\r
- @retval EFI_SUCCESS Succes to get resource base address\r
+ @retval EFI_SUCCESS Succes to get resource base address.\r
**/\r
EFI_STATUS\r
GetResourceBaseFromBridge (\r
\r
if (IS_PCI_BRIDGE (&Bridge->Pci)) {\r
\r
- if (Bridge->PciBar[PPB_IO_RANGE].Length) {\r
+ if (Bridge->PciBar[PPB_IO_RANGE].Length > 0) {\r
*IoBase = Bridge->PciBar[PPB_IO_RANGE].BaseAddress;\r
}\r
\r
- if (Bridge->PciBar[PPB_MEM32_RANGE].Length) {\r
+ if (Bridge->PciBar[PPB_MEM32_RANGE].Length > 0) {\r
*Mem32Base = Bridge->PciBar[PPB_MEM32_RANGE].BaseAddress;\r
}\r
\r
- if (Bridge->PciBar[PPB_PMEM32_RANGE].Length) {\r
+ if (Bridge->PciBar[PPB_PMEM32_RANGE].Length > 0) {\r
*PMem32Base = Bridge->PciBar[PPB_PMEM32_RANGE].BaseAddress;\r
}\r
\r
- if (Bridge->PciBar[PPB_PMEM64_RANGE].Length) {\r
+ if (Bridge->PciBar[PPB_PMEM64_RANGE].Length > 0) {\r
*PMem64Base = Bridge->PciBar[PPB_PMEM64_RANGE].BaseAddress;\r
} else {\r
*PMem64Base = gAllOne;\r
}\r
\r
if (IS_CARDBUS_BRIDGE (&Bridge->Pci)) {\r
- if (Bridge->PciBar[P2C_IO_1].Length) {\r
+ if (Bridge->PciBar[P2C_IO_1].Length > 0) {\r
*IoBase = Bridge->PciBar[P2C_IO_1].BaseAddress;\r
} else {\r
- if (Bridge->PciBar[P2C_IO_2].Length) {\r
+ if (Bridge->PciBar[P2C_IO_2].Length > 0) {\r
*IoBase = Bridge->PciBar[P2C_IO_2].BaseAddress;\r
}\r
}\r
\r
- if (Bridge->PciBar[P2C_MEM_1].Length) {\r
+ if (Bridge->PciBar[P2C_MEM_1].Length > 0) {\r
if (Bridge->PciBar[P2C_MEM_1].BarType == PciBarTypePMem32) {\r
*PMem32Base = Bridge->PciBar[P2C_MEM_1].BaseAddress;\r
}\r
}\r
}\r
\r
- if (Bridge->PciBar[P2C_MEM_2].Length) {\r
+ if (Bridge->PciBar[P2C_MEM_2].Length > 0) {\r
if (Bridge->PciBar[P2C_MEM_2].BarType == PciBarTypePMem32) {\r
*PMem32Base = Bridge->PciBar[P2C_MEM_2].BaseAddress;\r
}\r
required here. This notification can be used to perform any chipsetspecific\r
programming.\r
\r
- @param[in] This The instance pointer of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL\r
+ @param[in] PciResAlloc The instance pointer of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL\r
@param[in] Phase The phase during enumeration\r
\r
@retval EFI_NOT_READY This phase cannot be entered at this time. For example, this error\r
//\r
// Get Root Brige Handle\r
//\r
- while (Bridge->Parent) {\r
+ while (Bridge->Parent != NULL) {\r
Bridge = Bridge->Parent;\r
}\r
\r
@param NumberOfChildren - A the number of child handle in the ChildHandleBuffer.\r
@param ChildHandleBuffer - A pointer to the array contain the child handle.\r
\r
- @retval EFI_NOT_FOUND Can not find bridge according to controller handle\r
- @retval EFI_SUCCESS Success operating\r
+ @retval EFI_NOT_FOUND Can not find bridge according to controller handle.\r
+ @retval EFI_SUCCESS Success operating.\r
**/\r
EFI_STATUS\r
EFIAPI\r
// Get root bridge handle\r
//\r
Temp = Bridge;\r
- while (Temp->Parent) {\r
+ while (Temp->Parent != NULL) {\r
Temp = Temp->Parent;\r
}\r
\r
/**\r
Add host bridge handle to global variable for enumating.\r
\r
- @param HostBridgeHandle host bridge handle\r
+ @param HostBridgeHandle host bridge handle.\r
**/\r
EFI_STATUS\r
AddHostBridgeEnumerator (\r
{\r
UINTN Index;\r
\r
- if (!HostBridgeHandle) {\r
+ if (HostBridgeHandle == NULL) {\r
return EFI_ABORTED;\r
}\r
\r
-/**@file\r
+/** @file\r
Header file declares all logic function for PCI bus enumeration.\r
\r
Copyright (c) 2006, Intel Corporation \r
This routine is used to enumerate entire pci bus system\r
in a given platform\r
\r
- @param Controller Parent controller handle\r
+ @param Controller Parent controller handle.\r
\r
- @return Status of enumerating\r
+ @return Status of enumerating.\r
**/\r
EFI_STATUS\r
PciEnumerator (\r
Enumerate PCI root bridge\r
\r
@param PciResAlloc Pointer to protocol instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL\r
- @param RootBridgeDev Instance of root bridge device\r
+ @param RootBridgeDev Instance of root bridge device.\r
\r
- @retval EFI_SUCCESS Success to enumerate root bridge\r
- @retval Others Fail to enumerate root bridge\r
+ @retval EFI_SUCCESS Success to enumerate root bridge.\r
+ @retval Others Fail to enumerate root bridge.\r
\r
**/\r
EFI_STATUS\r
/**\r
This routine is used to process option rom on a certain root bridge\r
\r
- @param Bridge Given parent's root bridge\r
- @param RomBase Base address of ROM driver loaded from\r
- @param MaxLength Max rom size\r
+ @param Bridge Given parent's root bridge.\r
+ @param RomBase Base address of ROM driver loaded from.\r
+ @param MaxLength Max rom size.\r
\r
@retval EFI_SUCCESS Success to process option rom image.\r
**/\r
/**\r
This routine is used to assign bus number to the given PCI bus system\r
\r
- @param Bridge Parent root bridge instance\r
- @param StartBusNumber Number of beginning\r
- @param SubBusNumber the number of sub bus\r
+ @param Bridge Parent root bridge instance.\r
+ @param StartBusNumber Number of beginning.\r
+ @param SubBusNumber the number of sub bus.\r
\r
- @retval EFI_SUCCESS Success to assign bus number\r
+ @retval EFI_SUCCESS Success to assign bus number.\r
**/\r
EFI_STATUS\r
PciAssignBusNumber (\r
This routine is used to determine the root bridge attribute by interfacing\r
the host bridge resource allocation protocol.\r
\r
- @param PciResAlloc Protocol instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL\r
- @param RootBridgeDev Root bridge instance\r
+ @param PciResAlloc Protocol instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.\r
+ @param RootBridgeDev Root bridge instance.\r
\r
- @retval EFI_SUCCESS Success to get root bridge's attribute\r
- @retval Others Fail to get attribute\r
+ @retval EFI_SUCCESS Success to get root bridge's attribute.\r
+ @retval Others Fail to get attribute.\r
**/\r
EFI_STATUS\r
DetermineRootBridgeAttributes (\r
/**\r
Get Max Option Rom size on this bridge\r
\r
- @param Bridge Bridge device instance\r
- @return Max size of option rom\r
+ @param Bridge Bridge device instance.\r
+ @return Max size of option rom.\r
**/\r
UINT64\r
GetMaxOptionRomSize (\r
\r
@param PciResAlloc Protocol instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL\r
\r
- @retval EFI_NOT_FOUND Can not find the specific root bridge device\r
- @retval EFI_SUCCESS Success Process attribute\r
- @retval Others Can not determine the root bridge device's attribute\r
+ @retval EFI_NOT_FOUND Can not find the specific root bridge device.\r
+ @retval EFI_SUCCESS Success Process attribute.\r
+ @retval Others Can not determine the root bridge device's attribute.\r
**/\r
EFI_STATUS\r
PciHostBridgeDeviceAttribute (\r
/**\r
Get resource allocation status from the ACPI pointer\r
\r
- @param AcpiConfig Point to Acpi configuration table\r
- @param IoResStatus Return the status of I/O resource\r
- @param Mem32ResStatus Return the status of 32-bit Memory resource\r
- @param PMem32ResStatus Return the status of 32-bit PMemory resource\r
- @param Mem64ResStatus Return the status of 64-bit Memory resource\r
- @param PMem64ResStatus Return the status of 64-bit PMemory resource\r
+ @param AcpiConfig Point to Acpi configuration table.\r
+ @param IoResStatus Return the status of I/O resource.\r
+ @param Mem32ResStatus Return the status of 32-bit Memory resource.\r
+ @param PMem32ResStatus Return the status of 32-bit PMemory resource.\r
+ @param Mem64ResStatus Return the status of 64-bit Memory resource.\r
+ @param PMem64ResStatus Return the status of 64-bit PMemory resource.\r
\r
@retval EFI_SUCCESS Success to get resource allocation status from ACPI configuration table.\r
**/\r
/**\r
Remove a PCI device from device pool and mark its bar\r
\r
- @param PciDevice Instance of Pci device\r
+ @param PciDevice Instance of Pci device.\r
\r
- @retval EFI_SUCCESS Success Operation\r
- @retval EFI_ABORTED Pci device is a root bridge\r
+ @retval EFI_SUCCESS Success Operation.\r
+ @retval EFI_ABORTED Pci device is a root bridge.\r
**/\r
EFI_STATUS\r
RejectPciDevice (\r
/**\r
Determine whethter a PCI device can be rejected\r
\r
- @param PciResNode Pointer to Pci resource node instance \r
+ @param PciResNode Pointer to Pci resource node instance.\r
\r
- @return whethter a PCI device can be rejected\r
+ @return whethter a PCI device can be rejected.\r
**/\r
BOOLEAN\r
IsRejectiveDevice (\r
/**\r
Compare two resource node and get the larger resource consumer\r
\r
- @param PciResNode1 resource node 1 want to be compared\r
- @param PciResNode2 resource node 2 want to be compared\r
+ @param PciResNode1 resource node 1 want to be compared.\r
+ @param PciResNode2 resource node 2 want to be compared.\r
\r
@return Larger resource consumer.\r
**/\r
/**\r
Get the max resource consumer in the host resource pool\r
\r
- @param ResPool Pointer to resource pool node\r
+ @param ResPool Pointer to resource pool node.\r
\r
- @return the max resource consumer in the host resource pool\r
+ @return the max resource consumer in the host resource pool.\r
**/\r
PCI_RESOURCE_NODE *\r
GetMaxResourceConsumerDevice (\r
/**\r
Adjust host bridge allocation so as to reduce resource requirement\r
\r
- @param IoPool Pointer to instance of I/O resource Node\r
- @param Mem32Pool Pointer to instance of 32-bit memory resource Node\r
- @param PMem32Pool Pointer to instance of 32-bit Pmemory resource node\r
- @param Mem64Pool Pointer to instance of 64-bit memory resource node\r
- @param PMem64Pool Pointer to instance of 64-bit Pmemory resource node\r
- @param IoResStatus Status of I/O resource Node\r
- @param Mem32ResStatus Status of 32-bit memory resource Node\r
- @param PMem32ResStatus Status of 32-bit Pmemory resource node\r
- @param Mem64ResStatus Status of 64-bit memory resource node\r
- @param PMem64ResStatus Status of 64-bit Pmemory resource node\r
+ @param IoPool Pointer to instance of I/O resource Node.\r
+ @param Mem32Pool Pointer to instance of 32-bit memory resource Node.\r
+ @param PMem32Pool Pointer to instance of 32-bit Pmemory resource node.\r
+ @param Mem64Pool Pointer to instance of 64-bit memory resource node.\r
+ @param PMem64Pool Pointer to instance of 64-bit Pmemory resource node.\r
+ @param IoResStatus Status of I/O resource Node.\r
+ @param Mem32ResStatus Status of 32-bit memory resource Node.\r
+ @param PMem32ResStatus Status of 32-bit Pmemory resource node.\r
+ @param Mem64ResStatus Status of 64-bit memory resource node.\r
+ @param PMem64ResStatus Status of 64-bit Pmemory resource node.\r
**/\r
EFI_STATUS\r
PciHostBridgeAdjustAllocation (\r
Summary requests for all resource type, and contruct ACPI resource\r
requestor instance.\r
\r
- @param Bridge detecting bridge\r
- @param IoNode Pointer to instance of I/O resource Node\r
- @param Mem32Node Pointer to instance of 32-bit memory resource Node\r
- @param PMem32Node Pointer to instance of 32-bit Pmemory resource node\r
- @param Mem64Node Pointer to instance of 64-bit memory resource node\r
- @param PMem64Node Pointer to instance of 64-bit Pmemory resource node\r
- @param pConfig outof buffer holding new constructed APCI resource requestor\r
+ @param Bridge detecting bridge.\r
+ @param IoNode Pointer to instance of I/O resource Node.\r
+ @param Mem32Node Pointer to instance of 32-bit memory resource Node.\r
+ @param PMem32Node Pointer to instance of 32-bit Pmemory resource node.\r
+ @param Mem64Node Pointer to instance of 64-bit memory resource node.\r
+ @param PMem64Node Pointer to instance of 64-bit Pmemory resource node.\r
+ @param pConfig outof buffer holding new constructed APCI resource requestor.\r
**/\r
EFI_STATUS\r
ConstructAcpiResourceRequestor (\r
Get resource base from a acpi configuration descriptor.\r
\r
@param pConfig an acpi configuration descriptor.\r
- @param IoBase output of I/O resource base address\r
- @param Mem32Base output of 32-bit memory base address\r
- @param PMem32Base output of 32-bit pmemory base address\r
- @param Mem64Base output of 64-bit memory base address\r
- @param PMem64Base output of 64-bit pmemory base address\r
+ @param IoBase output of I/O resource base address.\r
+ @param Mem32Base output of 32-bit memory base address.\r
+ @param PMem32Base output of 32-bit pmemory base address.\r
+ @param Mem64Base output of 64-bit memory base address.\r
+ @param PMem64Base output of 64-bit pmemory base address.\r
\r
- @return EFI_SUCCESS Success operation\r
+ @return EFI_SUCCESS Success operation.\r
**/\r
EFI_STATUS\r
GetResourceBase (\r
Enumerate pci bridge, allocate resource and determine attribute\r
for devices on this bridge\r
\r
- @param BridgeDev Pointer to instance of bridge device\r
+ @param BridgeDev Pointer to instance of bridge device.\r
\r
- @retval EFI_SUCCESS Success operation\r
- @retval Others Fail to enumerate\r
+ @retval EFI_SUCCESS Success operation.\r
+ @retval Others Fail to enumerate.\r
**/\r
EFI_STATUS\r
PciBridgeEnumerator (\r
/**\r
Allocate all kinds of resource for bridge\r
\r
- @param Bridge Pointer to bridge instance\r
+ @param Bridge Pointer to bridge instance.\r
\r
@retval EFI_SUCCESS Success operation.\r
- @retval Others Fail to allocate resource for bridge\r
+ @retval Others Fail to allocate resource for bridge.\r
**/\r
EFI_STATUS\r
PciBridgeResourceAllocator (\r
/**\r
Get resource base address for a pci bridge device\r
\r
- @param Bridge Given Pci driver instance\r
- @param IoBase output for base address of I/O type resource\r
- @param Mem32Base output for base address of 32-bit memory type resource\r
- @param PMem32Base output for base address of 32-bit Pmemory type resource\r
- @param Mem64Base output for base address of 64-bit memory type resource\r
- @param PMem64Base output for base address of 64-bit Pmemory type resource\r
+ @param Bridge Given Pci driver instance.\r
+ @param IoBase output for base address of I/O type resource.\r
+ @param Mem32Base output for base address of 32-bit memory type resource.\r
+ @param PMem32Base output for base address of 32-bit Pmemory type resource.\r
+ @param Mem64Base output for base address of 64-bit memory type resource.\r
+ @param PMem64Base output for base address of 64-bit Pmemory type resource.\r
\r
- @retval EFI_SUCCESS Succes to get resource base address\r
+ @retval EFI_SUCCESS Succes to get resource base address.\r
**/\r
EFI_STATUS\r
GetResourceBaseFromBridge (\r
/**\r
Process Option Rom on this host bridge\r
\r
- @param PciResAlloc Pointer to instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL\r
+ @param PciResAlloc Pointer to instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.\r
\r
- @retval EFI_NOT_FOUND Can not find the root bridge instance\r
- @retval EFI_SUCCESS Success process\r
+ @retval EFI_NOT_FOUND Can not find the root bridge instance.\r
+ @retval EFI_SUCCESS Success process.\r
**/\r
EFI_STATUS\r
PciHostBridgeP2CProcess (\r
required here. This notification can be used to perform any chipsetspecific\r
programming.\r
\r
- @param[in] This The instance pointer of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL\r
+ @param[in] PciResAlloc The instance pointer of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL\r
@param[in] Phase The phase during enumeration\r
\r
@retval EFI_NOT_READY This phase cannot be entered at this time. For example, this error\r
@param This - A pointer to the hot plug request protocol.\r
@param Operation - The operation.\r
@param Controller - A pointer to the controller.\r
- @param RemainningDevicePath - A pointer to the device path.\r
+ @param RemainingDevicePath - A pointer to the device path.\r
@param NumberOfChildren - A the number of child handle in the ChildHandleBuffer.\r
@param ChildHandleBuffer - A pointer to the array contain the child handle.\r
\r
- @retval EFI_NOT_FOUND Can not find bridge according to controller handle\r
- @retval EFI_SUCCESS Success operating\r
+ @retval EFI_NOT_FOUND Can not find bridge according to controller handle.\r
+ @retval EFI_SUCCESS Success operating.\r
**/\r
EFI_STATUS\r
EFIAPI\r
/**\r
Search hostbridge according to given handle\r
\r
- @return whether found\r
+ @return whether found.\r
**/\r
BOOLEAN\r
SearchHostBridgeHandle (\r
/**\r
Add host bridge handle to global variable for enumating.\r
\r
- @param HostBridgeHandle host bridge handle\r
+ @param HostBridgeHandle host bridge handle.\r
**/\r
EFI_STATUS\r
AddHostBridgeEnumerator (\r
-/**@file\r
+/**@ file\r
\r
Copyright (c) 2006, Intel Corporation\r
All rights reserved. This program and the accompanying materials\r
/**\r
This routine is used to check whether the pci device is present.\r
\r
- @param PciRootBridgeIo Pointer to instance of EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL\r
- @param Pci Output buffer for PCI device structure\r
- @param Bus PCI bus NO\r
- @param Device PCI device NO\r
- @param Func PCI Func NO\r
+ @param PciRootBridgeIo Pointer to instance of EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+ @param Pci Output buffer for PCI device structure.\r
+ @param Bus PCI bus NO.\r
+ @param Device PCI device NO.\r
+ @param Func PCI Func NO.\r
\r
- @retval EFI_NOT_FOUND device not present\r
+ @retval EFI_NOT_FOUND device not present.\r
@retval EFI_SUCCESS device is found.\r
**/\r
EFI_STATUS\r
A database that records all the information about pci device subject to this\r
root bridge will then be created.\r
\r
- @param Bridge Parent bridge instance\r
- @param StartBusNumer Bus number of begining \r
+ @param Bridge Parent bridge instance.\r
+ @param StartBusNumer Bus number of begining. \r
**/\r
EFI_STATUS\r
PciPciDeviceInfoCollector (\r
/**\r
Seach required device and get PCI device info block\r
\r
- @param Bridge Parent bridge instance\r
- @param Pci Output of PCI device info block\r
+ @param Bridge Parent bridge instance.\r
+ @param Pci Output of PCI device info block.\r
@param Bus PCI bus NO.\r
@param Device PCI device NO.\r
@param Func PCI func NO.\r
- @param PciDevice output of searched PCI device instance\r
+ @param PciDevice output of searched PCI device instance.\r
**/\r
EFI_STATUS\r
PciSearchDevice (\r
}\r
}\r
\r
- if (!PciIoDevice) {\r
+ if (PciIoDevice == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
/**\r
Create PCI private data for PCI device\r
\r
- @param Bridge Parent bridge instance\r
+ @param Bridge Parent bridge instance.\r
@param Pci PCI bar block\r
@param Bus PCI device Bus NO.\r
@param Device PCI device DeviceNO.\r
Func\r
);\r
\r
- if (!PciIoDevice) {\r
+ if (PciIoDevice == NULL) {\r
return NULL;\r
}\r
\r
@param Device Bridge device's device NO.\r
@param Func Bridge device's func NO.\r
\r
- @return bridge device instance\r
+ @return bridge device instance.\r
**/\r
PCI_IO_DEVICE *\r
GatherPpbInfo (\r
Func\r
);\r
\r
- if (!PciIoDevice) {\r
+ if (PciIoDevice == NULL) {\r
return NULL;\r
}\r
\r
PciIoRead (PciIo, EfiPciIoWidthUint8, 0x1C, 1, &Value);\r
PciIoWrite (PciIo, EfiPciIoWidthUint8, 0x1C, 1, &Temp);\r
\r
- if (Value) {\r
- if (Value & 0x01) {\r
+ if (Value != 0) {\r
+ if ((Value & 0x01) != 0) {\r
PciIoDevice->Decodes |= EFI_BRIDGE_IO32_DECODE_SUPPORTED;\r
} else {\r
PciIoDevice->Decodes |= EFI_BRIDGE_IO16_DECODE_SUPPORTED;\r
@param Device hotplug bridge device's device NO.\r
@param Func hotplug bridge device's Func NO.\r
\r
- @return hotplug bridge device instance\r
+ @return hotplug bridge device instance.\r
**/\r
PCI_IO_DEVICE *\r
GatherP2CInfo (\r
Func\r
);\r
\r
- if (!PciIoDevice) {\r
+ if (PciIoDevice == NULL) {\r
return NULL;\r
}\r
\r
/**\r
Create device path for pci deivce\r
\r
- @param ParentDevicePath Parent bridge's path\r
- @param PciIoDevice Pci device instance\r
+ @param ParentDevicePath Parent bridge's path.\r
+ @param PciIoDevice Pci device instance.\r
\r
@return device path protocol instance for specific pci device.\r
**/\r
/**\r
Test whether the device can support attributes \r
\r
- @param PciIoDevice Pci device instance\r
+ @param PciIoDevice Pci device instance.\r
@param Command Command register value.\r
@param BridgeControl Bridge control value for PPB or P2C.\r
- @param OldCommand Old command register offset\r
+ @param OldCommand Old command register offset.\r
@param OldBridgeControl Old Bridge control value for PPB or P2C.\r
\r
- @return EFI_SUCCESS\r
+ @return EFI_SUCCESS.\r
**/\r
EFI_STATUS\r
PciTestSupportedAttribute (\r
\r
Attributes = 0;\r
\r
- if (Command & EFI_PCI_COMMAND_IO_SPACE) {\r
+ if ((Command & EFI_PCI_COMMAND_IO_SPACE) != 0) {\r
Attributes |= EFI_PCI_IO_ATTRIBUTE_IO;\r
}\r
\r
- if (Command & EFI_PCI_COMMAND_MEMORY_SPACE) {\r
+ if ((Command & EFI_PCI_COMMAND_MEMORY_SPACE) != 0) {\r
Attributes |= EFI_PCI_IO_ATTRIBUTE_MEMORY;\r
}\r
\r
- if (Command & EFI_PCI_COMMAND_BUS_MASTER) {\r
+ if ((Command & EFI_PCI_COMMAND_BUS_MASTER) != 0) {\r
Attributes |= EFI_PCI_IO_ATTRIBUTE_BUS_MASTER;\r
}\r
\r
- if (Command & EFI_PCI_COMMAND_VGA_PALETTE_SNOOP) {\r
+ if ((Command & EFI_PCI_COMMAND_VGA_PALETTE_SNOOP) != 0) {\r
Attributes |= EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO;\r
}\r
\r
- if (BridgeControl & EFI_PCI_BRIDGE_CONTROL_ISA) {\r
+ if ((BridgeControl & EFI_PCI_BRIDGE_CONTROL_ISA) != 0) {\r
Attributes |= EFI_PCI_IO_ATTRIBUTE_ISA_IO;\r
}\r
\r
- if (BridgeControl & EFI_PCI_BRIDGE_CONTROL_VGA) {\r
+ if ((BridgeControl & EFI_PCI_BRIDGE_CONTROL_VGA) != 0) {\r
Attributes |= EFI_PCI_IO_ATTRIBUTE_VGA_IO;\r
Attributes |= EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY;\r
Attributes |= EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO;\r
}\r
\r
- if (BridgeControl & EFI_PCI_BRIDGE_CONTROL_VGA_16) {\r
+ if ((BridgeControl & EFI_PCI_BRIDGE_CONTROL_VGA_16) != 0) {\r
Attributes |= EFI_PCI_IO_ATTRIBUTE_VGA_IO_16;\r
Attributes |= EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16;\r
}\r
EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM |\r
EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE;\r
\r
- if (Attributes & EFI_PCI_IO_ATTRIBUTE_IO) {\r
+ if ((Attributes & EFI_PCI_IO_ATTRIBUTE_IO) != 0) {\r
Attributes |= EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO;\r
Attributes |= EFI_PCI_IO_ATTRIBUTE_ISA_IO;\r
}\r
}\r
\r
/**\r
- Determine if the device can support Fast Back to Back attribute\r
+ Determine if the device can support Fast Back to Back attribute.\r
\r
- @param PciIoDevice Pci device instance\r
- @param StatusIndex Status register value\r
+ @param PciIoDevice Pci device instance.\r
+ @param StatusIndex Status register value.\r
**/\r
EFI_STATUS\r
GetFastBackToBackSupport (\r
//\r
// Check the Fast B2B bit\r
//\r
- if (StatusRegister & EFI_PCI_FAST_BACK_TO_BACK_CAPABLE) {\r
+ if ((StatusRegister & EFI_PCI_FAST_BACK_TO_BACK_CAPABLE) != 0) {\r
return EFI_SUCCESS;\r
} else {\r
return EFI_UNSUPPORTED;\r
Process the option ROM for all the children of the specified parent PCI device.\r
It can only be used after the first full Option ROM process.\r
\r
- @param PciIoDevice Pci device instance\r
+ @param PciIoDevice Pci device instance.\r
\r
@retval EFI_SUCCESS Success Operation.\r
**/\r
// For RootBridge, PPB , P2C, go recursively to traverse all its children\r
//\r
CurrentLink = PciIoDevice->ChildList.ForwardLink;\r
- while (CurrentLink && CurrentLink != &PciIoDevice->ChildList) {\r
+ while (CurrentLink != NULL && CurrentLink != &PciIoDevice->ChildList) {\r
\r
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
\r
/**\r
Determine the related attributes of all devices under a Root Bridge\r
\r
- @param PciIoDevice PCI device instance\r
+ @param PciIoDevice PCI device instance.\r
\r
**/\r
EFI_STATUS\r
// For Root Bridge, just copy it by RootBridgeIo proctocol\r
// so as to keep consistent with the actual attribute\r
//\r
- if (!PciIoDevice->Parent) {\r
+ if (PciIoDevice->Parent == NULL) {\r
Status = PciIoDevice->PciRootBridgeIo->GetAttributes (\r
PciIoDevice->PciRootBridgeIo,\r
&PciIoDevice->Supports,\r
// For RootBridge, PPB , P2C, go recursively to traverse all its children\r
//\r
CurrentLink = PciIoDevice->ChildList.ForwardLink;\r
- while (CurrentLink && CurrentLink != &PciIoDevice->ChildList) {\r
+ while (CurrentLink != NULL && CurrentLink != &PciIoDevice->ChildList) {\r
\r
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
Status = DetermineDeviceAttribute (Temp);\r
}\r
\r
CurrentLink = PciIoDevice->ChildList.ForwardLink;\r
- while (CurrentLink && CurrentLink != &PciIoDevice->ChildList) {\r
+ while (CurrentLink != NULL && CurrentLink != &PciIoDevice->ChildList) {\r
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
if (FastB2BSupport) {\r
PciEnableCommandRegister (Temp, EFI_PCI_COMMAND_FAST_BACK_TO_BACK);\r
/**\r
This routine is used to update the bar information for those incompatible PCI device\r
\r
- @param PciIoDevice Pci device instance\r
- @return EFI_UNSUPPORTED failed to update Pci Info\r
+ @param PciIoDevice Pci device instance.\r
+ @return EFI_UNSUPPORTED failed to update Pci Info.\r
**/\r
EFI_STATUS\r
UpdatePciInfo (\r
/**\r
This routine will update the alignment with the new alignment\r
\r
- @param Alignment old alignment\r
- @param NewAlignment new alignment\r
+ @param Alignment old alignment.\r
+ @param NewAlignment new alignment.\r
\r
**/\r
VOID\r
// Adjust the alignment to even, quad or double quad boundary\r
//\r
if (NewAlignment == PCI_BAR_EVEN_ALIGN) {\r
- if (OldAlignment & 0x01) {\r
+ if ((OldAlignment & 0x01) != 0) {\r
OldAlignment = OldAlignment + 2 - (OldAlignment & 0x01);\r
}\r
} else if (NewAlignment == PCI_BAR_SQUAD_ALIGN) {\r
- if (OldAlignment & 0x03) {\r
+ if ((OldAlignment & 0x03) != 0) {\r
OldAlignment = OldAlignment + 4 - (OldAlignment & 0x03);\r
}\r
} else if (NewAlignment == PCI_BAR_DQUAD_ALIGN) {\r
- if (OldAlignment & 0x07) {\r
+ if ((OldAlignment & 0x07) != 0) {\r
OldAlignment = OldAlignment + 8 - (OldAlignment & 0x07);\r
}\r
}\r
/**\r
Parse PCI bar bit.\r
\r
- @param PciIoDevice Pci device instance\r
- @param Offset bar offset\r
- @param BarIndex bar index\r
+ @param PciIoDevice Pci device instance.\r
+ @param Offset bar offset.\r
+ @param BarIndex bar index.\r
\r
@return next bar offset.\r
**/\r
}\r
\r
PciIoDevice->PciBar[BarIndex].Offset = (UINT8) Offset;\r
- if (Value & 0x01) {\r
+ if ((Value & 0x01) != 0) {\r
//\r
// Device I/Os\r
//\r
Mask = 0xfffffffc;\r
\r
- if (Value & 0xFFFF0000) {\r
+ if ((Value & 0xFFFF0000) != 0) {\r
//\r
// It is a IO32 bar\r
//\r
//memory space; anywhere in 32 bit address space\r
//\r
case 0x00:\r
- if (Value & 0x08) {\r
+ if ((Value & 0x08) != 0) {\r
PciIoDevice->PciBar[BarIndex].BarType = PciBarTypePMem32;\r
} else {\r
PciIoDevice->PciBar[BarIndex].BarType = PciBarTypeMem32;\r
// memory space; anywhere in 64 bit address space\r
//\r
case 0x04:\r
- if (Value & 0x08) {\r
+ if ((Value & 0x08) != 0) {\r
PciIoDevice->PciBar[BarIndex].BarType = PciBarTypePMem64;\r
} else {\r
PciIoDevice->PciBar[BarIndex].BarType = PciBarTypeMem64;\r
}\r
\r
/**\r
- This routine is used to initialize the bar of a PCI device\r
- It can be called typically when a device is going to be rejected\r
+ This routine is used to initialize the bar of a PCI device.\r
+ It can be called typically when a device is going to be rejected.\r
\r
- @param PciIoDevice Pci device instance\r
+ @param PciIoDevice Pci device instance.\r
**/\r
EFI_STATUS\r
InitializePciDevice (\r
/**\r
Init PPB for bridge device\r
\r
- @param PciIoDevice Pci device instance\r
+ @param PciIoDevice Pci device instance.\r
**/\r
EFI_STATUS\r
InitializePpb (\r
/**\r
Init private data for Hotplug bridge device\r
\r
- @param PciIoDevice hotplug bridge device\r
+ @param PciIoDevice hotplug bridge device.\r
**/\r
EFI_STATUS\r
InitializeP2C (\r
Create and initiliaze general PCI I/O device instance for\r
PCI device/bridge device/hotplug bridge device.\r
\r
- @param PciRootBridgeIo Pointer to instance of EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL\r
- @param Pci Pci bar block\r
+ @param PciRootBridgeIo Pointer to instance of EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+ @param Pci Pci bar block.\r
@param Bus device Bus NO.\r
@param Device device device NO.\r
@param Func device func NO.\r
\r
- @return instance of PCI device\r
+ @return instance of PCI device.\r
**/\r
PCI_IO_DEVICE *\r
CreatePciIoDevice (\r
in a given platform\r
It is only called on the second start on the same Root Bridge.\r
\r
- @param Controller Parent bridge handler\r
+ @param Controller Parent bridge handler.\r
\r
@return status of operation.\r
**/\r
//\r
RootBridgeDev = CreateRootBridge (Controller);\r
\r
- if (!RootBridgeDev) {\r
+ if (RootBridgeDev == NULL) {\r
Descriptors++;\r
continue;\r
}\r
/**\r
This routine can be used to check whether a PCI device should be rejected when light enumeration\r
\r
- @param PciIoDevice Pci device instance\r
+ @param PciIoDevice Pci device instance.\r
\r
- @retval TRUE This device should be rejected\r
- @retval FALSE This device shouldn't be rejected\r
+ @retval TRUE This device should be rejected.\r
+ @retval FALSE This device shouldn't be rejected.\r
\r
**/\r
BOOLEAN\r
continue;\r
}\r
\r
- if (TestValue & 0x01) {\r
+ if ((TestValue & 0x01) != 0) {\r
\r
//\r
// IO Bar\r
/**\r
Reset and all bus number from specific bridge.\r
\r
- @param Bridge Parent specific bridge\r
- @param StartBusNumber start bus number\r
+ @param Bridge Parent specific bridge.\r
+ @param StartBusNumber start bus number.\r
**/\r
EFI_STATUS\r
ResetAllPpbBusNumber (\r
-/**@file\r
+/**@ file\r
\r
Copyright (c) 2006, Intel Corporation \r
All rights reserved. This program and the accompanying materials \r
@param Device Bridge device's device NO.\r
@param Func Bridge device's func NO.\r
\r
- @return bridge device instance\r
+ @return bridge device instance.\r
**/\r
PCI_IO_DEVICE *\r
GatherPpbInfo (\r
/**\r
Create device path for pci deivce\r
\r
- @param ParentDevicePath Parent bridge's path\r
- @param PciIoDevice Pci device instance\r
+ @param ParentDevicePath Parent bridge's path.\r
+ @param PciIoDevice Pci device instance.\r
\r
@return device path protocol instance for specific pci device.\r
**/\r
@param OldCommand Old command register offset\r
@param OldBridgeControl Old Bridge control value for PPB or P2C.\r
\r
- @return EFI_SUCCESS\r
+ @return EFI_SUCCESS.\r
**/\r
EFI_STATUS\r
PciTestSupportedAttribute (\r
/**\r
Determine if the device can support Fast Back to Back attribute\r
\r
- @param PciIoDevice Pci device instance\r
- @param StatusIndex Status register value\r
+ @param PciIoDevice Pci device instance.\r
+ @param StatusIndex Status register value.\r
**/\r
EFI_STATUS\r
GetFastBackToBackSupport (\r
/**\r
Determine the related attributes of all devices under a Root Bridge\r
\r
- @param PciIoDevice PCI device instance\r
+ @param PciIoDevice PCI device instance.\r
\r
**/\r
EFI_STATUS\r
/**\r
This routine is used to update the bar information for those incompatible PCI device\r
\r
- @param PciIoDevice Pci device instance\r
- @return EFI_UNSUPPORTED failed to update Pci Info\r
+ @param PciIoDevice Pci device instance.\r
+ @return EFI_UNSUPPORTED failed to update Pci Info.\r
**/\r
EFI_STATUS\r
UpdatePciInfo (\r
/**\r
This routine will update the alignment with the new alignment\r
\r
- @param Alignment old alignment\r
- @param NewAlignment new alignment\r
+ @param Alignment old alignment.\r
+ @param NewAlignment new alignment.\r
\r
**/\r
VOID\r
/**\r
Parse PCI bar bit.\r
\r
- @param PciIoDevice Pci device instance\r
- @param Offset bar offset\r
- @param BarIndex bar index\r
+ @param PciIoDevice Pci device instance.\r
+ @param Offset bar offset.\r
+ @param BarIndex bar index.\r
\r
@return next bar offset.\r
**/\r
\r
/**\r
This routine is used to initialize the bar of a PCI device\r
- It can be called typically when a device is going to be rejected\r
+ It can be called typically when a device is going to be rejected.\r
\r
- @param PciIoDevice Pci device instance\r
+ @param PciIoDevice Pci device instance.\r
**/\r
EFI_STATUS\r
InitializePciDevice (\r
/**\r
Init PPB for bridge device\r
\r
- @param PciIoDevice Pci device instance\r
+ @param PciIoDevice Pci device instance.\r
**/\r
EFI_STATUS\r
InitializePpb (\r
/**\r
Init private data for Hotplug bridge device\r
\r
- @param PciIoDevice hotplug bridge device\r
+ @param PciIoDevice hotplug bridge device.\r
**/\r
EFI_STATUS\r
InitializeP2C (\r
Create and initiliaze general PCI I/O device instance for\r
PCI device/bridge device/hotplug bridge device.\r
\r
- @param PciRootBridgeIo Pointer to instance of EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL\r
+ @param PciRootBridgeIo Pointer to instance of EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
@param Pci Pci bar block\r
@param Bus device Bus NO.\r
@param Device device device NO.\r
@param Func device func NO.\r
\r
- @return instance of PCI device\r
+ @return instance of PCI device.\r
**/\r
PCI_IO_DEVICE *\r
CreatePciIoDevice (\r
in a given platform\r
It is only called on the second start on the same Root Bridge.\r
\r
- @param Controller Parent bridge handler\r
+ @param Controller Parent bridge handler.\r
\r
@return status of operation.\r
**/\r
/**\r
This routine can be used to check whether a PCI device should be rejected when light enumeration\r
\r
- @param PciIoDevice Pci device instance\r
+ @param PciIoDevice Pci device instance.\r
\r
- @retval TRUE This device should be rejected\r
- @retval FALSE This device shouldn't be rejected\r
+ @retval TRUE This device should be rejected.\r
+ @retval FALSE This device shouldn't be rejected.\r
\r
**/\r
BOOLEAN\r
-/**@file\r
+/**@ file\r
This module provide support function for hot plug device.\r
\r
Copyright (c) 2006, Intel Corporation \r
/**\r
Compare two device path\r
\r
- @param DevicePath1 the first device path want to be compared\r
- @param DevicePath2 the first device path want to be compared\r
+ @param DevicePath1 the first device path want to be compared.\r
+ @param DevicePath2 the first device path want to be compared.\r
\r
- @retval TRUE equal\r
- @retval FALSE different\r
+ @retval TRUE equal.\r
+ @retval FALSE different.\r
**/\r
BOOLEAN\r
EfiCompareDevicePath (\r
/**\r
Test whether device path is for root pci hot plug bus\r
\r
- @param HpbdevicePath tested device path\r
+ @param HpbdevicePath tested device path.\r
@param HpIndex Return the index of root hot plug in global array.\r
\r
- @retval TRUE device path is for root pci hot plug\r
- @retval FALSE device path is not for root pci hot plug\r
+ @retval TRUE device path is for root pci hot plug.\r
+ @retval FALSE device path is not for root pci hot plug.\r
**/\r
BOOLEAN\r
IsRootPciHotPlugBus (\r
/**\r
Test whether device path is for root pci hot plug controller\r
\r
- @param HpbdevicePath tested device path\r
+ @param HpbdevicePath tested device path.\r
@param HpIndex Return the index of root hot plug in global array.\r
\r
- @retval TRUE device path is for root pci hot plug controller\r
- @retval FALSE device path is not for root pci hot plug controller\r
+ @retval TRUE device path is for root pci hot plug controller.\r
+ @retval FALSE device path is not for root pci hot plug controller.\r
**/\r
BOOLEAN\r
IsRootPciHotPlugController (\r
/**\r
Wrapper for creating event object for HPC \r
\r
- @param HpIndex index of hot plug device in global array\r
- @param Event event object\r
+ @param HpIndex index of hot plug device in global array.\r
+ @param Event event object.\r
\r
- @return status of create event invoken\r
+ @return status of create event invoken.\r
**/\r
EFI_STATUS\r
CreateEventForHpc (\r
/**\r
Wait for all root HPC initialized.\r
\r
- @param TimeoutInMicroSeconds microseconds to wait for all root hpc's initialization\r
+ @param TimeoutInMicroSeconds microseconds to wait for all root hpc's initialization.\r
**/\r
EFI_STATUS\r
AllRootHPCInitialized (\r
\r
Delay--;\r
\r
- } while (Delay);\r
+ } while (Delay > 0);\r
\r
return EFI_TIMEOUT;\r
}\r
/**\r
Check HPC capability register block\r
\r
- @param PciIoDevice PCI device instance\r
+ @param PciIoDevice PCI device instance.\r
\r
- @retval EFI_SUCCESS PCI device is HPC\r
- @retval EFI_NOT_FOUND PCI device is not HPC\r
+ @retval EFI_SUCCESS PCI device is HPC.\r
+ @retval EFI_NOT_FOUND PCI device is not HPC.\r
**/\r
EFI_STATUS\r
IsSHPC (\r
EFI_STATUS Status;\r
UINT8 Offset;\r
\r
- if (!PciIoDevice) {\r
+ if (PciIoDevice == NULL) {\r
return EFI_NOT_FOUND;\r
}\r
\r
return Status;\r
}\r
\r
- if ((State & EFI_HPC_STATE_ENABLED) && (State & EFI_HPC_STATE_INITIALIZED)) {\r
+ if ((State & EFI_HPC_STATE_ENABLED) != 0 && (State & EFI_HPC_STATE_INITIALIZED) != 0) {\r
PciIoDevice->ResourcePaddingDescriptors = Descriptors;\r
PciIoDevice->PaddingAttributes = Attributes;\r
}\r
/**\r
Test whether PCI device is hot plug bus.\r
\r
- @param PciIoDevice PCI device instance\r
+ @param PciIoDevice PCI device instance.\r
\r
- @retval EFI_SUCCESS PCI device is hot plug bus\r
- @retval EFI_NOT_FOUND PCI device is not hot plug bus\r
+ @retval EFI_SUCCESS PCI device is hot plug bus.\r
+ @retval EFI_NOT_FOUND PCI device is not hot plug bus.\r
**/\r
EFI_STATUS\r
IsPciHotPlugBus (\r
-/**@file\r
+/**@ file\r
\r
Copyright (c) 2006, Intel Corporation \r
All rights reserved. This program and the accompanying materials \r
/**\r
Compare two device path\r
\r
- @param DevicePath1 the first device path want to be compared\r
- @param DevicePath2 the first device path want to be compared\r
+ @param DevicePath1 the first device path want to be compared.\r
+ @param DevicePath2 the first device path want to be compared.\r
\r
- @retval TRUE equal\r
- @retval FALSE different\r
+ @retval TRUE equal.\r
+ @retval FALSE different.\r
**/\r
BOOLEAN\r
EfiCompareDevicePath (\r
/**\r
Test whether PCI device is hot plug bus.\r
\r
- @param PciIoDevice PCI device instance\r
+ @param PciIoDevice PCI device instance.\r
\r
- @retval EFI_SUCCESS PCI device is hot plug bus\r
- @retval EFI_NOT_FOUND PCI device is not hot plug bus\r
+ @retval EFI_SUCCESS PCI device is hot plug bus.\r
+ @retval EFI_NOT_FOUND PCI device is not hot plug bus.\r
**/\r
EFI_STATUS\r
IsPciHotPlugBus (\r
/**\r
Test whether device path is for root pci hot plug bus\r
\r
- @param HpbdevicePath tested device path\r
+ @param HpbDevicePath tested device path\r
@param HpIndex Return the index of root hot plug in global array.\r
\r
@retval TRUE device path is for root pci hot plug\r
/**\r
Test whether device path is for root pci hot plug controller\r
\r
- @param HpbdevicePath tested device path\r
+ @param HpcDevicePath tested device path.\r
@param HpIndex Return the index of root hot plug in global array.\r
\r
- @retval TRUE device path is for root pci hot plug controller\r
- @retval FALSE device path is not for root pci hot plug controller\r
+ @retval TRUE device path is for root pci hot plug controller.\r
+ @retval FALSE device path is not for root pci hot plug controller.\r
**/\r
BOOLEAN\r
IsRootPciHotPlugController (\r
/**\r
Wrapper for creating event object for HPC \r
\r
- @param HpIndex index of hot plug device in global array\r
- @param Event event object\r
+ @param HpIndex index of hot plug device in global array.\r
+ @param Event event object.\r
\r
- @return status of create event invoken\r
+ @return status of create event invoken.\r
**/\r
EFI_STATUS\r
CreateEventForHpc (\r
/**\r
Wait for all root HPC initialized.\r
\r
- @param TimeoutInMicroSeconds microseconds to wait for all root hpc's initialization\r
+ @param TimeoutInMicroSeconds microseconds to wait for all root hpc's initialization.\r
**/\r
EFI_STATUS\r
AllRootHPCInitialized (\r
/**\r
Check HPC capability register block\r
\r
- @param PciIoDevice PCI device instance\r
+ @param PciIoDevice PCI device instance.\r
\r
- @retval EFI_SUCCESS PCI device is HPC\r
- @retval EFI_NOT_FOUND PCI device is not HPC\r
+ @retval EFI_SUCCESS PCI device is HPC.\r
+ @retval EFI_NOT_FOUND PCI device is not HPC.\r
**/\r
EFI_STATUS\r
IsSHPC (\r
/**\r
Get resource padding for hot plug bus\r
\r
- @param PciIoDevice PCI device instance\r
+ @param PciIoDevice PCI device instance.\r
\r
- @retval EFI_SUCCESS success get padding and set it into PCI device instance\r
+ @retval EFI_SUCCESS success get padding and set it into PCI device instance.\r
@retval EFI_NOT_FOUND PCI device is not a hot plug bus.\r
**/\r
EFI_STATUS\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
- if (PciIoDevice->Attributes & EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE) {\r
+ if ((PciIoDevice->Attributes & EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE) != 0) {\r
Operation = (EFI_PCI_IO_PROTOCOL_OPERATION) (Operation + EfiPciOperationBusMasterRead64);\r
}\r
\r
EFI_STATUS Status;\r
PCI_IO_DEVICE *PciIoDevice;\r
\r
- if (Attributes &\r
- (~(EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE | EFI_PCI_ATTRIBUTE_MEMORY_CACHED))) {\r
+ if ((Attributes &\r
+ (~(EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE | EFI_PCI_ATTRIBUTE_MEMORY_CACHED))) != 0){\r
return EFI_UNSUPPORTED;\r
}\r
\r
PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);\r
\r
- if (PciIoDevice->Attributes & EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE) {\r
+ if ((PciIoDevice->Attributes & EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE) != 0) {\r
Attributes |= EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE;\r
}\r
\r
//\r
// Call the PCI Root Bridge to attempt to modify the attributes\r
//\r
- if (NewPciRootBridgeAttributes ^ PciRootBridgeAttributes) {\r
+ if ((NewPciRootBridgeAttributes ^ PciRootBridgeAttributes) != 0) {\r
\r
Status = PciIoDevice->PciRootBridgeIo->SetAttributes (\r
PciIoDevice->PciRootBridgeIo,\r
//\r
Temp = ActiveVGADeviceOnTheSameSegment (PciIoDevice);\r
\r
- if (!Temp) {\r
+ if (Temp == NULL) {\r
//\r
// If there is no VGA device on the segement, set\r
// this graphics card to decode the palette range\r
// If they are on the same bus, either one can\r
// be set to snoop, the other set to decode\r
//\r
- if (VGACommand & EFI_PCI_COMMAND_VGA_PALETTE_SNOOP) {\r
+ if ((VGACommand & EFI_PCI_COMMAND_VGA_PALETTE_SNOOP) != 0) {\r
//\r
// VGA has set to snoop, so GFX can be only set to disable snoop\r
//\r
//\r
// For Root Bridge, just call RootBridgeIo to set attributes;\r
//\r
- if (!PciIoDevice->Parent) {\r
+ if (PciIoDevice->Parent == NULL) {\r
Status = ModifyRootBridgeAttributes (PciIoDevice, Attributes, Operation);\r
return Status;\r
}\r
//\r
// Check VGA and VGA16, they can not be set at the same time\r
//\r
- if (((Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_IO) &&\r
- (Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_IO_16)) ||\r
- ((Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_IO) &&\r
- (Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16)) ||\r
- ((Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO) &&\r
- (Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_IO_16)) ||\r
- ((Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO) &&\r
- (Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16)) ) {\r
+ if (((Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_IO) != 0 &&\r
+ (Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_IO_16) != 0) ||\r
+ ((Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_IO) != 0 &&\r
+ (Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16) != 0) ||\r
+ ((Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO) != 0 &&\r
+ (Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_IO_16) != 0) ||\r
+ ((Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO) != 0 &&\r
+ (Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16) != 0) ) {\r
return EFI_UNSUPPORTED;\r
}\r
\r
//\r
if (IS_PCI_BRIDGE (&PciIoDevice->Pci) || IS_CARDBUS_BRIDGE (&PciIoDevice->Pci)) {\r
\r
- if (Attributes & (EFI_PCI_IO_ATTRIBUTE_VGA_IO | EFI_PCI_IO_ATTRIBUTE_VGA_IO_16)) {\r
+ if ((Attributes & (EFI_PCI_IO_ATTRIBUTE_VGA_IO | EFI_PCI_IO_ATTRIBUTE_VGA_IO_16)) != 0) {\r
BridgeControl |= EFI_PCI_BRIDGE_CONTROL_VGA;\r
}\r
\r
- if (Attributes & EFI_PCI_IO_ATTRIBUTE_ISA_IO) {\r
+ if ((Attributes & EFI_PCI_IO_ATTRIBUTE_ISA_IO) != 0) {\r
BridgeControl |= EFI_PCI_BRIDGE_CONTROL_ISA;\r
}\r
\r
- if (Attributes & (EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO | EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16)) {\r
+ if ((Attributes & (EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO | EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16)) != 0) {\r
Command |= EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO;\r
}\r
\r
- if (Attributes & (EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16 | EFI_PCI_IO_ATTRIBUTE_VGA_IO_16)) {\r
+ if ((Attributes & (EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16 | EFI_PCI_IO_ATTRIBUTE_VGA_IO_16)) != 0) {\r
BridgeControl |= EFI_PCI_BRIDGE_CONTROL_VGA_16;\r
}\r
\r
// Do with the attributes on VGA\r
// Only for VGA's legacy resource, we just can enable once.\r
//\r
- if (Attributes &\r
+ if ((Attributes &\r
(EFI_PCI_IO_ATTRIBUTE_VGA_IO |\r
EFI_PCI_IO_ATTRIBUTE_VGA_IO_16 |\r
- EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY)) {\r
+ EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY)) != 0) {\r
//\r
// Check if a VGA has been enabled before enabling a new one\r
//\r
//\r
// Do with the attributes on GFX\r
//\r
- if (Attributes & (EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO | EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16)) {\r
+ if ((Attributes & (EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO | EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16)) != 0) {\r
\r
if (Operation == EfiPciIoAttributeOperationEnable) {\r
//\r
}\r
}\r
\r
- if (Attributes & EFI_PCI_IO_ATTRIBUTE_IO) {\r
+ if ((Attributes & EFI_PCI_IO_ATTRIBUTE_IO) != 0) {\r
Command |= EFI_PCI_COMMAND_IO_SPACE;\r
}\r
\r
- if (Attributes & EFI_PCI_IO_ATTRIBUTE_MEMORY) {\r
+ if ((Attributes & EFI_PCI_IO_ATTRIBUTE_MEMORY) != 0) {\r
Command |= EFI_PCI_COMMAND_MEMORY_SPACE;\r
}\r
\r
- if (Attributes & EFI_PCI_IO_ATTRIBUTE_BUS_MASTER) {\r
+ if ((Attributes & EFI_PCI_IO_ATTRIBUTE_BUS_MASTER) != 0) {\r
Command |= EFI_PCI_COMMAND_BUS_MASTER;\r
}\r
//\r
-/**@file\r
+/** @file\r
\r
Copyright (c) 2006, Intel Corporation \r
All rights reserved. This program and the accompanying materials \r
@param Count The number of memory or I/O operations to perform.\r
@param Offset The offset within the PCI configuration space for the PCI controller.\r
\r
- @retval EFI_INVALID_PARAMETER Invalid Width\r
- @retval EFI_UNSUPPORTED Offset overflow\r
- @retval EFI_SUCCESS Success operation\r
+ @retval EFI_INVALID_PARAMETER Invalid Width.\r
+ @retval EFI_UNSUPPORTED Offset overflow.\r
+ @retval EFI_SUCCESS Success operation.\r
**/\r
EFI_STATUS\r
PciIoVerifyConfigAccess (\r
-/**@file\r
+/** @file\r
\r
PCI Bus Driver Lib file\r
It abstracts some functions that can be different\r
\r
CurrentLink = Bridge->ChildList.ForwardLink;\r
\r
- while (CurrentLink && CurrentLink != &Bridge->ChildList) {\r
+ while (CurrentLink != NULL && CurrentLink != &Bridge->ChildList) {\r
\r
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
\r
\r
@retval EFI_SUCCESS Success\r
**/\r
-\r
EFI_STATUS\r
PciHostBridgeResourceAllocator_WithHotPlugDeviceSupport (\r
IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc\r
// Ensure the device is enabled and initialized\r
//\r
if ((Attributes == EfiPaddingPciRootBridge) &&\r
- (State & EFI_HPC_STATE_ENABLED) &&\r
- (State & EFI_HPC_STATE_INITIALIZED) ) {\r
+ (State & EFI_HPC_STATE_ENABLED) != 0 &&\r
+ (State & EFI_HPC_STATE_INITIALIZED) != 0) {\r
*PaddedBusRange = (UINT8) ((UINT8) (BusRange) +*PaddedBusRange);\r
} else {\r
*SubBusNumber = (UINT8) ((UINT8) (BusRange) +*SubBusNumber);\r
\r
CurrentLink = Bridge->ChildList.ForwardLink;\r
\r
- while (CurrentLink && CurrentLink != &Bridge->ChildList) {\r
+ while (CurrentLink != NULL && CurrentLink != &Bridge->ChildList) {\r
\r
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
\r
if (IS_CARDBUS_BRIDGE (&Temp->Pci)) {\r
\r
- if (gPciHotPlugInit && Temp->Allocated) {\r
+ if (gPciHotPlugInit != NULL && Temp->Allocated) {\r
\r
//\r
// Raise the EFI_IOB_PCI_HPC_INIT status code\r
Install protocol gEfiPciHotPlugRequestProtocolGuid\r
@param Status return status of protocol installation.\r
**/\r
-void\r
+VOID\r
InstallHotPlugRequestProtocol (\r
IN EFI_STATUS *Status\r
);\r
\r
Aperture = 0;\r
\r
- if (!Bridge) {\r
+ if (Bridge == NULL) {\r
return EFI_SUCCESS;\r
}\r
\r
//\r
offset = Aperture & (Node->Alignment);\r
\r
- if (offset) {\r
+ if (offset != 0) {\r
\r
Aperture = Aperture + (Node->Alignment + 1) - offset;\r
\r
Node->Length \r
);\r
offset = Aperture & (Node->Alignment);\r
- if (offset) {\r
+ if (offset != 0) {\r
Aperture = Aperture + (Node->Alignment + 1) - offset;\r
}\r
} else if (VGAEnable) {\r
Node->Length\r
);\r
offset = Aperture & (Node->Alignment);\r
- if (offset) {\r
+ if (offset != 0) {\r
Aperture = Aperture + (Node->Alignment + 1) - offset;\r
}\r
}\r
//\r
offset = Aperture & (Bridge->Alignment);\r
\r
- if (offset) {\r
+ if (offset != 0) {\r
Aperture = Aperture + (Bridge->Alignment + 1) - offset;\r
}\r
\r
\r
Aperture = 0;\r
\r
- if (!Bridge) {\r
+ if (Bridge == NULL) {\r
return EFI_SUCCESS;\r
}\r
\r
\r
offset = Aperture & (Node->Alignment);\r
\r
- if (offset) {\r
+ if (offset != 0) {\r
\r
Aperture = Aperture + (Node->Alignment + 1) - offset;\r
\r
// alignment\r
//\r
offset = Aperture & (Bridge->Alignment);\r
- if (offset) {\r
+ if (offset != 0) {\r
Aperture = Aperture + (Bridge->Alignment + 1) - offset;\r
}\r
\r
\r
CurrentLink = Bridge->ChildList.ForwardLink;\r
\r
- while (CurrentLink && CurrentLink != &Bridge->ChildList) {\r
+ while (CurrentLink != NULL && CurrentLink != &Bridge->ChildList) {\r
\r
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
\r
// \r
HasOprom = FALSE;\r
CurrentLink = Bridge->ChildList.ForwardLink;\r
- while (CurrentLink && CurrentLink != &Bridge->ChildList) {\r
+ while (CurrentLink != NULL && CurrentLink != &Bridge->ChildList) {\r
\r
Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
if (Temp->RomSize != 0) {\r
)\r
{\r
\r
- if ((Bridge->Decodes) & Decode) {\r
+ if (((Bridge->Decodes) & Decode) != 0) {\r
return TRUE;\r
}\r
\r
//\r
Parent = PciDevice->Parent;\r
ZeroMem (&Node, sizeof (Node));\r
- while (Parent) {\r
+ while (Parent != NULL) {\r
if (!IS_PCI_BRIDGE (&Parent->Pci)) {\r
break;\r
}\r
IN PCI_IO_DEVICE *PciIoDevice\r
)\r
{\r
- if (gPciHotPlugInit) {\r
+ if (gPciHotPlugInit != NULL) {\r
if (PciIoDevice->ResourcePaddingDescriptors == NULL) {\r
GetResourcePaddingForHpb (PciIoDevice);\r
}\r