]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkModulePkg/Include/Library/PciIncompatibleDeviceSupportLib.h
Modules cleanup.
[mirror_edk2.git] / IntelFrameworkModulePkg / Include / Library / PciIncompatibleDeviceSupportLib.h
1 /** @file
2 PCI Incompatible device support Libary.
3
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
11 Intel Corporation.
12
13 **/
14
15 #define PCI_REGISTER_READ 0xfffffffffffffff1ULL
16 #define PCI_REGISTER_WRITE 0xfffffffffffffff2ULL
17 #define VALUE_NOCARE 0xffffffffffffffffULL
18
19 //
20 // PCI device device information
21 //
22 typedef struct {
23 UINT64 VendorID;
24 UINT64 DeviceID;
25 UINT64 RevisionID;
26 UINT64 SubsystemVendorID;
27 UINT64 SubsystemID;
28 } EFI_PCI_DEVICE_INFO;
29
30
31 //
32 // store hardcode value of resgister
33 //
34 typedef struct {
35 UINT64 AndValue;
36 UINT64 OrValue;
37 } EFI_PCI_REGISTER_VALUE_DATA;
38
39 //
40 // store access width information
41 //
42 typedef struct {
43 UINT64 StartOffset;
44 UINT64 EndOffset;
45 UINT64 Width;
46 } EFI_PCI_REGISTER_ACCESS_DATA;
47
48
49 //
50 // ACPI resource descriptor
51 //
52 typedef struct {
53 UINT64 ResType;
54 UINT64 GenFlag;
55 UINT64 SpecificFlag;
56 UINT64 AddrSpaceGranularity;
57 UINT64 AddrRangeMin;
58 UINT64 AddrRangeMax;
59 UINT64 AddrTranslationOffset;
60 UINT64 AddrLen;
61 } EFI_PCI_RESOUCE_DESCRIPTOR;
62
63 /**
64 Checks the incompatible device list for ACPI resource update and return
65 the configuration.
66
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.
70
71 @param PciDeviceInfo A pointer to PCI device information.
72 @param Configuration Returned information.
73
74 @retval returns EFI_SUCCESS if check incompatible device ok.
75 Otherwise return EFI_UNSUPPORTED.
76 **/
77 RETURN_STATUS
78 EFIAPI
79 PciResourceUpdateCheck (
80 IN EFI_PCI_DEVICE_INFO *PciDeviceInfo,
81 OUT VOID *Configuration
82 );
83
84 /**
85 Checks the incompatible device list and return configuration register mask values.
86
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.
90
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.
95
96 @retval returns EFI_SUCCESS if check incompatible device ok.
97 Otherwise return EFI_UNSUPPORTED.
98 **/
99 RETURN_STATUS
100 EFIAPI
101 PciRegisterUpdateCheck (
102 IN EFI_PCI_DEVICE_INFO *PciDeviceInfo,
103 IN UINT64 AccessType,
104 IN UINT64 Offset,
105 OUT VOID *Configuration
106 );
107
108 /**
109 Checks the incompatible device list for access width incompatibility and
110 return the configuration
111
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.
116
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.
122
123 @retval returns EFI_SUCCESS if check incompatible device ok.
124 Otherwise return EFI_UNSUPPORTED.
125 **/
126 RETURN_STATUS
127 EFIAPI
128 PciRegisterAccessCheck (
129 IN EFI_PCI_DEVICE_INFO *PciDeviceInfo,
130 IN UINT64 AccessType,
131 IN UINT64 Offset,
132 IN UINT64 AccessWidth,
133 OUT VOID *Configuration
134 );