]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkModulePkg/Include/Library/PciIncompatibleDeviceSupportLib.h
Clean up GenericBdsLib.h to remove unnecessary include header files.
[mirror_edk2.git] / IntelFrameworkModulePkg / Include / Library / PciIncompatibleDeviceSupportLib.h
CommitLineData
a9102619 1/** @file\r
2 PCI Incompatible device support Libary.\r
3\r
53bd6e4c 4Copyright (c) 2006 - 2007, Intel Corporation \r
5All rights reserved. This program and the accompanying materials \r
6are licensed and made available under the terms and conditions of the BSD License \r
7which accompanies this distribution. The full text of the license may be found at \r
8http://opensource.org/licenses/bsd-license.php \r
9 \r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
a9102619 12\r
13**/\r
14\r
8d0a8e53 15#ifndef __PCI_INCOMPATIBLE_DEVICE_SUPPORT_LIB_H__\r
16#define __PCI_INCOMPATIBLE_DEVICE_SUPPORT_LIB_H__\r
17\r
a9102619 18#define PCI_REGISTER_READ 0xfffffffffffffff1ULL\r
19#define PCI_REGISTER_WRITE 0xfffffffffffffff2ULL\r
20#define VALUE_NOCARE 0xffffffffffffffffULL\r
21\r
22//\r
23// PCI device device information\r
24//\r
25typedef struct {\r
26 UINT64 VendorID;\r
27 UINT64 DeviceID;\r
28 UINT64 RevisionID;\r
29 UINT64 SubsystemVendorID;\r
30 UINT64 SubsystemID;\r
31} EFI_PCI_DEVICE_INFO;\r
32\r
33\r
34//\r
35// store hardcode value of resgister\r
36//\r
37typedef struct {\r
38 UINT64 AndValue;\r
39 UINT64 OrValue;\r
40} EFI_PCI_REGISTER_VALUE_DATA;\r
41\r
42//\r
43// store access width information\r
44//\r
45typedef struct {\r
46 UINT64 StartOffset;\r
47 UINT64 EndOffset;\r
48 UINT64 Width;\r
49} EFI_PCI_REGISTER_ACCESS_DATA;\r
50\r
51\r
52//\r
53// ACPI resource descriptor\r
54//\r
55typedef struct {\r
56 UINT64 ResType;\r
57 UINT64 GenFlag;\r
58 UINT64 SpecificFlag;\r
59 UINT64 AddrSpaceGranularity;\r
60 UINT64 AddrRangeMin;\r
61 UINT64 AddrRangeMax;\r
62 UINT64 AddrTranslationOffset;\r
63 UINT64 AddrLen;\r
64} EFI_PCI_RESOUCE_DESCRIPTOR;\r
65\r
66/**\r
67 Checks the incompatible device list for ACPI resource update and return\r
68 the configuration.\r
69\r
70 This function searches the incompatible device list according to request\r
71 information. If the PCI device belongs to the devices list, corresponding\r
72 configuration informtion will be returned, in the meantime return EFI_SUCCESS.\r
73\r
74 @param PciDeviceInfo A pointer to PCI device information.\r
75 @param Configuration Returned information.\r
76\r
77 @retval returns EFI_SUCCESS if check incompatible device ok.\r
78 Otherwise return EFI_UNSUPPORTED.\r
79**/\r
80RETURN_STATUS\r
81EFIAPI\r
82PciResourceUpdateCheck (\r
83 IN EFI_PCI_DEVICE_INFO *PciDeviceInfo,\r
84 OUT VOID *Configuration\r
85 );\r
86\r
87/**\r
88 Checks the incompatible device list and return configuration register mask values.\r
89\r
90 This function searches the incompatible device list according to request\r
91 information. If the PCI device belongs to the devices list, corresponding\r
92 configuration informtion will be returned, in the meantime return EFI_SUCCESS.\r
93\r
94 @param PciDeviceInfo A pointer to EFI_PCI_DEVICE_INFO.\r
95 @param AccessType Access Type, READ or WRITE.\r
96 @param Offset The address within the PCI configuration space.\r
97 @param Configuration Returned information.\r
98\r
99 @retval returns EFI_SUCCESS if check incompatible device ok.\r
100 Otherwise return EFI_UNSUPPORTED.\r
101**/\r
102RETURN_STATUS\r
103EFIAPI\r
104PciRegisterUpdateCheck (\r
105 IN EFI_PCI_DEVICE_INFO *PciDeviceInfo,\r
106 IN UINT64 AccessType,\r
107 IN UINT64 Offset,\r
108 OUT VOID *Configuration\r
109 );\r
110\r
111/**\r
112 Checks the incompatible device list for access width incompatibility and\r
113 return the configuration\r
114\r
115 This function searches the incompatible device list for access width\r
116 incompatibility according to request information. If the PCI device\r
117 belongs to the devices list, corresponding configuration informtion\r
118 will be returned, in the meantime return EFI_SUCCESS.\r
119\r
120 @param PciDeviceInfo A pointer to PCI device information.\r
121 @param AccessType Access type, READ or WRITE.\r
122 @param Offset The address within the PCI configuration space.\r
123 @param AccessWidth Access width needs to check incompatibility.\r
124 @param Configuration Returned information.\r
125\r
126 @retval returns EFI_SUCCESS if check incompatible device ok.\r
127 Otherwise return EFI_UNSUPPORTED.\r
128**/\r
129RETURN_STATUS\r
130EFIAPI\r
131PciRegisterAccessCheck (\r
132 IN EFI_PCI_DEVICE_INFO *PciDeviceInfo,\r
133 IN UINT64 AccessType,\r
134 IN UINT64 Offset,\r
135 IN UINT64 AccessWidth,\r
136 OUT VOID *Configuration\r
137 );\r
8d0a8e53 138\r
139#endif\r
140\r