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