--- /dev/null
+/** @file\r
+ PCI Incompatible device support Libary.\r
+\r
+Copyright (c) 2007 Intel Corporation. All rights reserved. <BR>\r
+This software and associated documentation (if any) is furnished\r
+under a license and may only be used or copied in accordance\r
+with the terms of the license. Except as permitted by such\r
+license, no part of this software or documentation may be\r
+reproduced, stored in a retrieval system, or transmitted in any\r
+form or by any means without the express written consent of\r
+Intel Corporation.\r
+\r
+**/\r
+\r
+#define PCI_REGISTER_READ 0xfffffffffffffff1ULL\r
+#define PCI_REGISTER_WRITE 0xfffffffffffffff2ULL\r
+#define VALUE_NOCARE 0xffffffffffffffffULL\r
+\r
+//\r
+// PCI device device information\r
+//\r
+typedef struct {\r
+ UINT64 VendorID;\r
+ UINT64 DeviceID;\r
+ UINT64 RevisionID;\r
+ UINT64 SubsystemVendorID;\r
+ UINT64 SubsystemID;\r
+} EFI_PCI_DEVICE_INFO;\r
+\r
+\r
+//\r
+// store hardcode value of resgister\r
+//\r
+typedef struct {\r
+ UINT64 AndValue;\r
+ UINT64 OrValue;\r
+} EFI_PCI_REGISTER_VALUE_DATA;\r
+\r
+//\r
+// store access width information\r
+//\r
+typedef struct {\r
+ UINT64 StartOffset;\r
+ UINT64 EndOffset;\r
+ UINT64 Width;\r
+} EFI_PCI_REGISTER_ACCESS_DATA;\r
+\r
+\r
+//\r
+// ACPI resource descriptor\r
+//\r
+typedef struct {\r
+ UINT64 ResType;\r
+ UINT64 GenFlag;\r
+ UINT64 SpecificFlag;\r
+ UINT64 AddrSpaceGranularity;\r
+ UINT64 AddrRangeMin;\r
+ UINT64 AddrRangeMax;\r
+ UINT64 AddrTranslationOffset;\r
+ UINT64 AddrLen;\r
+} EFI_PCI_RESOUCE_DESCRIPTOR;\r
+\r
+/**\r
+ Checks the incompatible device list for ACPI resource update and return\r
+ the configuration.\r
+\r
+ This function searches the incompatible device list according to request\r
+ information. If the PCI device belongs to the devices list, corresponding\r
+ configuration informtion will be returned, in the meantime return EFI_SUCCESS.\r
+\r
+ @param PciDeviceInfo A pointer to PCI device information.\r
+ @param Configuration Returned information.\r
+\r
+ @retval returns EFI_SUCCESS if check incompatible device ok.\r
+ Otherwise return EFI_UNSUPPORTED.\r
+**/\r
+RETURN_STATUS\r
+EFIAPI\r
+PciResourceUpdateCheck (\r
+ IN EFI_PCI_DEVICE_INFO *PciDeviceInfo,\r
+ OUT VOID *Configuration\r
+ );\r
+\r
+/**\r
+ Checks the incompatible device list and return configuration register mask values.\r
+\r
+ This function searches the incompatible device list according to request\r
+ information. If the PCI device belongs to the devices list, corresponding\r
+ configuration informtion will be returned, in the meantime return EFI_SUCCESS.\r
+\r
+ @param PciDeviceInfo A pointer to EFI_PCI_DEVICE_INFO.\r
+ @param AccessType Access Type, READ or WRITE.\r
+ @param Offset The address within the PCI configuration space.\r
+ @param Configuration Returned information.\r
+\r
+ @retval returns EFI_SUCCESS if check incompatible device ok.\r
+ Otherwise return EFI_UNSUPPORTED.\r
+**/\r
+RETURN_STATUS\r
+EFIAPI\r
+PciRegisterUpdateCheck (\r
+ IN EFI_PCI_DEVICE_INFO *PciDeviceInfo,\r
+ IN UINT64 AccessType,\r
+ IN UINT64 Offset,\r
+ OUT VOID *Configuration\r
+ );\r
+\r
+/**\r
+ Checks the incompatible device list for access width incompatibility and\r
+ return the configuration\r
+\r
+ This function searches the incompatible device list for access width\r
+ incompatibility according to request information. If the PCI device\r
+ belongs to the devices list, corresponding configuration informtion\r
+ will be returned, in the meantime return EFI_SUCCESS.\r
+\r
+ @param PciDeviceInfo A pointer to PCI device information.\r
+ @param AccessType Access type, READ or WRITE.\r
+ @param Offset The address within the PCI configuration space.\r
+ @param AccessWidth Access width needs to check incompatibility.\r
+ @param Configuration Returned information.\r
+\r
+ @retval returns EFI_SUCCESS if check incompatible device ok.\r
+ Otherwise return EFI_UNSUPPORTED.\r
+**/\r
+RETURN_STATUS\r
+EFIAPI\r
+PciRegisterAccessCheck (\r
+ IN EFI_PCI_DEVICE_INFO *PciDeviceInfo,\r
+ IN UINT64 AccessType,\r
+ IN UINT64 Offset,\r
+ IN UINT64 AccessWidth,\r
+ OUT VOID *Configuration\r
+ );\r