ReactOS 0.4.16-dev-550-g2186ce3
|
#include <ntifs.h>
#include <wdmguid.h>
#include <wchar.h>
#include <acpiioct.h>
#include <drivers/pci/pci.h>
#include <drivers/acpi/acpi.h>
#include <ndk/halfuncs.h>
#include <ndk/rtlfuncs.h>
#include <ndk/vffuncs.h>
#include <arbiter.h>
#include <cmreslist.h>
Go to the source code of this file.
Classes | |
struct | _PCI_HACK_ENTRY |
struct | _PCI_POWER_STATE |
struct | _PCI_LOCK |
struct | _PCI_FDO_EXTENSION |
struct | _PCI_FUNCTION_RESOURCES |
union | _PCI_HEADER_TYPE_DEPENDENT |
struct | _PCI_PDO_EXTENSION |
struct | _PCI_MN_DISPATCH_TABLE |
struct | _PCI_MJ_DISPATCH_TABLE |
struct | _PCI_INTERFACE |
struct | PCI_SECONDARY_EXTENSION |
struct | PCI_ARBITER_INSTANCE |
struct | _PCI_VERIFIER_DATA |
struct | _PCI_ID_BUFFER |
struct | _PCI_CONFIGURATOR |
struct | _PCI_CONFIGURATOR_CONTEXT |
struct | _PCI_IPI_CONTEXT |
struct | _PCI_LEGACY_DEVICE |
Enumerations | |
enum | _PCI_SIGNATURE { PciPdoExtensionType = 'icP0' , PciFdoExtensionType = 'icP1' , PciArb_Io = 'icP2' , PciArb_Memory = 'icP3' , PciArb_Interrupt = 'icP4' , PciArb_BusNumber = 'icP5' , PciTrans_Interrupt = 'icP6' , PciInterface_BusHandler = 'icP7' , PciInterface_IntRouteHandler = 'icP8' , PciInterface_PciCb = 'icP9' , PciInterface_LegacyDeviceDetection = 'icP:' , PciInterface_PmeHandler = 'icP;' , PciInterface_DevicePresent = 'icP<' , PciInterface_NativeIde = 'icP=' , PciInterface_AgpTarget = 'icP>' , PciInterface_Location = 'icP?' } |
enum | _PCI_DEVICE_TYPES { PciTypeInvalid , PciTypeHostBridge , PciTypePciBridge , PciTypeCardbusBridge , PciTypeDevice } |
enum | _PCI_STATE { PciNotStarted , PciStarted , PciDeleted , PciStopped , PciSurpriseRemoved , PciSynchronizedOperation , PciMaxObjectState } |
enum | _PCI_DISPATCH_STYLE { IRP_COMPLETE , IRP_DOWNWARD , IRP_UPWARD , IRP_DISPATCH } |
#define ASSERT_FDO | ( | x | ) | ASSERT((x)->ExtensionType == PciFdoExtensionType); |
#define ASSERT_PDO | ( | x | ) | ASSERT((x)->ExtensionType == PciPdoExtensionType); |
#define PCI_HACK_ENTRY_FULL_SIZE sizeof(L"VVVVddddssssIIIIRR") - sizeof(UNICODE_NULL) |
#define PCI_HACK_ENTRY_REV_SIZE sizeof(L"VVVVddddRR") - sizeof(UNICODE_NULL) |
#define PCI_HACK_ENTRY_SIZE sizeof(L"VVVVdddd") - sizeof(UNICODE_NULL) |
#define PCI_HACK_ENTRY_SUBSYS_SIZE sizeof(L"VVVVddddssssIIII") - sizeof(UNICODE_NULL) |
typedef struct _PCI_CONFIGURATOR PCI_CONFIGURATOR |
typedef VOID(NTAPI * PCI_CONFIGURATOR_CHANGE_RESOURCE_SETTINGS) (IN PPCI_PDO_EXTENSION PdoExtension, IN PPCI_COMMON_HEADER PciData) |
typedef VOID(NTAPI * PCI_CONFIGURATOR_GET_ADDITIONAL_RESOURCE_DESCRIPTORS) (IN struct _PCI_CONFIGURATOR_CONTEXT *Context, IN PPCI_COMMON_HEADER PciData, IN PIO_RESOURCE_DESCRIPTOR IoDescriptor) |
typedef VOID(NTAPI * PCI_CONFIGURATOR_RESET_DEVICE) (IN PPCI_PDO_EXTENSION PdoExtension, IN PPCI_COMMON_HEADER PciData) |
typedef enum _PCI_DEVICE_TYPES PCI_DEVICE_TYPES |
typedef struct _PCI_HACK_ENTRY PCI_HACK_ENTRY |
typedef union _PCI_HEADER_TYPE_DEPENDENT PCI_HEADER_TYPE_DEPENDENT |
typedef struct _PCI_ID_BUFFER PCI_ID_BUFFER |
typedef struct _PCI_INTERFACE PCI_INTERFACE |
typedef struct _PCI_IPI_CONTEXT PCI_IPI_CONTEXT |
typedef struct _PCI_POWER_STATE PCI_POWER_STATE |
typedef enum _PCI_SIGNATURE PCI_SIGNATURE |
typedef enum _PCI_STATE PCI_STATE |
typedef struct PCI_ARBITER_INSTANCE * PPCI_ARBITER_INSTANCE |
typedef struct _PCI_CONFIGURATOR * PPCI_CONFIGURATOR |
typedef struct _PCI_FDO_EXTENSION * PPCI_FDO_EXTENSION |
typedef struct _PCI_HACK_ENTRY * PPCI_HACK_ENTRY |
typedef union _PCI_HEADER_TYPE_DEPENDENT * PPCI_HEADER_TYPE_DEPENDENT |
typedef struct _PCI_ID_BUFFER * PPCI_ID_BUFFER |
typedef struct _PCI_INTERFACE * PPCI_INTERFACE |
typedef struct _PCI_IPI_CONTEXT * PPCI_IPI_CONTEXT |
typedef struct _PCI_LEGACY_DEVICE * PPCI_LEGACY_DEVICE |
typedef struct _PCI_PDO_EXTENSION * PPCI_PDO_EXTENSION |
typedef struct _PCI_POWER_STATE * PPCI_POWER_STATE |
typedef enum _PCI_SIGNATURE * PPCI_SIGNATURE |
typedef struct _PCI_VERIFIER_DATA * PPCI_VERIFIER_DATA |
Enumerator | |
---|---|
PciTypeInvalid | |
PciTypeHostBridge | |
PciTypePciBridge | |
PciTypeCardbusBridge | |
PciTypeDevice |
Definition at line 115 of file pci.h.
Enumerator | |
---|---|
IRP_COMPLETE | |
IRP_DOWNWARD | |
IRP_UPWARD | |
IRP_DISPATCH |
Definition at line 141 of file pci.h.
Definition at line 92 of file pci.h.
Enumerator | |
---|---|
PciNotStarted | |
PciStarted | |
PciDeleted | |
PciStopped | |
PciSurpriseRemoved | |
PciSynchronizedOperation | |
PciMaxObjectState |
Definition at line 127 of file pci.h.
NTSTATUS NTAPI agpintrf_Constructor | ( | IN PVOID | DeviceExtension, |
IN PVOID | Instance, | ||
IN PVOID | InterfaceData, | ||
IN USHORT | Version, | ||
IN USHORT | Size, | ||
IN PINTERFACE | Interface | ||
) |
Definition at line 47 of file agpintrf.c.
Definition at line 37 of file agpintrf.c.
NTSTATUS NTAPI arbusno_Constructor | ( | IN PVOID | DeviceExtension, |
IN PVOID | Instance, | ||
IN PVOID | InterfaceData, | ||
IN USHORT | Version, | ||
IN USHORT | Size, | ||
IN PINTERFACE | Interface | ||
) |
Definition at line 73 of file ar_busno.c.
Definition at line 35 of file ar_busno.c.
VOID NTAPI ario_ApplyBrokenVideoHack | ( | IN PPCI_FDO_EXTENSION | FdoExtension | ) |
Definition at line 104 of file ar_memio.c.
Referenced by PciApplyHacks().
NTSTATUS NTAPI ario_Constructor | ( | IN PVOID | DeviceExtension, |
IN PVOID | Instance, | ||
IN PVOID | InterfaceData, | ||
IN USHORT | Version, | ||
IN USHORT | Size, | ||
IN PINTERFACE | Interface | ||
) |
Definition at line 60 of file ar_memio.c.
Definition at line 48 of file ar_memio.c.
NTSTATUS NTAPI armem_Constructor | ( | IN PVOID | DeviceExtension, |
IN PVOID | Instance, | ||
IN PVOID | InterfaceData, | ||
IN USHORT | Version, | ||
IN USHORT | Size, | ||
IN PINTERFACE | Interface | ||
) |
Definition at line 156 of file ar_memio.c.
Definition at line 144 of file ar_memio.c.
NTSTATUS NTAPI busintrf_Constructor | ( | IN PVOID | DeviceExtension, |
IN PVOID | Instance, | ||
IN PVOID | InterfaceData, | ||
IN USHORT | Version, | ||
IN USHORT | Size, | ||
IN PINTERFACE | Interface | ||
) |
Definition at line 45 of file busintrf.c.
Definition at line 35 of file busintrf.c.
VOID NTAPI Cardbus_ChangeResourceSettings | ( | IN PPCI_PDO_EXTENSION | PdoExtension, |
IN PPCI_COMMON_HEADER | PciData | ||
) |
VOID NTAPI Cardbus_GetAdditionalResourceDescriptors | ( | IN PPCI_CONFIGURATOR_CONTEXT | Context, |
IN PPCI_COMMON_HEADER | PciData, | ||
IN PIO_RESOURCE_DESCRIPTOR | IoDescriptor | ||
) |
Definition at line 67 of file cardbus.c.
VOID NTAPI Cardbus_MassageHeaderForLimitsDetermination | ( | IN PPCI_CONFIGURATOR_CONTEXT | Context | ) |
VOID NTAPI Cardbus_ResetDevice | ( | IN PPCI_PDO_EXTENSION | PdoExtension, |
IN PPCI_COMMON_HEADER | PciData | ||
) |
VOID NTAPI Cardbus_RestoreCurrent | ( | IN PPCI_CONFIGURATOR_CONTEXT | Context | ) |
VOID NTAPI Cardbus_SaveCurrentSettings | ( | IN PPCI_CONFIGURATOR_CONTEXT | Context | ) |
VOID NTAPI Cardbus_SaveLimits | ( | IN PPCI_CONFIGURATOR_CONTEXT | Context | ) |
VOID NTAPI Device_ChangeResourceSettings | ( | IN PPCI_PDO_EXTENSION | PdoExtension, |
IN PPCI_COMMON_HEADER | PciData | ||
) |
Definition at line 283 of file device.c.
VOID NTAPI Device_GetAdditionalResourceDescriptors | ( | IN PPCI_CONFIGURATOR_CONTEXT | Context, |
IN PPCI_COMMON_HEADER | PciData, | ||
IN PIO_RESOURCE_DESCRIPTOR | IoDescriptor | ||
) |
Definition at line 259 of file device.c.
VOID NTAPI Device_MassageHeaderForLimitsDetermination | ( | IN PPCI_CONFIGURATOR_CONTEXT | Context | ) |
Definition at line 218 of file device.c.
VOID NTAPI Device_ResetDevice | ( | IN PPCI_PDO_EXTENSION | PdoExtension, |
IN PPCI_COMMON_HEADER | PciData | ||
) |
Definition at line 272 of file device.c.
VOID NTAPI Device_RestoreCurrent | ( | IN PPCI_CONFIGURATOR_CONTEXT | Context | ) |
VOID NTAPI Device_SaveCurrentSettings | ( | IN PPCI_CONFIGURATOR_CONTEXT | Context | ) |
Definition at line 20 of file device.c.
VOID NTAPI Device_SaveLimits | ( | IN PPCI_CONFIGURATOR_CONTEXT | Context | ) |
Definition at line 118 of file device.c.
NTSTATUS NTAPI devpresent_Constructor | ( | IN PVOID | DeviceExtension, |
IN PVOID | Instance, | ||
IN PVOID | InterfaceData, | ||
IN USHORT | Version, | ||
IN USHORT | Size, | ||
IN PINTERFACE | Interface | ||
) |
Definition at line 45 of file devhere.c.
NTSTATUS NTAPI lddintrf_Constructor | ( | IN PVOID | DeviceExtension, |
IN PVOID | Instance, | ||
IN PVOID | InterfaceData, | ||
IN USHORT | Version, | ||
IN USHORT | Size, | ||
IN PINTERFACE | Interface | ||
) |
Definition at line 45 of file lddintrf.c.
Definition at line 35 of file lddintrf.c.
NTSTATUS NTAPI locintrf_Constructor | ( | IN PVOID | DeviceExtension, |
IN PVOID | Instance, | ||
IN PVOID | InterfaceData, | ||
IN USHORT | Version, | ||
IN USHORT | Size, | ||
IN PINTERFACE | Interface | ||
) |
Definition at line 45 of file locintrf.c.
Definition at line 35 of file locintrf.c.
NTSTATUS NTAPI PciAddDevice | ( | IN PDRIVER_OBJECT | DriverObject, |
IN PDEVICE_OBJECT | PhysicalDeviceObject | ||
) |
Definition at line 458 of file fdo.c.
BOOLEAN NTAPI PciAreBusNumbersConfigured | ( | IN PPCI_PDO_EXTENSION | PdoExtension | ) |
Definition at line 20 of file busno.c.
Referenced by PciAddDevice().
NTSTATUS NTAPI PciBeginStateTransition | ( | IN PPCI_FDO_EXTENSION | DeviceExtension, |
IN PCI_STATE | NewState | ||
) |
Definition at line 97 of file state.c.
Referenced by PciFdoIrpStartDevice(), PciPdoIrpStartDevice(), and PciQueryDeviceRelations().
Definition at line 276 of file utils.c.
Referenced by DriverEntry().
NTSTATUS NTAPI PciBuildRequirementsList | ( | IN PPCI_PDO_EXTENSION | PdoExtension, |
IN PPCI_COMMON_HEADER | PciData, | ||
OUT PIO_RESOURCE_REQUIREMENTS_LIST * | Buffer | ||
) |
Definition at line 551 of file enum.c.
Referenced by PciAssignSlotResources(), and PciQueryRequirements().
NTSTATUS NTAPI PciCacheLegacyDeviceRouting | ( | IN PDEVICE_OBJECT | DeviceObject, |
IN ULONG | BusNumber, | ||
IN ULONG | SlotNumber, | ||
IN UCHAR | InterruptLine, | ||
IN UCHAR | InterruptPin, | ||
IN UCHAR | BaseClass, | ||
IN UCHAR | SubClass, | ||
IN PDEVICE_OBJECT | PhysicalDeviceObject, | ||
IN PPCI_PDO_EXTENSION | PdoExtension, | ||
OUT PDEVICE_OBJECT * | pFoundDeviceObject | ||
) |
Definition at line 70 of file routintf.c.
Referenced by PciAssignSlotResources().
Definition at line 39 of file dispatch.c.
Referenced by PciDispatchIrp(), and PciFdoIrpQueryInterface().
NTSTATUS NTAPI PciCancelStateTransition | ( | IN PPCI_FDO_EXTENSION | DeviceExtension, |
IN PCI_STATE | NewState | ||
) |
Definition at line 145 of file state.c.
Referenced by PciFdoIrpStartDevice(), PciPdoIrpStartDevice(), and PciQueryDeviceRelations().
BOOLEAN NTAPI PciCanDisableDecodes | ( | IN PPCI_PDO_EXTENSION | DeviceExtension, |
IN PPCI_COMMON_HEADER | Config, | ||
IN ULONGLONG | HackFlags, | ||
IN BOOLEAN | ForPowerDown | ||
) |
Definition at line 955 of file utils.c.
Referenced by PciDecodeEnable(), and PciSetPowerManagedDevicePowerState().
NTSTATUS NTAPI pcicbintrf_Constructor | ( | IN PVOID | DeviceExtension, |
IN PVOID | Instance, | ||
IN PVOID | InterfaceData, | ||
IN USHORT | Version, | ||
IN USHORT | Size, | ||
IN PINTERFACE | Interface | ||
) |
Definition at line 109 of file cardbus.c.
PCI_DEVICE_TYPES NTAPI PciClassifyDeviceType | ( | IN PPCI_PDO_EXTENSION | PdoExtension | ) |
Definition at line 1051 of file utils.c.
Referenced by PciProcessBus().
VOID NTAPI PciCommitStateTransition | ( | IN PPCI_FDO_EXTENSION | DeviceExtension, |
IN PCI_STATE | NewState | ||
) |
Definition at line 181 of file state.c.
Referenced by PciFdoIrpStartDevice(), and PciPdoIrpStartDevice().
BOOLEAN NTAPI PciComputeNewCurrentSettings | ( | IN PPCI_PDO_EXTENSION | PdoExtension, |
IN PCM_RESOURCE_LIST | ResourceList | ||
) |
Definition at line 55 of file enum.c.
Referenced by PciAssignSlotResources(), and PciPdoIrpStartDevice().
BOOLEAN NTAPI PciCreateIoDescriptorFromBarLimit | ( | PIO_RESOURCE_DESCRIPTOR | ResourceDescriptor, |
IN PULONG | BarArray, | ||
IN BOOLEAN | Rom | ||
) |
Definition at line 1175 of file utils.c.
Referenced by Device_SaveLimits(), and PPBridge_SaveLimits().
VOID NTAPI PciDebugDumpCommonConfig | ( | IN PPCI_COMMON_HEADER | PciData | ) |
Definition at line 207 of file debug.c.
Referenced by PcipGetFunctionLimits(), and PciScanBus().
VOID NTAPI PciDebugDumpQueryCapabilities | ( | IN PDEVICE_CAPABILITIES | DeviceCaps | ) |
Definition at line 221 of file debug.c.
Referenced by PciFdoIrpQueryCapabilities(), and PciQueryCapabilities().
BOOLEAN NTAPI PciDebugIrpDispatchDisplay | ( | IN PIO_STACK_LOCATION | IoStackLocation, |
IN PPCI_FDO_EXTENSION | DeviceExtension, | ||
IN USHORT | MaxMinor | ||
) |
Definition at line 124 of file debug.c.
Referenced by PciDispatchIrp().
VOID NTAPI PciDebugPrintCmResList | ( | IN PCM_RESOURCE_LIST | ResourceList | ) |
Definition at line 364 of file debug.c.
Referenced by PciComputeNewCurrentSettings().
VOID NTAPI PciDebugPrintIoResReqList | ( | IN PIO_RESOURCE_REQUIREMENTS_LIST | Requirements | ) |
Definition at line 302 of file debug.c.
Referenced by PciQueryRequirements().
VOID NTAPI PciDebugPrintPartialResource | ( | IN PCM_PARTIAL_RESOURCE_DESCRIPTOR | PartialResource | ) |
Definition at line 348 of file debug.c.
Referenced by PciComputeNewCurrentSettings(), and PciDebugPrintCmResList().
VOID NTAPI PciDecodeEnable | ( | IN PPCI_PDO_EXTENSION | PdoExtension, |
IN BOOLEAN | Enable, | ||
OUT PUSHORT | Command | ||
) |
Definition at line 1267 of file utils.c.
Referenced by PciApplyHacks(), PciConfigureIdeController(), and PcipUpdateHardware().
Definition at line 99 of file dispatch.c.
Definition at line 1069 of file utils.c.
NTSTATUS NTAPI PciFdoIrpCancelRemoveDevice | ( | IN PIRP | Irp, |
IN PIO_STACK_LOCATION | IoStackLocation, | ||
IN PPCI_FDO_EXTENSION | DeviceExtension | ||
) |
Definition at line 152 of file fdo.c.
NTSTATUS NTAPI PciFdoIrpCancelStopDevice | ( | IN PIRP | Irp, |
IN PIO_STACK_LOCATION | IoStackLocation, | ||
IN PPCI_FDO_EXTENSION | DeviceExtension | ||
) |
Definition at line 194 of file fdo.c.
NTSTATUS NTAPI PciFdoIrpDeviceUsageNotification | ( | IN PIRP | Irp, |
IN PIO_STACK_LOCATION | IoStackLocation, | ||
IN PPCI_FDO_EXTENSION | DeviceExtension | ||
) |
Definition at line 337 of file fdo.c.
NTSTATUS NTAPI PciFdoIrpQueryCapabilities | ( | IN PIRP | Irp, |
IN PIO_STACK_LOCATION | IoStackLocation, | ||
IN PPCI_FDO_EXTENSION | DeviceExtension | ||
) |
Definition at line 310 of file fdo.c.
NTSTATUS NTAPI PciFdoIrpQueryDeviceRelations | ( | IN PIRP | Irp, |
IN PIO_STACK_LOCATION | IoStackLocation, | ||
IN PPCI_FDO_EXTENSION | DeviceExtension | ||
) |
Definition at line 208 of file fdo.c.
NTSTATUS NTAPI PciFdoIrpQueryInterface | ( | IN PIRP | Irp, |
IN PIO_STACK_LOCATION | IoStackLocation, | ||
IN PPCI_FDO_EXTENSION | DeviceExtension | ||
) |
Definition at line 235 of file fdo.c.
NTSTATUS NTAPI PciFdoIrpQueryLegacyBusInformation | ( | IN PIRP | Irp, |
IN PIO_STACK_LOCATION | IoStackLocation, | ||
IN PPCI_FDO_EXTENSION | DeviceExtension | ||
) |
Definition at line 365 of file fdo.c.
NTSTATUS NTAPI PciFdoIrpQueryPower | ( | IN PIRP | Irp, |
IN PIO_STACK_LOCATION | IoStackLocation, | ||
IN PPCI_FDO_EXTENSION | DeviceExtension | ||
) |
Definition at line 236 of file power.c.
NTSTATUS NTAPI PciFdoIrpQueryRemoveDevice | ( | IN PIRP | Irp, |
IN PIO_STACK_LOCATION | IoStackLocation, | ||
IN PPCI_FDO_EXTENSION | DeviceExtension | ||
) |
Definition at line 124 of file fdo.c.
NTSTATUS NTAPI PciFdoIrpQueryStopDevice | ( | IN PIRP | Irp, |
IN PIO_STACK_LOCATION | IoStackLocation, | ||
IN PPCI_FDO_EXTENSION | DeviceExtension | ||
) |
Definition at line 180 of file fdo.c.
NTSTATUS NTAPI PciFdoIrpRemoveDevice | ( | IN PIRP | Irp, |
IN PIO_STACK_LOCATION | IoStackLocation, | ||
IN PPCI_FDO_EXTENSION | DeviceExtension | ||
) |
Definition at line 138 of file fdo.c.
NTSTATUS NTAPI PciFdoIrpStartDevice | ( | IN PIRP | Irp, |
IN PIO_STACK_LOCATION | IoStackLocation, | ||
IN PPCI_FDO_EXTENSION | DeviceExtension | ||
) |
Definition at line 76 of file fdo.c.
NTSTATUS NTAPI PciFdoIrpStopDevice | ( | IN PIRP | Irp, |
IN PIO_STACK_LOCATION | IoStackLocation, | ||
IN PPCI_FDO_EXTENSION | DeviceExtension | ||
) |
Definition at line 166 of file fdo.c.
NTSTATUS NTAPI PciFdoIrpSurpriseRemoval | ( | IN PIRP | Irp, |
IN PIO_STACK_LOCATION | IoStackLocation, | ||
IN PPCI_FDO_EXTENSION | DeviceExtension | ||
) |
Definition at line 351 of file