2 PCI Incompatible device support Libary.
4 Copyright (c) 2007 Intel Corporation. All rights reserved. <BR>
5 This software and associated documentation (if any) is furnished
6 under a license and may only be used or copied in accordance
7 with the terms of the license. Except as permitted by such
8 license, no part of this software or documentation may be
9 reproduced, stored in a retrieval system, or transmitted in any
10 form or by any means without the express written consent of
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