ReactOS  0.4.13-dev-563-g0561610
fdc.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Floppy Disk Controller Driver
3  * LICENSE: GNU GPLv2 only as published by the Free Software Foundation
4  * FILE: drivers/storage/fdc/fdc/fdc.h
5  * PURPOSE: Common header file
6  * PROGRAMMERS: Eric Kohl
7  */
8 
9 #ifndef _FDC_PCH_
10 #define _FDC_PCH_
11 
12 #include <ntifs.h>
13 
14 #define MAX_DEVICE_NAME 255
15 #define MAX_ARC_PATH_LEN 255
16 #define MAX_DRIVES_PER_CONTROLLER 4
17 #define MAX_CONTROLLERS 4
18 
19 struct _CONTROLLER_INFO;
20 
21 typedef struct _DRIVE_INFO
22 {
24  UCHAR UnitNumber; /* 0,1,2,3 */
28 // LARGE_INTEGER MotorStartTime;
29 // DISK_GEOMETRY DiskGeometry;
30 // UCHAR BytesPerSectorCode;
31 // WCHAR SymLinkBuffer[MAX_DEVICE_NAME];
32 // WCHAR ArcPathBuffer[MAX_ARC_PATH_LEN];
33 // ULONG DiskChangeCount;
34 // BOOLEAN Initialized;
36 
37 typedef struct _CONTROLLER_INFO
38 {
40 // BOOLEAN Initialized;
41 // ULONG ControllerNumber;
42 // INTERFACE_TYPE InterfaceType;
43 // ULONG BusNumber;
44 // ULONG Level;
45 // KIRQL MappedLevel;
46 // ULONG Vector;
47 // ULONG MappedVector;
48 // KINTERRUPT_MODE InterruptMode;
50 // ULONG Dma;
51 // ULONG MapRegisters;
52 // PVOID MapRegisterBase;
53 // BOOLEAN Master;
54 // KEVENT SynchEvent;
55 // KDPC Dpc;
56 // PKINTERRUPT InterruptObject;
57 // PADAPTER_OBJECT AdapterObject;
59 // BOOLEAN ImpliedSeeks;
61 // PDRIVE_INFO CurrentDrive;
62 // BOOLEAN Model30;
63 // KEVENT MotorStoppedEvent;
64 // KTIMER MotorTimer;
65 // KDPC MotorStopDpc;
66 // BOOLEAN StopDpcQueued;
68 
69 
70 typedef struct _COMMON_DEVICE_EXTENSION
71 {
72  BOOLEAN IsFDO;
75 
76 typedef struct _FDO_DEVICE_EXTENSION
77 {
79 
82 
84 
86 
87 
88 typedef struct _PDO_DEVICE_EXTENSION
89 {
91 
94 
96  UNICODE_STRING DeviceId; // REG_SZ
97  UNICODE_STRING InstanceId; // REG_SZ
98  UNICODE_STRING HardwareIds; // REG_MULTI_SZ
99  UNICODE_STRING CompatibleIds; // REG_MULTI_SZ
101 
102 #define FDC_TAG 'acdF'
103 
104 /* fdo.c */
105 
106 NTSTATUS
107 NTAPI
108 FdcFdoPnp(
110  IN PIRP Irp);
111 
112 /* misc.c */
113 
114 NTSTATUS
116  IN ULONG Flags,
119 
120 /* pdo.c */
121 
122 NTSTATUS
123 NTAPI
124 FdcPdoPnp(
126  IN PIRP Irp);
127 
128 #endif /* _FDC_PCH_ */
struct _CONTROLLER_INFO * PCONTROLLER_INFO
#define IN
Definition: typedefs.h:38
struct _DRIVE_INFO * PDRIVE_INFO
PDRIVE_INFO DriveInfo
Definition: fdc.h:93
struct _DRIVE_INFO DRIVE_INFO
_In_ PIRP Irp
Definition: csq.h:116
unsigned char * PUCHAR
Definition: retypes.h:3
LONG NTSTATUS
Definition: precomp.h:26
struct _PDO_DEVICE_EXTENSION * PPDO_DEVICE_EXTENSION
PDEVICE_OBJECT Fdo
Definition: pci.h:57
UNICODE_STRING HardwareIds
Definition: serenum.h:54
struct _FDO_DEVICE_EXTENSION FDO_DEVICE_EXTENSION
struct _FDO_DEVICE_EXTENSION * PFDO_DEVICE_EXTENSION
struct _CONTROLLER_INFO * ControllerInfo
Definition: fdc.h:23
UCHAR NumberOfDrives
Definition: fdc.h:58
#define MAX_DRIVES_PER_CONTROLLER
Definition: fdc.h:16
PDEVICE_OBJECT DeviceObject
Definition: fdc.h:26
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
BOOLEAN Populated
Definition: fdc.h:39
unsigned char BOOLEAN
_Out_ _Inout_ POEM_STRING DestinationString
Definition: rtlfuncs.h:1869
NTSTATUS NTAPI FdcFdoPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fdo.c:491
COMMON_DEVICE_EXTENSION Common
Definition: pci.h:55
PDEVICE_OBJECT DeviceObject
Definition: pci.h:42
UNICODE_STRING DeviceId
Definition: serenum.h:52
UNICODE_STRING DeviceDescription
Definition: pci.h:69
unsigned char UCHAR
Definition: xmlstorage.h:181
CM_FLOPPY_DEVICE_DATA FloppyDeviceData
Definition: fdc.h:27
_Out_ _Inout_ POEM_STRING _In_ PCUNICODE_STRING SourceString
Definition: rtlfuncs.h:1869
COMMON_DEVICE_EXTENSION Common
Definition: pci.h:80
UCHAR UnitNumber
Definition: fdc.h:24
struct _PDO_DEVICE_EXTENSION PDO_DEVICE_EXTENSION
struct _CONTROLLER_INFO CONTROLLER_INFO
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
struct _COMMON_DEVICE_EXTENSION * PCOMMON_DEVICE_EXTENSION
struct _COMMON_DEVICE_EXTENSION COMMON_DEVICE_EXTENSION
CONTROLLER_INFO ControllerInfo
Definition: fdc.h:83
DRIVE_INFO DriveInfo[MAX_DRIVES_PER_CONTROLLER]
Definition: fdc.h:60
NTSTATUS NTAPI FdcPdoPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: pdo.c:98
PUCHAR BaseAddress
Definition: fdc.h:49
#define OUT
Definition: typedefs.h:39
PDEVICE_OBJECT Pdo
Definition: i8042prt.h:128
unsigned int ULONG
Definition: retypes.h:1
ULONG PeripheralNumber
Definition: fdc.h:25
UNICODE_STRING CompatibleIds
Definition: serenum.h:55
PDEVICE_OBJECT LowerDevice
Definition: i8042prt.h:130
NTSTATUS DuplicateUnicodeString(IN ULONG Flags, IN PCUNICODE_STRING SourceString, OUT PUNICODE_STRING DestinationString)
Definition: misc.c:72
UNICODE_STRING InstanceId
Definition: serenum.h:53