2 PCI Incompatible device support Libary.
4 Copyright (c) 2006 - 2007, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #define PCI_REGISTER_READ 0xfffffffffffffff1ULL
16 #define PCI_REGISTER_WRITE 0xfffffffffffffff2ULL
17 #define VALUE_NOCARE 0xffffffffffffffffULL
20 // PCI device device information
26 UINT64 SubsystemVendorID
;
28 } EFI_PCI_DEVICE_INFO
;
32 // store hardcode value of resgister
37 } EFI_PCI_REGISTER_VALUE_DATA
;
40 // store access width information
46 } EFI_PCI_REGISTER_ACCESS_DATA
;
50 // ACPI resource descriptor
56 UINT64 AddrSpaceGranularity
;
59 UINT64 AddrTranslationOffset
;
61 } EFI_PCI_RESOUCE_DESCRIPTOR
;
64 Checks the incompatible device list for ACPI resource update and return
67 This function searches the incompatible device list according to request
68 information. If the PCI device belongs to the devices list, corresponding
69 configuration informtion will be returned, in the meantime return EFI_SUCCESS.
71 @param PciDeviceInfo A pointer to PCI device information.
72 @param Configuration Returned information.
74 @retval returns EFI_SUCCESS if check incompatible device ok.
75 Otherwise return EFI_UNSUPPORTED.
79 PciResourceUpdateCheck (
80 IN EFI_PCI_DEVICE_INFO
*PciDeviceInfo
,
81 OUT VOID
*Configuration
85 Checks the incompatible device list and return configuration register mask values.
87 This function searches the incompatible device list according to request
88 information. If the PCI device belongs to the devices list, corresponding
89 configuration informtion will be returned, in the meantime return EFI_SUCCESS.
91 @param PciDeviceInfo A pointer to EFI_PCI_DEVICE_INFO.
92 @param AccessType Access Type, READ or WRITE.
93 @param Offset The address within the PCI configuration space.
94 @param Configuration Returned information.
96 @retval returns EFI_SUCCESS if check incompatible device ok.
97 Otherwise return EFI_UNSUPPORTED.
101 PciRegisterUpdateCheck (
102 IN EFI_PCI_DEVICE_INFO
*PciDeviceInfo
,
103 IN UINT64 AccessType
,
105 OUT VOID
*Configuration
109 Checks the incompatible device list for access width incompatibility and
110 return the configuration
112 This function searches the incompatible device list for access width
113 incompatibility according to request information. If the PCI device
114 belongs to the devices list, corresponding configuration informtion
115 will be returned, in the meantime return EFI_SUCCESS.
117 @param PciDeviceInfo A pointer to PCI device information.
118 @param AccessType Access type, READ or WRITE.
119 @param Offset The address within the PCI configuration space.
120 @param AccessWidth Access width needs to check incompatibility.
121 @param Configuration Returned information.
123 @retval returns EFI_SUCCESS if check incompatible device ok.
124 Otherwise return EFI_UNSUPPORTED.
128 PciRegisterAccessCheck (
129 IN EFI_PCI_DEVICE_INFO
*PciDeviceInfo
,
130 IN UINT64 AccessType
,
132 IN UINT64 AccessWidth
,
133 OUT VOID
*Configuration