ReactOS  0.4.15-dev-1389-g828d5fa
iomgr.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS Kernel
4  * FILE: ntoskrnl/io/iomgr/iomgr.c
5  * PURPOSE: I/O Manager Initialization and Misc Utility Functions
6  *
7  * PROGRAMMERS: David Welch (welch@mcmail.com)
8  */
9 
10 /* INCLUDES ****************************************************************/
11 
12 #include <ntoskrnl.h>
13 #define NDEBUG
14 #include <debug.h>
15 
18 
19 VOID
20 NTAPI
22  IN PKDPC Dpc,
26 );
27 
28 BOOLEAN
29 NTAPI
31  VOID);
32 
33 /* DATA ********************************************************************/
34 
48 
54 
73 extern KDPC IopTimerDpc;
74 extern KTIMER IopTimer;
80 
82 
87 
89 
90 /* INIT FUNCTIONS ************************************************************/
91 
92 CODE_SEG("INIT")
93 VOID
94 NTAPI
96 {
97  ULONG LargeIrpSize, SmallIrpSize, MdlSize;
98  LONG i;
99  PKPRCB Prcb;
100  PGENERAL_LOOKASIDE CurrentList = NULL;
101 
102  /* Calculate the sizes */
103  LargeIrpSize = sizeof(IRP) + (8 * sizeof(IO_STACK_LOCATION));
104  SmallIrpSize = sizeof(IRP) + sizeof(IO_STACK_LOCATION);
105  MdlSize = sizeof(MDL) + (23 * sizeof(PFN_NUMBER));
106 
107  /* Initialize the Lookaside List for I\O Completion */
109  NonPagedPool,
111  IOC_TAG1,
112  32,
114 
115  /* Initialize the Lookaside List for Large IRPs */
117  NonPagedPool,
118  LargeIrpSize,
119  IO_LARGEIRP,
120  64,
122 
123 
124  /* Initialize the Lookaside List for Small IRPs */
126  NonPagedPool,
127  SmallIrpSize,
128  IO_SMALLIRP,
129  32,
131 
132  /* Initialize the Lookaside List for MDLs */
134  NonPagedPool,
135  MdlSize,
136  TAG_MDL,
137  128,
139 
140  /* Allocate the global lookaside list buffer */
141  CurrentList = ExAllocatePoolWithTag(NonPagedPool,
142  4 * KeNumberProcessors *
143  sizeof(GENERAL_LOOKASIDE),
144  TAG_IO);
145 
146  /* Loop all processors */
147  for (i = 0; i < KeNumberProcessors; i++)
148  {
149  /* Get the PRCB for this CPU */
150  Prcb = KiProcessorBlock[i];
151  DPRINT("Setting up lookaside for CPU: %x, PRCB: %p\n", i, Prcb);
152 
153  /* Write IRP credit limit */
155 
156  /* Set the I/O Completion List */
158  if (CurrentList)
159  {
160  /* Initialize the Lookaside List for mini-packets */
162  NonPagedPool,
165  32,
167  Prcb->PPLookasideList[LookasideCompletionList].P = CurrentList;
168  CurrentList++;
169 
170  }
171  else
172  {
174  }
175 
176  /* Set the Large IRP List */
178  if (CurrentList)
179  {
180  /* Initialize the Lookaside List for Large IRPs */
182  NonPagedPool,
183  LargeIrpSize,
185  64,
187  Prcb->PPLookasideList[LookasideLargeIrpList].P = CurrentList;
188  CurrentList++;
189 
190  }
191  else
192  {
194  }
195 
196  /* Set the Small IRP List */
198  if (CurrentList)
199  {
200  /* Initialize the Lookaside List for Small IRPs */
202  NonPagedPool,
203  SmallIrpSize,
205  32,
207  Prcb->PPLookasideList[LookasideSmallIrpList].P = CurrentList;
208  CurrentList++;
209 
210  }
211  else
212  {
214  }
215 
216  /* Set the MDL Completion List */
218  if (CurrentList)
219  {
220  /* Initialize the Lookaside List for MDLs */
222  NonPagedPool,
223  SmallIrpSize,
224  TAG_MDL,
225  128,
227 
228  Prcb->PPLookasideList[LookasideMdlList].P = CurrentList;
229  CurrentList++;
230 
231  }
232  else
233  {
235  }
236  }
237 }
238 
239 CODE_SEG("INIT")
240 BOOLEAN
241 NTAPI
243 {
244  OBJECT_TYPE_INITIALIZER ObjectTypeInitializer;
246 
247  /* Initialize default settings */
248  RtlZeroMemory(&ObjectTypeInitializer, sizeof(ObjectTypeInitializer));
249  ObjectTypeInitializer.Length = sizeof(ObjectTypeInitializer);
250  ObjectTypeInitializer.PoolType = NonPagedPool;
251  ObjectTypeInitializer.InvalidAttributes = OBJ_OPENLINK;
252  ObjectTypeInitializer.ValidAccessMask = FILE_ALL_ACCESS;
253  ObjectTypeInitializer.UseDefaultObject = TRUE;
254  ObjectTypeInitializer.GenericMapping = IopFileMapping;
255 
256  /* Do the Adapter Type */
257  RtlInitUnicodeString(&Name, L"Adapter");
259  &ObjectTypeInitializer,
260  NULL,
261  &IoAdapterObjectType))) return FALSE;
262 
263  /* Do the Controller Type */
264  RtlInitUnicodeString(&Name, L"Controller");
265  ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(CONTROLLER_OBJECT);
267  &ObjectTypeInitializer,
268  NULL,
269  &IoControllerObjectType))) return FALSE;
270 
271  /* Do the Device Type */
272  RtlInitUnicodeString(&Name, L"Device");
273  ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(DEVICE_OBJECT);
274  ObjectTypeInitializer.DeleteProcedure = IopDeleteDevice;
275  ObjectTypeInitializer.ParseProcedure = IopParseDevice;
276  ObjectTypeInitializer.SecurityProcedure = IopGetSetSecurityObject;
277  ObjectTypeInitializer.CaseInsensitive = TRUE;
279  &ObjectTypeInitializer,
280  NULL,
281  &IoDeviceObjectType))) return FALSE;
282 
283  /* Initialize the Driver object type */
284  RtlInitUnicodeString(&Name, L"Driver");
285  ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(DRIVER_OBJECT);
286  ObjectTypeInitializer.DeleteProcedure = IopDeleteDriver;
287  ObjectTypeInitializer.ParseProcedure = NULL;
288  ObjectTypeInitializer.SecurityProcedure = NULL;
290  &ObjectTypeInitializer,
291  NULL,
292  &IoDriverObjectType))) return FALSE;
293 
294  /* Initialize the I/O Completion object type */
295  RtlInitUnicodeString(&Name, L"IoCompletion");
296  ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(KQUEUE);
297  ObjectTypeInitializer.ValidAccessMask = IO_COMPLETION_ALL_ACCESS;
298  ObjectTypeInitializer.InvalidAttributes |= OBJ_PERMANENT;
299  ObjectTypeInitializer.GenericMapping = IopCompletionMapping;
300  ObjectTypeInitializer.DeleteProcedure = IopDeleteIoCompletion;
302  &ObjectTypeInitializer,
303  NULL,
304  &IoCompletionType))) return FALSE;
305 
306  /* Initialize the File object type */
307  RtlInitUnicodeString(&Name, L"File");
308  ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(FILE_OBJECT);
309  ObjectTypeInitializer.InvalidAttributes |= OBJ_EXCLUSIVE;
310  ObjectTypeInitializer.MaintainHandleCount = TRUE;
311  ObjectTypeInitializer.ValidAccessMask = FILE_ALL_ACCESS;
312  ObjectTypeInitializer.GenericMapping = IopFileMapping;
313  ObjectTypeInitializer.CloseProcedure = IopCloseFile;
314  ObjectTypeInitializer.DeleteProcedure = IopDeleteFile;
315  ObjectTypeInitializer.SecurityProcedure = IopGetSetSecurityObject;
316  ObjectTypeInitializer.QueryNameProcedure = IopQueryName;
317  ObjectTypeInitializer.ParseProcedure = IopParseFile;
318  ObjectTypeInitializer.UseDefaultObject = FALSE;
320  &ObjectTypeInitializer,
321  NULL,
322  &IoFileObjectType))) return FALSE;
323 
324  /* Success */
325  return TRUE;
326 }
327 
328 CODE_SEG("INIT")
329 BOOLEAN
330 NTAPI
332 {
335  HANDLE Handle;
337 
338  /* Create the '\Driver' object directory */
339  RtlInitUnicodeString(&DirName, L"\\Driver");
341  &DirName,
343  NULL,
344  NULL);
348  if (!NT_SUCCESS(Status))
349  {
350  DPRINT1("Failed to create \\Driver directory: 0x%lx\n", Status);
351  return FALSE;
352  }
353  NtClose(Handle);
354 
355  /* Create the '\FileSystem' object directory */
356  RtlInitUnicodeString(&DirName, L"\\FileSystem");
358  &DirName,
360  NULL,
361  NULL);
365  if (!NT_SUCCESS(Status))
366  {
367  DPRINT1("Failed to create \\FileSystem directory: 0x%lx\n", Status);
368  return FALSE;
369  }
370  NtClose(Handle);
371 
372  /* Create the '\FileSystem' object directory */
373  RtlInitUnicodeString(&DirName, L"\\FileSystem\\Filters");
375  &DirName,
377  NULL,
378  NULL);
382  if (!NT_SUCCESS(Status))
383  {
384  DPRINT1("Failed to create \\FileSystem\\Filters directory: 0x%lx\n", Status);
385  return FALSE;
386  }
387  NtClose(Handle);
388 
389  /* Return success */
390  return TRUE;
391 }
392 
393 CODE_SEG("INIT")
394 BOOLEAN
395 NTAPI
397 {
399  STRING DeviceString;
400  CHAR Buffer[256];
406 
407  /* Build the ARC device name */
408  sprintf(Buffer, "\\ArcName\\%s", LoaderBlock->ArcBootDeviceName);
409  RtlInitAnsiString(&DeviceString, Buffer);
411  if (!NT_SUCCESS(Status)) return FALSE;
412 
413  /* Open it */
415  &DeviceName,
417  NULL,
418  NULL);
422  &IoStatusBlock,
423  0,
425  if (!NT_SUCCESS(Status))
426  {
427  /* Fail */
428  KeBugCheckEx(INACCESSIBLE_BOOT_DEVICE,
430  Status,
431  0,
432  0);
433  }
434 
435  /* Get the DO */
437  0,
439  KernelMode,
440  (PVOID *)&FileObject,
441  NULL);
442  if (!NT_SUCCESS(Status))
443  {
444  /* Fail */
446  return FALSE;
447  }
448 
449  /* Mark it as the boot partition */
450  FileObject->DeviceObject->Flags |= DO_SYSTEM_BOOT_PARTITION;
451 
452  /* Save a copy of the DO for the I/O Error Logger */
453  ObReferenceObject(FileObject->DeviceObject);
454  IopErrorLogObject = FileObject->DeviceObject;
455 
456  /* Cleanup and return success */
460  return TRUE;
461 }
462 
463 CODE_SEG("INIT")
464 BOOLEAN
465 NTAPI
467 {
468  LARGE_INTEGER ExpireTime;
470  CHAR Buffer[256];
471  ANSI_STRING NtBootPath, RootString;
472 
473  /* Initialize empty NT Boot Path */
474  RtlInitEmptyAnsiString(&NtBootPath, Buffer, sizeof(Buffer));
475 
476  /* Initialize the lookaside lists */
478 
479  /* Initialize all locks and lists */
500 
501  /* Initialize the reserve IRP */
503  {
504  DPRINT1("IopInitializeReserveIrp failed!\n");
505  return FALSE;
506  }
507 
508  /* Initialize Timer List Lock */
510 
511  /* Initialize Timer List */
513 
514  /* Initialize the DPC/Timer which will call the other Timer Routines */
515  ExpireTime.QuadPart = -10000000;
518  KeSetTimerEx(&IopTimer, ExpireTime, 1000, &IopTimerDpc);
519 
520  /* Create Object Types */
521  if (!IopCreateObjectTypes())
522  {
523  DPRINT1("IopCreateObjectTypes failed!\n");
524  return FALSE;
525  }
526 
527  /* Create Object Directories */
529  {
530  DPRINT1("IopCreateRootDirectories failed!\n");
531  return FALSE;
532  }
533 
534  /* Initialize PnP manager */
536 
537  /* Initialize SHIM engine */
539 
540  /* Initialize WMI */
541  WmiInitialize();
542 
543  /* Initialize HAL Root Bus Driver */
545 
546  /* Reenumerate what HAL has added (synchronously)
547  * This function call should eventually become a 2nd stage of the PnP initialization */
550  NULL,
551  NULL);
552 
553  /* Make loader block available for the whole kernel */
554  IopLoaderBlock = LoaderBlock;
555 
556  /* Load boot start drivers */
558 
559  /* Call back drivers that asked for */
561 
562  /* Check if this was a ramdisk boot */
563  if (!_strnicmp(LoaderBlock->ArcBootDeviceName, "ramdisk(0)", 10))
564  {
565  /* Initialize the ramdisk driver */
566  IopStartRamdisk(LoaderBlock);
567  }
568 
569  /* No one should need loader block any longer */
571 
572  /* Create ARC names for boot devices */
573  Status = IopCreateArcNames(LoaderBlock);
574  if (!NT_SUCCESS(Status))
575  {
576  DPRINT1("IopCreateArcNames failed: %lx\n", Status);
577  return FALSE;
578  }
579 
580  /* Mark the system boot partition */
581  if (!IopMarkBootPartition(LoaderBlock))
582  {
583  DPRINT1("IopMarkBootPartition failed!\n");
584  return FALSE;
585  }
586 
587 #if !defined(_WINKD_) && defined(KDBG)
588  /* Read KDB Data */
589  KdbInit();
590 
591  /* I/O is now setup for disk access, so phase 3 */
592  KdInitSystem(3, LoaderBlock);
593 #endif
594 
595  /* Load services for devices found by PnP manager */
597 
598  /* Load system start drivers */
601 
602  /* Reinitialize drivers that requested it */
604 
605  /* Convert SystemRoot from ARC to NT path */
606  Status = IopReassignSystemRoot(LoaderBlock, &NtBootPath);
607  if (!NT_SUCCESS(Status))
608  {
609  DPRINT1("IopReassignSystemRoot failed: %lx\n", Status);
610  return FALSE;
611  }
612 
613  /* Set the ANSI_STRING for the root path */
614  RootString.MaximumLength = NtSystemRoot.MaximumLength / sizeof(WCHAR);
615  RootString.Length = 0;
617  RootString.MaximumLength,
618  TAG_IO);
619 
620  /* Convert the path into the ANSI_STRING */
622  if (!NT_SUCCESS(Status))
623  {
624  DPRINT1("RtlUnicodeStringToAnsiString failed: %lx\n", Status);
625  return FALSE;
626  }
627 
628  /* Assign drive letters */
629  IoAssignDriveLetters(LoaderBlock,
630  &NtBootPath,
631  (PUCHAR)RootString.Buffer,
632  &RootString);
633 
634  /* Update system root */
636  if (!NT_SUCCESS(Status))
637  {
638  DPRINT1("RtlAnsiStringToUnicodeString failed: %lx\n", Status);
639  return FALSE;
640  }
641 
642  /* Load the System DLL and its Entrypoints */
644  if (!NT_SUCCESS(Status))
645  {
646  DPRINT1("PsLocateSystemDll failed: %lx\n", Status);
647  return FALSE;
648  }
649 
650  /* Return success */
651  return TRUE;
652 }
653 
654 BOOLEAN
655 NTAPI
657 {
659  return FALSE;
660 }
661 
662 /* EOF */
#define OBJ_OPENLINK
Definition: winternl.h:230
#define FILE_GENERIC_READ
Definition: nt_native.h:653
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
ERESOURCE IopDatabaseResource
Definition: volume.c:20
#define IN
Definition: typedefs.h:39
NTSTATUS NTAPI IopReassignSystemRoot(IN PLOADER_PARAMETER_BLOCK LoaderBlock, OUT PANSI_STRING NtBootPath)
Definition: arcname.c:836
ERESOURCE IopSecurityResource
Definition: iomgr.c:60
LIST_ENTRY DriverBootReinitListHead
Definition: driver.c:26
NTSTATUS NTAPI ObCreateObjectType(IN PUNICODE_STRING TypeName, IN POBJECT_TYPE_INITIALIZER ObjectTypeInitializer, IN PVOID Reserved, OUT POBJECT_TYPE *ObjectType)
Definition: oblife.c:1048
KSPIN_LOCK DriverBootReinitListLock
Definition: driver.c:27
PDEVICE_OBJECT PhysicalDeviceObject
Definition: iotypes.h:839
PDEVICE_NODE IopRootDeviceNode
Definition: devnode.c:18
NTSTATUS IopInitializePnpServices(IN PDEVICE_NODE DeviceNode)
Definition: devaction.c:2066
#define IO_COMPLETION_ALL_ACCESS
Definition: file.c:72
POBJECT_TYPE IoControllerObjectType
Definition: controller.c:16
_Must_inspect_result_ _In_ PWDF_DPC_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDPC * Dpc
Definition: wdfdpc.h:107
VOID NTAPI IopInitLookasideLists(VOID)
Definition: iomgr.c:95
#define TAG_IO
Definition: tag.h:69
UNICODE_STRING NtSystemRoot
Definition: init.c:73
LIST_ENTRY IopCdRomFileSystemQueueHead
Definition: volume.c:22
LARGE_INTEGER IoWriteTransferCount
Definition: iomgr.c:42
KTIMER IopTimer
Definition: iotimer.c:23
VOID PiQueueDeviceAction(_In_ PDEVICE_OBJECT DeviceObject, _In_ DEVICE_ACTION Action, _In_opt_ PKEVENT CompletionEvent, _Out_opt_ NTSTATUS *CompletionStatus)
Queue a device operation to a worker thread.
Definition: devaction.c:2474
#define FILE_ALL_ACCESS
Definition: nt_native.h:651
#define OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
VOID NTAPI IopReinitializeDrivers(VOID)
Definition: driver.c:1443
VOID FASTCALL IoAssignDriveLetters(IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock, IN PSTRING NtDeviceName, OUT PUCHAR NtSystemPath, OUT PSTRING NtSystemPathString)
Definition: ntoskrnl.c:50
VOID NTAPI IopCloseFile(IN PEPROCESS Process OPTIONAL, IN PVOID Object, IN ACCESS_MASK GrantedAccess, IN ULONG ProcessHandleCount, IN ULONG SystemHandleCount)
Definition: file.c:2177
USHORT MaximumLength
Definition: env_spec_w32.h:370
NTSTATUS NTAPI IopParseFile(IN PVOID ParseObject, IN PVOID ObjectType, IN OUT PACCESS_STATE AccessState, IN KPROCESSOR_MODE AccessMode, IN ULONG Attributes, IN OUT PUNICODE_STRING CompleteName, IN OUT PUNICODE_STRING RemainingName, IN OUT PVOID Context OPTIONAL, IN PSECURITY_QUALITY_OF_SERVICE SecurityQos OPTIONAL, OUT PVOID *Object)
Definition: file.c:1318
#define TRUE
Definition: types.h:120
LARGE_INTEGER IoReadTransferCount
Definition: iomgr.c:40
unsigned char * PUCHAR
Definition: retypes.h:3
char CHAR
Definition: xmlstorage.h:175
ULONG IopNumTriageDumpDataBlocks
Definition: iomgr.c:46
LIST_ENTRY IopTimerQueueHead
Definition: iotimer.c:19
LONG NTSTATUS
Definition: precomp.h:26
VOID NTAPI IopReinitializeBootDrivers(VOID)
Definition: driver.c:1479
POBJECT_TYPE IoAdapterObjectType
Definition: adapter.c:18
NTSTATUS ExInitializeResourceLite(PULONG res)
Definition: env_spec_w32.h:641
GENERIC_MAPPING IopFileMapping
Definition: iomgr.c:49
PVOID IopTriageDumpDataBlocks[64]
Definition: iomgr.c:47
ULONG IopTraceLevel
Definition: iomgr.c:16
RESERVE_IRP_ALLOCATOR IopReserveIrpAllocator
Definition: irp.c:19
BOOLEAN NTAPI KeSetTimerEx(IN OUT PKTIMER Timer, IN LARGE_INTEGER DueTime, IN LONG Period, IN PKDPC Dpc OPTIONAL)
Definition: timerobj.c:294
POBJECT_TYPE IoDriverObjectType
Definition: driver.c:32
NTSTATUS NTAPI IopGetSetSecurityObject(IN PVOID ObjectBody, IN SECURITY_OPERATION_CODE OperationCode, IN PSECURITY_INFORMATION SecurityInformation, IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor, IN OUT PULONG BufferLength, OUT PSECURITY_DESCRIPTOR *OldSecurityDescriptor, IN POOL_TYPE PoolType, IN OUT PGENERIC_MAPPING GenericMapping)
#define OBJ_EXCLUSIVE
Definition: winternl.h:227
GENERAL_LOOKASIDE IoLargeIrpLookaside
Definition: iomgr.c:83
LONG LookasideIrpFloat
Definition: ketypes.h:655
ULONG IoWriteOperationCount
Definition: iomgr.c:41
GENERIC_MAPPING IopCompletionMapping
Definition: iocomp.c:20
NTSYSAPI VOID NTAPI RtlInitAnsiString(PANSI_STRING DestinationString, PCSZ SourceString)
ULONG IoReadOperationCount
Definition: iomgr.c:39
uint32_t ULONG_PTR
Definition: typedefs.h:65
struct LOOKASIDE_ALIGN _GENERAL_LOOKASIDE GENERAL_LOOKASIDE
BOOLEAN PnpSystemInit
Definition: iomgr.c:17
VOID FASTCALL IopInitializeSystemDrivers(VOID)
Definition: driver.c:1165
#define sprintf(buf, format,...)
Definition: sprintf.c:55
NTSTATUS NTAPI ApphelpCacheInitialize(VOID)
Definition: apphelp.c:440
HANDLE FileHandle
Definition: stats.c:38
ERESOURCE IopDriverLoadResource
Definition: driver.c:19
PP_LOOKASIDE_LIST PPLookasideList[16]
Definition: ketypes.h:624
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3272
NTSTATUS NTAPI ObReferenceObjectByHandle(IN HANDLE Handle, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PVOID *Object, OUT POBJECT_HANDLE_INFORMATION HandleInformation OPTIONAL)
Definition: obref.c:496
ULONG PFN_NUMBER
Definition: ke.h:9
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
#define FALSE
Definition: types.h:117
long LONG
Definition: pedump.c:60
BOOLEAN MaintainHandleCount
Definition: obtypes.h:361
struct LOOKASIDE_ALIGN _GENERAL_LOOKASIDE * PGENERAL_LOOKASIDE
LIST_ENTRY IopTapeFileSystemQueueHead
Definition: volume.c:22
NTSTATUS NTAPI IopParseDevice(IN PVOID ParseObject, IN PVOID ObjectType, IN OUT PACCESS_STATE AccessState, IN KPROCESSOR_MODE AccessMode, IN ULONG Attributes, IN OUT PUNICODE_STRING CompleteName, IN OUT PUNICODE_STRING RemainingName, IN OUT PVOID Context, IN PSECURITY_QUALITY_OF_SERVICE SecurityQos OPTIONAL, OUT PVOID *Object)
Definition: file.c:324
struct NameRec_ * Name
Definition: cdprocs.h:459
BOOLEAN NTAPI IopInitializeReserveIrp(IN PRESERVE_IRP_ALLOCATOR ReserveIrpAllocator)
Definition: irp.c:549
FORCEINLINE VOID KeInitializeSpinLock(_Out_ PKSPIN_LOCK SpinLock)
Definition: kefuncs.h:238
LIST_ENTRY IopNetworkFileSystemQueueHead
Definition: volume.c:21
VOID NTAPI IopDeleteDevice(IN PVOID ObjectBody)
Definition: device.c:52
BOOLEAN NTAPI WmiInitialize(VOID)
Definition: wmi.c:38
unsigned char BOOLEAN
LIST_ENTRY DriverReinitListHead
Definition: driver.c:21
#define DO_SYSTEM_BOOT_PARTITION
Definition: env_spec_w32.h:400
GENERAL_LOOKASIDE IoCompletionPacketLookaside
Definition: iocomp.c:18
KGUARDED_MUTEX PnpNotifyListLock
Definition: pnpnotify.c:30
VOID NTAPI IopDeleteFile(IN PVOID ObjectBody)
Definition: file.c:1354
void DPRINT(...)
Definition: polytest.cpp:61
Definition: bufpool.h:45
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToAnsiString(PANSI_STRING DestinationString, PUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
VOID FASTCALL IopInitializeBootDrivers(VOID)
Definition: driver.c:959
OB_CLOSE_METHOD CloseProcedure
Definition: obtypes.h:368
KDPC IopTimerDpc
Definition: iotimer.c:22
VOID NTAPI ExInitializeSystemLookasideList(IN PGENERAL_LOOKASIDE List, IN POOL_TYPE Type, IN ULONG Size, IN ULONG Tag, IN USHORT MaximumDepth, IN PLIST_ENTRY ListHead)
Definition: lookas.c:31
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:547
GENERAL_LOOKASIDE IoSmallIrpLookaside
Definition: iomgr.c:84
BOOLEAN IoCountOperations
Definition: iomgr.c:38
LIST_ENTRY IopDiskFileSystemQueueHead
Definition: volume.c:21
#define FILE_GENERIC_EXECUTE
Definition: nt_native.h:668
Status
Definition: gdiplustypes.h:24
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
Definition: ketypes.h:675
USHORT MaximumLength
Definition: env_spec_w32.h:377
#define IO_LARGEIRP_CPU
Definition: tag.h:64
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define TAG_MDL
Definition: tag.h:86
BOOLEAN NTAPI IopMarkBootPartition(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: iomgr.c:396
#define ObDereferenceObject
Definition: obfuncs.h:203
LIST_ENTRY PnpNotifyListHead
Definition: pnpnotify.c:31
NTSTATUS NTAPI IopInitializePlugPlayServices(VOID)
Definition: pnpinit.c:431
OB_PARSE_METHOD ParseProcedure
Definition: obtypes.h:370
BOOLEAN NTAPI IoInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: iomgr.c:466
struct _CONTROLLER_OBJECT CONTROLLER_OBJECT
struct _IRP IRP
BOOLEAN NTAPI IopCreateRootDirectories(VOID)
Definition: iomgr.c:331
NTSTATUS NTAPI IopCreateArcNames(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: arcname.c:41
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define _strnicmp(_String1, _String2, _MaxCount)
Definition: compat.h:23
CODE_SEG("INIT")
Definition: fsrtlpc.c:19
* PFILE_OBJECT
Definition: iotypes.h:1978
VOID NTAPI IopDeleteIoCompletion(PVOID ObjectBody)
Definition: iocomp.c:100
BOOLEAN NTAPI IoInitializeCrashDump(IN HANDLE PageFileHandle)
Definition: iomgr.c:656
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
Definition: obhandle.c:3399
#define FILE_READ_ATTRIBUTES
Definition: nt_native.h:647
struct _GENERAL_LOOKASIDE * L
Definition: ketypes.h:802
LARGE_INTEGER IoOtherTransferCount
Definition: iomgr.c:44
std::wstring STRING
Definition: fontsub.cpp:33
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
NTSYSAPI NTSTATUS NTAPI ZwOpenFile(_Out_ PHANDLE FileHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes, _Out_ PIO_STATUS_BLOCK IoStatusBlock, _In_ ULONG ShareAccess, _In_ ULONG OpenOptions)
struct _DEVICE_OBJECT DEVICE_OBJECT
MDL
Definition: mmtypes.h:117
static const WCHAR L[]
Definition: oid.c:1250
#define IOC_TAG1
Definition: tag.h:66
Definition: ketypes.h:687
#define OBJ_PERMANENT
Definition: winternl.h:226
#define FILE_NON_DIRECTORY_FILE
Definition: constants.h:492
struct _DRIVER_OBJECT DRIVER_OBJECT
Definition: typedefs.h:119
#define IO_SMALLIRP_CPU
Definition: tag.h:65
POBJECT_TYPE IoFileObjectType
Definition: iomgr.c:36
KSPIN_LOCK DriverReinitListLock
Definition: driver.c:22
NTSTATUS NTAPI PsLocateSystemDll(VOID)
Definition: psmgr.c:279
PLOADER_PARAMETER_BLOCK IopLoaderBlock
Definition: iomgr.c:88
CCHAR KeNumberProcessors
Definition: krnlinit.c:35
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2
Definition: ketypes.h:675
KSPIN_LOCK IopLogListLock
Definition: error.c:31
#define FILE_GENERIC_WRITE
Definition: nt_native.h:660
KSPIN_LOCK IopTimerLock
Definition: iotimer.c:18
NTSTATUS NTAPI NtCreateDirectoryObject(OUT PHANDLE DirectoryHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
Definition: obdir.c:773
VOID FASTCALL KeInitializeGuardedMutex(OUT PKGUARDED_MUTEX GuardedMutex)
Definition: gmutex.c:31
GENERIC_MAPPING GenericMapping
Definition: obtypes.h:358
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
Definition: glfuncs.h:248
struct _GENERAL_LOOKASIDE * P
Definition: ketypes.h:801
BOOLEAN NTAPI KdInitSystem(ULONG Reserved, PLOADER_PARAMETER_BLOCK LoaderBlock)
VOID NTAPI IopTimerDispatch(IN PKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
Definition: iotimer.c:32
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString, PANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
PKPRCB KiProcessorBlock[]
Definition: krnlinit.c:32
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
OB_SECURITY_METHOD SecurityProcedure
Definition: obtypes.h:371
#define DIRECTORY_ALL_ACCESS
Definition: nt_native.h:1259
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
static OUT PIO_STATUS_BLOCK IoStatusBlock
Definition: pipe.c:75
#define NULL
Definition: types.h:112
KSPIN_LOCK IoStatisticsLock
Definition: iomgr.c:45
#define DPRINT1
Definition: precomp.h:8
KSPIN_LOCK ShutdownListLock
Definition: device.c:22
_In_ HANDLE Handle
Definition: extypes.h:390
#define ObReferenceObject
Definition: obfuncs.h:204
BOOLEAN NTAPI IopCreateObjectTypes(VOID)
Definition: iomgr.c:242
ULONG ERESOURCE
Definition: env_spec_w32.h:594
unsigned int ULONG
Definition: retypes.h:1
OB_QUERYNAME_METHOD QueryNameProcedure
Definition: obtypes.h:372
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define UNIMPLEMENTED
Definition: debug.h:115
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
LIST_ENTRY IopFsNotifyChangeQueueHead
Definition: volume.c:23
_In_ PFCB _In_ PCD_NAME DirName
Definition: cdprocs.h:736
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
NTSTATUS NTAPI IopStartRamdisk(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: ramdisk.c:26
struct _KQUEUE KQUEUE
NTSTATUS NTAPI IopQueryName(IN PVOID ObjectBody, IN BOOLEAN HasName, OUT POBJECT_NAME_INFORMATION ObjectNameInfo, IN ULONG Length, OUT PULONG ReturnLength, IN KPROCESSOR_MODE PreviousMode)
Definition: file.c:1925
VOID NTAPI IopDeleteDriver(IN PVOID ObjectBody)
Definition: driver.c:60
ULONG IoOtherOperationCount
Definition: iomgr.c:43
VOID NTAPI KeInitializeDpc(IN PKDPC Dpc, IN PKDEFERRED_ROUTINE DeferredRoutine, IN PVOID DeferredContext)
Definition: dpc.c:711
LIST_ENTRY IopErrorLogListHead
Definition: error.c:30
OB_DELETE_METHOD DeleteProcedure
Definition: obtypes.h:369
GENERAL_LOOKASIDE IopMdlLookasideList
Definition: iomgr.c:85
PDEVICE_OBJECT IopErrorLogObject
Definition: error.c:38
POBJECT_TYPE IoCompletionType
Definition: iocomp.c:16
POBJECT_TYPE IoDeviceObjectType
Definition: iomgr.c:35
#define IO_SMALLIRP
Definition: tag.h:63
LIST_ENTRY ShutdownListHead
Definition: device.c:21
ULONG DefaultNonPagedPoolCharge
Definition: obtypes.h:365
#define HalInitPnpDriver
Definition: haltypes.h:289
#define IO_LARGEIRP
Definition: tag.h:62
VOID NTAPI KeBugCheckEx(_In_ ULONG BugCheckCode, _In_ ULONG_PTR BugCheckParameter1, _In_ ULONG_PTR BugCheckParameter2, _In_ ULONG_PTR BugCheckParameter3, _In_ ULONG_PTR BugCheckParameter4)
Definition: rtlcompat.c:108
LIST_ENTRY LastChanceShutdownListHead
Definition: device.c:21
VOID NTAPI KeInitializeTimerEx(OUT PKTIMER Timer, IN TIMER_TYPE Type)
Definition: timerobj.c:244
LIST_ENTRY ExSystemLookasideListHead
Definition: lookas.c:21
LONGLONG QuadPart
Definition: typedefs.h:114
_In_opt_ PVOID DeferredContext
Definition: ketypes.h:675