TianoCore EDK2 master
|
Go to the source code of this file.
Data Structures | |
struct | _EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL |
Macros | |
#define | EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL_GUID |
Typedefs | |
typedef struct _EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL | EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL |
typedef EFI_STATUS(EFIAPI * | EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_CHECK_DEVICE) (IN EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL *This, IN UINTN VendorId, IN UINTN DeviceId, IN UINTN RevisionId, IN UINTN SubsystemVendorId, IN UINTN SubsystemDeviceId, OUT VOID **Configuration) |
Variables | |
EFI_GUID | gEfiIncompatiblePciDeviceSupportProtocolGuid |
This file declares Incompatible PCI Device Support Protocol
Allows the PCI bus driver to support resource allocation for some PCI devices that do not comply with the PCI Specification.
The EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL is used by the PCI bus driver to support resource allocation for some PCI devices that do not comply with the PCI Specification. This protocol can find some incompatible PCI devices and report their special resource requirements to the PCI bus driver. The generic PCI bus driver does not have prior knowledge of any incompatible PCI devices. It interfaces with the EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL to find out if a device is incompatible and to obtain the special configuration requirements for a specific incompatible PCI device.
This protocol is optional, and only one instance of this protocol can be present in the system. If a platform supports this protocol, this protocol is produced by a Driver Execution Environment (DXE) driver and must be made available before the Boot Device Selection (BDS) phase. The PCI bus driver will look for the presence of this protocol before it begins PCI enumeration. If this protocol exists in a platform, it indicates that the platform has the capability to support those incompatible PCI devices. However, final support for incompatible PCI devices still depends on the implementation of the PCI bus driver. The PCI bus driver may fully, partially, or not even support these incompatible devices.
During PCI bus enumeration, the PCI bus driver will probe the PCI Base Address Registers (BARs) for each PCI device regardless of whether the PCI device is incompatible or not to determine the resource requirements so that the PCI bus driver can invoke the proper PCI resources for them. Generally, this resource information includes the following:
However, some incompatible PCI devices may have special requirements. As a result, the length or the alignment that is derived through BAR probing may not be exactly the same as the actual resource requirement of the device. For example, there are some devices that request I/O resources at a length of 0x100 from their I/O BAR, but these incompatible devices will never work correctly if an odd I/O base address, such as 0x100, 0x300, or 0x500, is assigned to the BAR. Instead, these devices request an even base address, such as 0x200 or 0x400. The Incompatible PCI Device Support Protocol can then be used to obtain these special resource requirements for these incompatible PCI devices. In this way, the PCI bus driver will take special consideration for these devices during PCI resource allocation to ensure that they can work correctly.
This protocol may support the following incompatible PCI BAR types:
See the Conventional PCI Specification 3.0 for the details of how a PCI BAR reports the resource length and the alignment that it requires.
Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file IncompatiblePciDeviceSupport.h.
#define EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL_GUID |
Global ID for EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL
Definition at line 76 of file IncompatiblePciDeviceSupport.h.
typedef EFI_STATUS(EFIAPI * EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_CHECK_DEVICE) (IN EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL *This, IN UINTN VendorId, IN UINTN DeviceId, IN UINTN RevisionId, IN UINTN SubsystemVendorId, IN UINTN SubsystemDeviceId, OUT VOID **Configuration) |
Returns a list of ACPI resource descriptors that detail the special resource configuration requirements for an incompatible PCI device.
This function returns a list of ACPI resource descriptors that detail the special resource configuration requirements for an incompatible PCI device.
Prior to bus enumeration, the PCI bus driver will look for the presence of the EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL. Only one instance of this protocol can be present in the system. For each PCI device that the PCI bus driver discovers, the PCI bus driver calls this function with the device's vendor ID, device ID, revision ID, subsystem vendor ID, and subsystem device ID. If the VendorId, DeviceId, RevisionId, SubsystemVendorId, or SubsystemDeviceId value is set to (UINTN)-1, that field will be ignored. The ID values that are not (UINTN)-1 will be used to identify the current device.
This function will only return EFI_SUCCESS. However, if the device is an incompatible PCI device, a list of ACPI resource descriptors will be returned in Configuration. Otherwise, NULL will be returned in Configuration instead. The PCI bus driver does not need to allocate memory for Configuration. However, it is the PCI bus driver's responsibility to free it. The PCI bus driver then can configure this device with the information that is derived from this list of resource nodes, rather than the result of BAR probing.
Only the following two resource descriptor types from the ACPI Specification may be used to describe the incompatible PCI device resource requirements:
The QWORD Address Space Descriptor can describe memory, I/O, and bus number ranges for dynamic or fixed resources. The configuration of a PCI root bridge is described with one or more QWORD Address Space Descriptors, followed by an End Tag. See the ACPI Specification for details on the field values.
[in] | This | Pointer to the EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL instance. |
[in] | VendorId | A unique ID to identify the manufacturer of the PCI device. See the Conventional PCI Specification 3.0 for details. |
[in] | DeviceId | A unique ID to identify the particular PCI device. See the Conventional PCI Specification 3.0 for details. |
[in] | RevisionId | A PCI device-specific revision identifier. See the Conventional PCI Specification 3.0 for details. |
[in] | SubsystemVendorId | Specifies the subsystem vendor ID. See the Conventional PCI Specification 3.0 for details. |
[in] | SubsystemDeviceId | Specifies the subsystem device ID. See the Conventional PCI Specification 3.0 for details. |
[out] | Configuration | A list of ACPI resource descriptors that detail the configuration requirement. |
EFI_SUCCESS | The function always returns EFI_SUCCESS. |
Definition at line 142 of file IncompatiblePciDeviceSupport.h.
typedef struct _EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL |
Forward declaration for EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL
Definition at line 84 of file IncompatiblePciDeviceSupport.h.