25 IoBase =
PdoExtension->ParentController->BusMasterPortBase;
30 DPRINT(
"Bus Master Base %p\n", IoBase);
111 if (!DeviceRelations)
114 DeviceRelations->
Count = 1;
134 if (
Irp->PendingReturned)
213 RtlZeroMemory(&ParentCapabilities,
sizeof(ParentCapabilities));
214 ParentCapabilities.Size =
sizeof(ParentCapabilities);
215 ParentCapabilities.Version = 1;
216 ParentCapabilities.Address =
MAXULONG;
217 ParentCapabilities.UINumber =
MAXULONG;
263 ULONG CommandPortBase, ControlPortBase, InterruptVector;
270 return Irp->IoStatus.Status;
274 return Irp->IoStatus.Status;
309 Descriptor->u.Port.Start.LowPart = CommandPortBase;
317 Descriptor->u.Port.Start.LowPart = ControlPortBase;
324 Descriptor->u.Interrupt.Level = InterruptVector;
325 Descriptor->u.Interrupt.Vector = InterruptVector;
343 ULONG CommandPortBase, ControlPortBase, InterruptVector;
350 return Irp->IoStatus.Status;
354 return Irp->IoStatus.Status;
391 Descriptor->u.Port.MinimumAddress.LowPart = CommandPortBase;
392 Descriptor->u.Port.MaximumAddress.LowPart = CommandPortBase +
402 Descriptor->u.Port.MinimumAddress.LowPart = ControlPortBase;
403 Descriptor->u.Port.MaximumAddress.LowPart = ControlPortBase +
411 Descriptor->u.Interrupt.MinimumVector = InterruptVector;
412 Descriptor->u.Interrupt.MaximumVector = InterruptVector;
487 size_t CharCount, Remaining;
488 static const WCHAR IdeCompatibleId[] =
L"*PNP0600";
497 static const WCHAR PciIdeDeviceId[] =
L"PCIIDE\\IDEChannel";
518 CharCount =
sizeof(
"WinBond-1234") +
519 sizeof(
"Secondary_IDE_Channel") +
520 sizeof(IdeCompatibleId) +
524 CharCount *
sizeof(
WCHAR),
589 L"Primary_IDE_Channel" :
590 L"Secondary_IDE_Channel");
593 DPRINT(
" '%S'\n", IdStart);
609 DPRINT(
" '%S'\n", IdStart);
633 CharCount =
sizeof(
"0");
636 CharCount *
sizeof(
WCHAR),
655 return Irp->IoStatus.Status;
680 static const WCHAR PrimaryChannelText[] =
L"Primary channel";
681 static const WCHAR SecondaryChannelText[] =
L"Secondary channel";
684 Size =
sizeof(PrimaryChannelText);
686 Size =
sizeof(SecondaryChannelText);
694 PrimaryChannelText : SecondaryChannelText,
702 return Irp->IoStatus.Status;
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define STATUS_NOT_SUPPORTED
#define NT_SUCCESS(StatCode)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define KeInitializeEvent(pEvt, foo, foo2)
#define KeSetEvent(pEvt, foo, foo2)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
struct _CM_RESOURCE_LIST CM_RESOURCE_LIST
#define CmResourceTypePort
#define CmResourceTypeInterrupt
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
FORCEINLINE PVOID ExAllocatePoolZero(ULONG PoolType, SIZE_T NumberOfBytes, ULONG Tag)
#define CM_RESOURCE_PORT_IO
#define CM_RESOURCE_PORT_16_BIT_DECODE
#define CM_RESOURCE_INTERRUPT_LATCHED
#define _In_reads_opt_(s)
#define DBG_UNREFERENCED_LOCAL_VARIABLE(L)
#define UNREFERENCED_PARAMETER(P)
#define IRP_MN_SURPRISE_REMOVAL
VOID NTAPI IoDeleteDevice(IN PDEVICE_OBJECT DeviceObject)
PDEVICE_OBJECT NTAPI IoGetAttachedDeviceReference(PDEVICE_OBJECT DeviceObject)
#define IoCompleteRequest
PIRP NTAPI IoAllocateIrp(IN CCHAR StackSize, IN BOOLEAN ChargeQuota)
VOID NTAPI IoFreeIrp(IN PIRP Irp)
NTSTRSAFEVAPI RtlStringCchPrintfExW(_Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cchDest, _Outptr_opt_result_buffer_(*pcchRemaining) NTSTRSAFE_PWSTR *ppszDestEnd, _Out_opt_ size_t *pcchRemaining, _In_ STRSAFE_DWORD dwFlags, _In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat,...)
#define PCIIDE_LEGACY_PRIMARY_CONTROL_BASE
#define PCIIDE_LEGACY_SECONDARY_COMMAND_BASE
#define IS_PRIMARY_CHANNEL(PdoExtension)
#define PCIIDE_LEGACY_SECONDARY_CONTROL_BASE
#define PCIIDE_LEGACY_PRIMARY_IRQ
#define BM_SECONDARY_CHANNEL_OFFSET
#define PCIIDE_LEGACY_COMMAND_IO_RANGE_LENGTH
#define PCIIDE_LEGACY_RESOURCE_COUNT
#define PCIIDE_LEGACY_CONTROL_IO_RANGE_LENGTH
#define PCIIDE_LEGACY_SECONDARY_IRQ
#define PCIIDE_LEGACY_PRIMARY_COMMAND_BASE
VOID NTAPI IoInvalidateDeviceState(IN PDEVICE_OBJECT DeviceObject)
#define STATUS_MORE_PROCESSING_REQUIRED
NTSTATUS PciIdeXFdoDispatchPnp(_In_ PFDO_DEVICE_EXTENSION FdoExtension, _Inout_ PIRP Irp)
IDE_CHANNEL_STATE PciIdeXChannelState(_In_ PFDO_DEVICE_EXTENSION FdoExtension, _In_ ULONG Channel)
static NTSTATUS PciIdeXPdoQueryStopRemoveDevice(_In_ PPDO_DEVICE_EXTENSION PdoExtension)
static PCWSTR PciIdeXGetControllerVendorId(_In_ PFDO_DEVICE_EXTENSION FdoExtension)
static NTSTATUS PciIdeXPdoQueryDeviceUsageNotification(_In_ PPDO_DEVICE_EXTENSION PdoExtension, _In_ PIRP Irp)
static NTSTATUS PciIdeXPdoRemoveDevice(_In_ PPDO_DEVICE_EXTENSION PdoExtension, _In_ BOOLEAN FinalRemove)
static NTSTATUS PciIdeXPdoQueryResources(_In_ PPDO_DEVICE_EXTENSION PdoExtension, _In_ PIRP Irp)
static NTSTATUS PciIdeXPdoQueryCapabilities(_In_ PPDO_DEVICE_EXTENSION PdoExtension, _In_ PIRP Irp)
static NTSTATUS PciIdeXPdoStartDevice(_In_ PPDO_DEVICE_EXTENSION PdoExtension, _In_ PCM_RESOURCE_LIST ResourceList)
static NTSTATUS PciIdeXPdoQueryDeviceText(_In_ PPDO_DEVICE_EXTENSION PdoExtension, _In_ PIRP Irp)
NTSTATUS NTAPI PciIdeXDispatchPnp(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp)
static NTSTATUS PciIdeXPdoQueryResourceRequirements(_In_ PPDO_DEVICE_EXTENSION PdoExtension, _In_ PIRP Irp)
static NTSTATUS PciIdeXPdoDispatchPnp(_In_ PPDO_DEVICE_EXTENSION PdoExtension, _Inout_ PIRP Irp)
static NTSTATUS PciIdeXPdoRepeatRequest(_In_ PPDO_DEVICE_EXTENSION PdoExtension, _In_ PIRP Irp, _In_opt_ PDEVICE_CAPABILITIES DeviceCapabilities)
static NTSTATUS PciIdeXPdoQueryTargetDeviceRelations(_In_ PPDO_DEVICE_EXTENSION PdoExtension, _In_ PIRP Irp)
static IO_COMPLETION_ROUTINE PciIdeXOnRepeaterCompletion
static NTSTATUS PciIdeXPdoQueryPnpDeviceState(_In_ PPDO_DEVICE_EXTENSION PdoExtension, _In_ PIRP Irp)
static NTSTATUS PciIdeXPdoQueryId(_In_ PPDO_DEVICE_EXTENSION PdoExtension, _In_ PIRP Irp)
static PCWSTR PciIdeXGetControllerDeviceId(_In_ PFDO_DEVICE_EXTENSION FdoExtension)
static NTSTATUS PciIdeXPdoStopDevice(_In_ PPDO_DEVICE_EXTENSION PdoExtension)
PDEVICE_OBJECT Objects[1]
union _IO_STACK_LOCATION::@1579 Parameters
struct _IO_STACK_LOCATION::@3978::@4015 StartDevice
struct _IO_STACK_LOCATION::@3978::@4003 QueryDeviceRelations
struct _IO_STACK_LOCATION::@3978::@4010 QueryDeviceText
struct _IO_STACK_LOCATION::@3978::@4005 DeviceCapabilities
struct _IO_STACK_LOCATION::@3978::@4009 QueryId
struct _IO_STACK_LOCATION::@3978::@4011 UsageNotification
static LARGE_INTEGER Counter
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define STATUS_DEVICE_BUSY
#define STATUS_INSUFFICIENT_RESOURCES
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFDEVICE Fdo
_Must_inspect_result_ _In_ WDFIORESREQLIST _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFIORESLIST * ResourceList
_In_ WDFIORESREQLIST RequirementsList
_Must_inspect_result_ _In_ WDFIORESLIST _In_ PIO_RESOURCE_DESCRIPTOR Descriptor
#define DeviceCapabilities
@ CmResourceShareDeviceExclusive
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
#define IoAdjustPagingPathCount(_Count, _Increment)
#define IRP_MN_CANCEL_STOP_DEVICE
#define IRP_MN_QUERY_PNP_DEVICE_STATE
#define PNP_DEVICE_NOT_DISABLEABLE
#define IRP_MN_START_DEVICE
#define IRP_MN_DEVICE_USAGE_NOTIFICATION
#define IRP_MN_QUERY_RESOURCE_REQUIREMENTS
#define IRP_MN_REMOVE_DEVICE
#define IRP_MN_QUERY_DEVICE_RELATIONS
#define IRP_MN_QUERY_STOP_DEVICE
#define IRP_MN_QUERY_DEVICE_TEXT
#define IRP_MN_QUERY_CAPABILITIES
#define IRP_MN_QUERY_RESOURCES
#define IRP_MN_CANCEL_REMOVE_DEVICE
#define IRP_MN_STOP_DEVICE
@ DeviceTextLocationInformation
struct _IO_RESOURCE_REQUIREMENTS_LIST IO_RESOURCE_REQUIREMENTS_LIST
@ DeviceUsageTypeHibernation
@ DeviceUsageTypeDumpFile
#define IRP_MN_QUERY_REMOVE_DEVICE
#define ObDereferenceObject
#define ObReferenceObject