#include <pci.h>
#include <debug.h>
Go to the source code of this file.
|
| | C_ASSERT (FIELD_OFFSET(PCI_COMMON_HEADER, u.type1.BridgeControl)==FIELD_OFFSET(PCI_COMMON_HEADER, u.type2.BridgeControl)) |
| |
| VOID NTAPI | Cardbus_SaveCurrentSettings (IN PPCI_CONFIGURATOR_CONTEXT Context) |
| |
| VOID NTAPI | Cardbus_SaveLimits (IN PPCI_CONFIGURATOR_CONTEXT Context) |
| |
| VOID NTAPI | Cardbus_MassageHeaderForLimitsDetermination (IN PPCI_CONFIGURATOR_CONTEXT Context) |
| |
| VOID NTAPI | Cardbus_RestoreCurrent (IN PPCI_CONFIGURATOR_CONTEXT Context) |
| |
| VOID NTAPI | Cardbus_GetAdditionalResourceDescriptors (IN PPCI_CONFIGURATOR_CONTEXT Context, IN PPCI_COMMON_HEADER PciData, IN PIO_RESOURCE_DESCRIPTOR IoDescriptor) |
| |
| VOID NTAPI | Cardbus_ResetDevice (IN PPCI_PDO_EXTENSION PdoExtension, IN PPCI_COMMON_HEADER PciData) |
| |
| NTSTATUS NTAPI | Cardbus_ChangeResourceSettings (_In_ PPCI_PDO_EXTENSION PdoExtension, _Inout_ PPCI_COMMON_HEADER PciData) |
| |
| NTSTATUS NTAPI | pcicbintrf_Initializer (IN PVOID Instance) |
| |
| NTSTATUS NTAPI | pcicbintrf_Constructor (IN PVOID DeviceExtension, IN PVOID Instance, IN PVOID InterfaceData, IN USHORT Version, IN USHORT Size, IN PINTERFACE Interface) |
| |
◆ NDEBUG
◆ C_ASSERT()
◆ Cardbus_ChangeResourceSettings()
Definition at line 149 of file cardbus.c.
152{
155
156
159 {
160 Bar = PciData->u.type2.SocketRegistersBaseAddress;
162 {
164 }
165 else
166 {
168 }
169
172 Bar |=
Resources->Current[0].u.Generic.Start.LowPart & BarMask;
173
174 PciData->u.type2.SocketRegistersBaseAddress =
Bar;
175 }
176
177
178 PciData->u.type2.PrimaryBus =
PdoExtension->Dependent.type1.PrimaryBus;
179 PciData->u.type2.SecondaryBus =
PdoExtension->Dependent.type1.SecondaryBus;
180 PciData->u.type2.SubordinateBus =
PdoExtension->Dependent.type1.SubordinateBus;
181
184
186}
#define CmResourceTypeNull
#define PCI_ENABLE_BRIDGE_VGA
#define PCI_ADDRESS_IO_ADDRESS_MASK
#define PCI_ADDRESS_IO_SPACE
#define PCI_ADDRESS_MEMORY_ADDRESS_MASK
◆ Cardbus_GetAdditionalResourceDescriptors()
Definition at line 128 of file cardbus.c.
131{
132
134}
VOID NTAPI PPBridge_GetAdditionalResourceDescriptors(IN PPCI_CONFIGURATOR_CONTEXT Context, IN PPCI_COMMON_HEADER PciData, IN PIO_RESOURCE_DESCRIPTOR IoDescriptor)
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_ PVOID Context
◆ Cardbus_MassageHeaderForLimitsDetermination()
Definition at line 102 of file cardbus.c.
103{
105
108
109
110 PciData->u.type2.SocketRegistersBaseAddress = 0xFFFFFFFF;
111
112
113 Context->SecondaryStatus = Current->u.type2.SecondaryStatus;
114 Current->u.type2.SecondaryStatus = 0;
115 PciData->u.type2.SecondaryStatus = 0;
116}
◆ Cardbus_ResetDevice()
Definition at line 138 of file cardbus.c.
140{
143
144
145}
#define UNREFERENCED_PARAMETER(P)
◆ Cardbus_RestoreCurrent()
◆ Cardbus_SaveCurrentSettings()
Definition at line 39 of file cardbus.c.
40{
46
51
52
55 {
56 Address = Current->u.type2.SocketRegistersBaseAddress;
58 {
60 }
61 else
62 {
64 }
65
70
71
74 }
75
76
77 PdoExtension->Dependent.type1.PrimaryBus = Current->u.type2.PrimaryBus;
78 PdoExtension->Dependent.type1.SecondaryBus = Current->u.type2.SecondaryBus;
79 PdoExtension->Dependent.type1.SubordinateBus = Current->u.type2.SubordinateBus;
80
81
83 {
86 }
87}
#define CmResourceTypePort
union _CM_PARTIAL_RESOURCE_DESCRIPTOR::@494 u
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@494::@495 Generic
_In_ LONG _In_ LONG Limit
◆ Cardbus_SaveLimits()
Definition at line 91 of file cardbus.c.
92{
93
95 Context->PciData->u.type2.SocketRegistersBaseAddress,
96 0,
98}
BOOLEAN NTAPI PciCreateIoDescriptorFromBarLimit(_Out_ PIO_RESOURCE_DESCRIPTOR ResourceDescriptor, _In_ ULONG Bar, _In_ ULONG NextBar, _In_ BOOLEAN Rom)
Builds the requirement of a BAR from the value it reads back after all ones were written to it.
◆ pcicbintrf_Constructor()
Definition at line 200 of file cardbus.c.
206{
213
214
216}
#define STATUS_NOT_SUPPORTED
_In_ UCXUSBDEVICE _In_ ULONG Interface
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_WMI_INSTANCE_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_opt_ WDFWMIINSTANCE * Instance
◆ pcicbintrf_Initializer()
Definition at line 190 of file cardbus.c.
191{
193
194 ASSERTMSG(
"PCI pcicbintrf_Initializer, unexpected call.\n",
FALSE);
196}
#define ASSERTMSG(msg, exp)
#define STATUS_UNSUCCESSFUL
◆ PciCardbusPrivateInterface
Initial value:=
{
&GUID_PCI_CARDBUS_INTERFACE_PRIVATE,
0,
}
NTSTATUS NTAPI pcicbintrf_Constructor(IN PVOID DeviceExtension, IN PVOID Instance, IN PVOID InterfaceData, IN USHORT Version, IN USHORT Size, IN PINTERFACE Interface)
NTSTATUS NTAPI pcicbintrf_Initializer(IN PVOID Instance)
#define PCI_INTERFACE_PDO
struct _PCI_CARDBUS_INTERFACE_PRIVATE PCI_CARDBUS_INTERFACE_PRIVATE
#define PCI_CB_INTRF_VERSION
Definition at line 18 of file cardbus.c.