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 #ifndef __PCI_INCOMPATIBLE_DEVICE_SUPPORT_LIB_H__
16 #define __PCI_INCOMPATIBLE_DEVICE_SUPPORT_LIB_H__
18 #define PCI_REGISTER_READ 0xfffffffffffffff1ULL
19 #define PCI_REGISTER_WRITE 0xfffffffffffffff2ULL
20 #define VALUE_NOCARE 0xffffffffffffffffULL
23 // PCI device device information
29 UINT64 SubsystemVendorID
;
31 } EFI_PCI_DEVICE_INFO
;
35 // store hardcode value of resgister
40 } EFI_PCI_REGISTER_VALUE_DATA
;
43 // store access width information
49 } EFI_PCI_REGISTER_ACCESS_DATA
;
53 // ACPI resource descriptor
59 UINT64 AddrSpaceGranularity
;
62 UINT64 AddrTranslationOffset
;
64 } EFI_PCI_RESOUCE_DESCRIPTOR
;
67 Checks the incompatible device list for ACPI resource update and return
70 This function searches the incompatible device list according to request
71 information. If the PCI device belongs to the devices list, corresponding
72 configuration informtion will be returned, in the meantime return EFI_SUCCESS.
74 @param PciDeviceInfo A pointer to PCI device information.
75 @param Configuration Returned information.
77 @retval returns EFI_SUCCESS if check incompatible device ok.
78 Otherwise return EFI_UNSUPPORTED.
82 PciResourceUpdateCheck (
83 IN EFI_PCI_DEVICE_INFO
*PciDeviceInfo
,
84 OUT VOID
*Configuration
88 Checks the incompatible device list and return configuration register mask values.
90 This function searches the incompatible device list according to request
91 information. If the PCI device belongs to the devices list, corresponding
92 configuration informtion will be returned, in the meantime return EFI_SUCCESS.
94 @param PciDeviceInfo A pointer to EFI_PCI_DEVICE_INFO.
95 @param AccessType Access Type, READ or WRITE.
96 @param Offset The address within the PCI configuration space.
97 @param Configuration Returned information.
99 @retval returns EFI_SUCCESS if check incompatible device ok.
100 Otherwise return EFI_UNSUPPORTED.
104 PciRegisterUpdateCheck (
105 IN EFI_PCI_DEVICE_INFO
*PciDeviceInfo
,
106 IN UINT64 AccessType
,
108 OUT VOID
*Configuration
112 Checks the incompatible device list for access width incompatibility and
113 return the configuration
115 This function searches the incompatible device list for access width
116 incompatibility according to request information. If the PCI device
117 belongs to the devices list, corresponding configuration informtion
118 will be returned, in the meantime return EFI_SUCCESS.
120 @param PciDeviceInfo A pointer to PCI device information.
121 @param AccessType Access type, READ or WRITE.
122 @param Offset The address within the PCI configuration space.
123 @param AccessWidth Access width needs to check incompatibility.
124 @param Configuration Returned information.
126 @retval returns EFI_SUCCESS if check incompatible device ok.
127 Otherwise return EFI_UNSUPPORTED.
131 PciRegisterAccessCheck (
132 IN EFI_PCI_DEVICE_INFO
*PciDeviceInfo
,
133 IN UINT64 AccessType
,
135 IN UINT64 AccessWidth
,
136 OUT VOID
*Configuration