TianoCore EDK2 master
Loading...
Searching...
No Matches
PciCommand.c File Reference
#include "PciBus.h"

Go to the source code of this file.

Functions

EFI_STATUS PciOperateRegister (IN PCI_IO_DEVICE *PciIoDevice, IN UINT16 Command, IN UINT8 Offset, IN UINT8 Operation, OUT UINT16 *PtrCommand)
 
BOOLEAN PciCapabilitySupport (IN PCI_IO_DEVICE *PciIoDevice)
 
EFI_STATUS LocateCapabilityRegBlock (IN PCI_IO_DEVICE *PciIoDevice, IN UINT8 CapId, IN OUT UINT8 *Offset, OUT UINT8 *NextRegBlock OPTIONAL)
 
EFI_STATUS LocatePciExpressCapabilityRegBlock (IN PCI_IO_DEVICE *PciIoDevice, IN UINT16 CapId, IN OUT UINT32 *Offset, OUT UINT32 *NextRegBlock OPTIONAL)
 

Detailed Description

PCI command register operations supporting functions implementation for PCI Bus module.

Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file PciCommand.c.

Function Documentation

◆ LocateCapabilityRegBlock()

EFI_STATUS LocateCapabilityRegBlock ( IN PCI_IO_DEVICE PciIoDevice,
IN UINT8  CapId,
IN OUT UINT8 *  Offset,
OUT UINT8 *NextRegBlock  OPTIONAL 
)

Locate capability register block per capability ID.

Parameters
PciIoDeviceA pointer to the PCI_IO_DEVICE.
CapIdThe capability ID.
OffsetA pointer to the offset returned.
NextRegBlockA pointer to the next block returned.
Return values
EFI_SUCCESSSuccessfully located capability register block.
EFI_UNSUPPORTEDPci device does not support capability.
EFI_NOT_FOUNDPci device support but can not find register block.

Definition at line 106 of file PciCommand.c.

◆ LocatePciExpressCapabilityRegBlock()

EFI_STATUS LocatePciExpressCapabilityRegBlock ( IN PCI_IO_DEVICE PciIoDevice,
IN UINT16  CapId,
IN OUT UINT32 *  Offset,
OUT UINT32 *NextRegBlock  OPTIONAL 
)

Locate PciExpress capability register block per capability ID.

Parameters
PciIoDeviceA pointer to the PCI_IO_DEVICE.
CapIdThe capability ID.
OffsetA pointer to the offset returned.
NextRegBlockA pointer to the next block returned.
Return values
EFI_SUCCESSSuccessfully located capability register block.
EFI_UNSUPPORTEDPci device does not support capability.
EFI_NOT_FOUNDPci device support but can not find register block.

Definition at line 195 of file PciCommand.c.

◆ PciCapabilitySupport()

BOOLEAN PciCapabilitySupport ( IN PCI_IO_DEVICE PciIoDevice)

Check the capability supporting by given device.

Parameters
PciIoDevicePointer to instance of PCI_IO_DEVICE.
Return values
TRUECapability supported.
FALSECapability not supported.

Definition at line 81 of file PciCommand.c.

◆ PciOperateRegister()

EFI_STATUS PciOperateRegister ( IN PCI_IO_DEVICE PciIoDevice,
IN UINT16  Command,
IN UINT8  Offset,
IN UINT8  Operation,
OUT UINT16 *  PtrCommand 
)

Operate the PCI register via PciIo function interface.

Parameters
PciIoDevicePointer to instance of PCI_IO_DEVICE.
CommandOperator command.
OffsetThe address within the PCI configuration space for the PCI controller.
OperationType of Operation.
PtrCommandReturn buffer holding old PCI command, if operation is not EFI_SET_REGISTER.
Returns
Status of PciIo operation.

Definition at line 24 of file PciCommand.c.