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