X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=IntelFrameworkModulePkg%2FLibrary%2FPciIncompatibleDeviceSupportLib%2FPciIncompatibleDeviceSupportLib.c;h=21d527408bdca671b660c7052b9f51ca6d98c015;hp=4934d4e2c1d0ff7e42c6349616e9d923425c473c;hb=ae358cb21bc0dd3cc4a1886fac175bab1b99794a;hpb=7dd94873d2738133f459104541d1335742df1ac8;ds=sidebyside diff --git a/IntelFrameworkModulePkg/Library/PciIncompatibleDeviceSupportLib/PciIncompatibleDeviceSupportLib.c b/IntelFrameworkModulePkg/Library/PciIncompatibleDeviceSupportLib/PciIncompatibleDeviceSupportLib.c index 4934d4e2c1..21d527408b 100644 --- a/IntelFrameworkModulePkg/Library/PciIncompatibleDeviceSupportLib/PciIncompatibleDeviceSupportLib.c +++ b/IntelFrameworkModulePkg/Library/PciIncompatibleDeviceSupportLib/PciIncompatibleDeviceSupportLib.c @@ -14,8 +14,127 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "IncompatiblePciDeviceList.h" -EFI_PCI_REGISTER_ACCESS_DATA mPciRegisterAccessData = {0, 0, 0}; -EFI_PCI_REGISTER_VALUE_DATA mPciRegisterValueData = {0, 0}; +// +// the incompatible PCI devices list template for ACPI resource +// +GLOBAL_REMOVE_IF_UNREFERENCED UINT64 gIncompatiblePciDeviceListForResource[] = { + // + // DEVICE_INF_TAG, + // PCI_DEVICE_ID (VendorID, DeviceID, Revision, SubVendorId, SubDeviceId), + // DEVICE_RES_TAG, + // ResType, GFlag , SFlag, Granularity, RangeMin, + // RangeMax, Offset, AddrLen + // + + // + // Sample Device 1 + // + //DEVICE_INF_TAG, + //PCI_DEVICE_ID(0xXXXX, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE), + //DEVICE_RES_TAG, + //PCI_BAR_TYPE_IO, + //PCI_ACPI_UNUSED, + //PCI_ACPI_UNUSED, + //PCI_ACPI_UNUSED, + //PCI_ACPI_UNUSED, + //PCI_BAR_EVEN_ALIGN, + //PCI_BAR_ALL, + //PCI_BAR_NOCHANGE, + + // + // Sample Device 2 + // + //DEVICE_INF_TAG, + //PCI_DEVICE_ID(0xXXXX, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE), + //DEVICE_RES_TAG, + //PCI_BAR_TYPE_IO, + //PCI_ACPI_UNUSED, + //PCI_ACPI_UNUSED, + //PCI_ACPI_UNUSED, + //PCI_ACPI_UNUSED, + //PCI_BAR_EVEN_ALIGN, + //PCI_BAR_ALL, + //PCI_BAR_NOCHANGE, + + // + // The end of the list + // + LIST_END_TAG +}; + +// +// the incompatible PCI devices list template for the values of configuration registers +// +GLOBAL_REMOVE_IF_UNREFERENCED UINT64 gIncompatiblePciDeviceListForRegister[] = { + // + // DEVICE_INF_TAG, + // PCI_DEVICE_ID (VendorID, DeviceID, Revision, SubVendorId, SubDeviceId), + // PCI_RES_TAG, + // PCI_ACCESS_TYPE, PCI_CONFIG_ADDRESS, + // AND_VALUE, OR_VALUE + + // + // Sample Device 1 + // + //DEVICE_INF_TAG, + //PCI_DEVICE_ID(0xXXXX, 0xXXXX, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE), + //DEVICE_RES_TAG, + //PCI_REGISTER_READ, + //PCI_CAPBILITY_POINTER_OFFSET, + //0xffffff00, + //VALUE_NOCARE, + + // + // Sample Device 2 + // + //DEVICE_INF_TAG, + //PCI_DEVICE_ID(0xXXXX, 0xXXXX, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE), + //DEVICE_RES_TAG, + //PCI_REGISTER_READ, + //PCI_CAPBILITY_POINTER_OFFSET, + //0xffffff00, + //VALUE_NOCARE, + + // + // The end of the list + // + LIST_END_TAG +}; + +// +// the incompatible PCI devices list template for the access width of configuration registers +// +GLOBAL_REMOVE_IF_UNREFERENCED UINT64 gDeviceListForAccessWidth[] = { + // + // DEVICE_INF_TAG, + // PCI_DEVICE_ID (VendorID, DeviceID, Revision, SubVendorId, SubDeviceId), + // DEVICE_RES_TAG, + // PCI_ACCESS_TYPE, PCI_ACCESS_WIDTH, + // START_ADDRESS, END_ADDRESS, + // ACTUAL_PCI_ACCESS_WIDTH, + // + + // + // Sample Device + // + //DEVICE_INF_TAG, + //PCI_DEVICE_ID(0xXXXX, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE), + //DEVICE_RES_TAG, + //PCI_REGISTER_READ, + //EfiPciWidthUint8, + //0, + //0xFF, + //EfiPciWidthUint32, + // + + // + // The end of the list + // + LIST_END_TAG +}; + +GLOBAL_REMOVE_IF_UNREFERENCED EFI_PCI_REGISTER_ACCESS_DATA mPciRegisterAccessData = {0, 0, 0}; +GLOBAL_REMOVE_IF_UNREFERENCED EFI_PCI_REGISTER_VALUE_DATA mPciRegisterValueData = {0, 0}; /** @@ -299,7 +418,7 @@ PciRegisterUpdateCheck ( /** Check the incompatible device list for access width incompatibility and - return the configuration + return the configuration. This function searches the incompatible device list for access width incompatibility according to request information. If the PCI device