ReactOS  0.4.15-dev-1632-g4e289ce
iomgr.c File Reference
#include <ntoskrnl.h>
#include <debug.h>
Include dependency graph for iomgr.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

VOID NTAPI IopTimerDispatch (IN PKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
 
BOOLEAN NTAPI WmiInitialize (VOID)
 
VOID NTAPI IopInitLookasideLists (VOID)
 
BOOLEAN NTAPI IopCreateObjectTypes (VOID)
 
BOOLEAN NTAPI IopCreateRootDirectories (VOID)
 
BOOLEAN NTAPI IopMarkBootPartition (IN PLOADER_PARAMETER_BLOCK LoaderBlock)
 
BOOLEAN NTAPI IoInitSystem (IN PLOADER_PARAMETER_BLOCK LoaderBlock)
 
BOOLEAN NTAPI IoInitializeCrashDump (IN HANDLE PageFileHandle)
 

Variables

ULONG IopTraceLevel = 0
 
BOOLEAN PnpSystemInit = FALSE
 
POBJECT_TYPE IoDeviceObjectType = NULL
 
POBJECT_TYPE IoFileObjectType = NULL
 
POBJECT_TYPE IoControllerObjectType
 
BOOLEAN IoCountOperations = TRUE
 
ULONG IoReadOperationCount = 0
 
LARGE_INTEGER IoReadTransferCount = {{0, 0}}
 
ULONG IoWriteOperationCount = 0
 
LARGE_INTEGER IoWriteTransferCount = {{0, 0}}
 
ULONG IoOtherOperationCount = 0
 
LARGE_INTEGER IoOtherTransferCount = {{0, 0}}
 
KSPIN_LOCK IoStatisticsLock = 0
 
ULONG IopNumTriageDumpDataBlocks
 
PVOID IopTriageDumpDataBlocks [64]
 
GENERIC_MAPPING IopFileMapping
 
LIST_ENTRY ShutdownListHead
 
LIST_ENTRY LastChanceShutdownListHead
 
KSPIN_LOCK ShutdownListLock
 
POBJECT_TYPE IoAdapterObjectType
 
ERESOURCE IopDatabaseResource
 
ERESOURCE IopSecurityResource
 
ERESOURCE IopDriverLoadResource
 
LIST_ENTRY IopDiskFileSystemQueueHead
 
LIST_ENTRY IopCdRomFileSystemQueueHead
 
LIST_ENTRY IopTapeFileSystemQueueHead
 
LIST_ENTRY IopNetworkFileSystemQueueHead
 
LIST_ENTRY DriverBootReinitListHead
 
LIST_ENTRY DriverReinitListHead
 
LIST_ENTRY IopFsNotifyChangeQueueHead
 
LIST_ENTRY IopErrorLogListHead
 
LIST_ENTRY IopTimerQueueHead
 
KDPC IopTimerDpc
 
KTIMER IopTimer
 
KSPIN_LOCK DriverReinitListLock
 
KSPIN_LOCK DriverBootReinitListLock
 
KSPIN_LOCK IopLogListLock
 
KSPIN_LOCK IopTimerLock
 
PDEVICE_OBJECT IopErrorLogObject
 
BOOLEAN PnPBootDriversInitialized
 
GENERAL_LOOKASIDE IoLargeIrpLookaside
 
GENERAL_LOOKASIDE IoSmallIrpLookaside
 
GENERAL_LOOKASIDE IopMdlLookasideList
 
GENERAL_LOOKASIDE IoCompletionPacketLookaside
 
PLOADER_PARAMETER_BLOCK IopLoaderBlock
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 13 of file iomgr.c.

Function Documentation

◆ IoInitializeCrashDump()

BOOLEAN NTAPI IoInitializeCrashDump ( IN HANDLE  PageFileHandle)

Definition at line 660 of file iomgr.c.

661 {
663  return FALSE;
664 }
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by NtCreatePagingFile().

◆ IoInitSystem()

BOOLEAN NTAPI IoInitSystem ( IN PLOADER_PARAMETER_BLOCK  LoaderBlock)

Definition at line 465 of file iomgr.c.

466 {
467  LARGE_INTEGER ExpireTime;
469  CHAR Buffer[256];
470  ANSI_STRING NtBootPath, RootString;
471 
472  /* Initialize empty NT Boot Path */
473  RtlInitEmptyAnsiString(&NtBootPath, Buffer, sizeof(Buffer));
474 
475  /* Initialize the lookaside lists */
477 
478  /* Initialize all locks and lists */
497 
498  /* Initialize PnP notifications */
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  // the disk subsystem is initialized here and the SystemRoot is set too
588  // we can finally load other drivers from the boot volume
590 
591 #if !defined(_WINKD_) && defined(KDBG)
592  /* Read KDB Data */
593  KdbInit();
594 
595  /* I/O is now setup for disk access, so phase 3 */
596  KdInitSystem(3, LoaderBlock);
597 #endif
598 
599  /* Load services for devices found by PnP manager */
601 
602  /* Load system start drivers */
605 
606  /* Reinitialize drivers that requested it */
608 
609  /* Convert SystemRoot from ARC to NT path */
610  Status = IopReassignSystemRoot(LoaderBlock, &NtBootPath);
611  if (!NT_SUCCESS(Status))
612  {
613  DPRINT1("IopReassignSystemRoot failed: %lx\n", Status);
614  return FALSE;
615  }
616 
617  /* Set the ANSI_STRING for the root path */
618  RootString.MaximumLength = NtSystemRoot.MaximumLength / sizeof(WCHAR);
619  RootString.Length = 0;
621  RootString.MaximumLength,
622  TAG_IO);
623 
624  /* Convert the path into the ANSI_STRING */
626  if (!NT_SUCCESS(Status))
627  {
628  DPRINT1("RtlUnicodeStringToAnsiString failed: %lx\n", Status);
629  return FALSE;
630  }
631 
632  /* Assign drive letters */
633  IoAssignDriveLetters(LoaderBlock,
634  &NtBootPath,
635  (PUCHAR)RootString.Buffer,
636  &RootString);
637 
638  /* Update system root */
640  if (!NT_SUCCESS(Status))
641  {
642  DPRINT1("RtlAnsiStringToUnicodeString failed: %lx\n", Status);
643  return FALSE;
644  }
645 
646  /* Load the System DLL and its Entrypoints */
648  if (!NT_SUCCESS(Status))
649  {
650  DPRINT1("PsLocateSystemDll failed: %lx\n", Status);
651  return FALSE;
652  }
653 
654  /* Return success */
655  return TRUE;
656 }
ERESOURCE IopDatabaseResource
Definition: volume.c:20
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
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:2544
VOID NTAPI IopInitLookasideLists(VOID)
Definition: iomgr.c:94
#define TAG_IO
Definition: tag.h:69
UNICODE_STRING NtSystemRoot
Definition: init.c:73
LIST_ENTRY IopCdRomFileSystemQueueHead
Definition: volume.c:22
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:2950
VOID NTAPI IopReinitializeDrivers(VOID)
Definition: driver.c:1334
VOID FASTCALL IoAssignDriveLetters(IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock, IN PSTRING NtDeviceName, OUT PUCHAR NtSystemPath, OUT PSTRING NtSystemPathString)
Definition: ntoskrnl.c:50
USHORT MaximumLength
Definition: env_spec_w32.h:370
#define TRUE
Definition: types.h:120
unsigned char * PUCHAR
Definition: retypes.h:3
char CHAR
Definition: xmlstorage.h:175
LIST_ENTRY IopTimerQueueHead
Definition: iotimer.c:19
LONG NTSTATUS
Definition: precomp.h:26
VOID NTAPI IopReinitializeBootDrivers(VOID)
Definition: driver.c:1370
NTSTATUS ExInitializeResourceLite(PULONG res)
Definition: env_spec_w32.h:641
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
BOOLEAN PnpSystemInit
Definition: iomgr.c:17
VOID FASTCALL IopInitializeSystemDrivers(VOID)
Definition: driver.c:1055
NTSTATUS NTAPI ApphelpCacheInitialize(VOID)
Definition: apphelp.c:440
ERESOURCE IopDriverLoadResource
Definition: driver.c:19
#define FALSE
Definition: types.h:117
LIST_ENTRY IopTapeFileSystemQueueHead
Definition: volume.c:22
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
BOOLEAN NTAPI WmiInitialize(VOID)
Definition: wmi.c:38
LIST_ENTRY DriverReinitListHead
Definition: driver.c:21
Definition: bufpool.h:45
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToAnsiString(PANSI_STRING DestinationString, PUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
VOID FASTCALL IopInitializeBootDrivers(VOID)
Definition: driver.c:882
KDPC IopTimerDpc
Definition: iotimer.c:22
LIST_ENTRY IopDiskFileSystemQueueHead
Definition: volume.c:21
Status
Definition: gdiplustypes.h:24
USHORT MaximumLength
Definition: env_spec_w32.h:377
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
BOOLEAN NTAPI IopMarkBootPartition(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: iomgr.c:395
NTSTATUS NTAPI IopInitializePlugPlayServices(VOID)
Definition: pnpinit.c:293
BOOLEAN NTAPI IopCreateRootDirectories(VOID)
Definition: iomgr.c:330
NTSTATUS NTAPI IopCreateArcNames(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: arcname.c:41
#define _strnicmp(_String1, _String2, _MaxCount)
Definition: compat.h:23
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
BOOLEAN PnPBootDriversInitialized
Definition: pnpinit.c:27
KSPIN_LOCK DriverReinitListLock
Definition: driver.c:22
NTSTATUS NTAPI PsLocateSystemDll(VOID)
Definition: psmgr.c:279
PLOADER_PARAMETER_BLOCK IopLoaderBlock
Definition: iomgr.c:87
KSPIN_LOCK IopLogListLock
Definition: error.c:31
KSPIN_LOCK IopTimerLock
Definition: iotimer.c:18
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)
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
#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
BOOLEAN NTAPI IopCreateObjectTypes(VOID)
Definition: iomgr.c:241
LIST_ENTRY IopFsNotifyChangeQueueHead
Definition: volume.c:23
NTSTATUS NTAPI IopStartRamdisk(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: ramdisk.c:26
VOID NTAPI KeInitializeDpc(IN PKDPC Dpc, IN PKDEFERRED_ROUTINE DeferredRoutine, IN PVOID DeferredContext)
Definition: dpc.c:711
LIST_ENTRY IopErrorLogListHead
Definition: error.c:30
LIST_ENTRY ShutdownListHead
Definition: device.c:21
#define HalInitPnpDriver
Definition: haltypes.h:289
LIST_ENTRY LastChanceShutdownListHead
Definition: device.c:21
VOID NTAPI KeInitializeTimerEx(OUT PKTIMER Timer, IN TIMER_TYPE Type)
Definition: timerobj.c:244
LONGLONG QuadPart
Definition: typedefs.h:114
VOID PiInitializeNotifications(VOID)
Definition: pnpnotify.c:55

Referenced by Phase1InitializationDiscard().

◆ IopCreateObjectTypes()

BOOLEAN NTAPI IopCreateObjectTypes ( VOID  )

Definition at line 241 of file iomgr.c.

242 {
243  OBJECT_TYPE_INITIALIZER ObjectTypeInitializer;
245 
246  /* Initialize default settings */
247  RtlZeroMemory(&ObjectTypeInitializer, sizeof(ObjectTypeInitializer));
248  ObjectTypeInitializer.Length = sizeof(ObjectTypeInitializer);
249  ObjectTypeInitializer.PoolType = NonPagedPool;
250  ObjectTypeInitializer.InvalidAttributes = OBJ_OPENLINK;
251  ObjectTypeInitializer.ValidAccessMask = FILE_ALL_ACCESS;
252  ObjectTypeInitializer.UseDefaultObject = TRUE;
253  ObjectTypeInitializer.GenericMapping = IopFileMapping;
254 
255  /* Do the Adapter Type */
256  RtlInitUnicodeString(&Name, L"Adapter");
258  &ObjectTypeInitializer,
259  NULL,
260  &IoAdapterObjectType))) return FALSE;
261 
262  /* Do the Controller Type */
263  RtlInitUnicodeString(&Name, L"Controller");
264  ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(CONTROLLER_OBJECT);
266  &ObjectTypeInitializer,
267  NULL,
268  &IoControllerObjectType))) return FALSE;
269 
270  /* Do the Device Type */
271  RtlInitUnicodeString(&Name, L"Device");
272  ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(DEVICE_OBJECT);
273  ObjectTypeInitializer.DeleteProcedure = IopDeleteDevice;
274  ObjectTypeInitializer.ParseProcedure = IopParseDevice;
275  ObjectTypeInitializer.SecurityProcedure = IopGetSetSecurityObject;
276  ObjectTypeInitializer.CaseInsensitive = TRUE;
278  &ObjectTypeInitializer,
279  NULL,
280  &IoDeviceObjectType))) return FALSE;
281 
282  /* Initialize the Driver object type */
283  RtlInitUnicodeString(&Name, L"Driver");
284  ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(DRIVER_OBJECT);
285  ObjectTypeInitializer.DeleteProcedure = IopDeleteDriver;
286  ObjectTypeInitializer.ParseProcedure = NULL;
287  ObjectTypeInitializer.SecurityProcedure = NULL;
289  &ObjectTypeInitializer,
290  NULL,
291  &IoDriverObjectType))) return FALSE;
292 
293  /* Initialize the I/O Completion object type */
294  RtlInitUnicodeString(&Name, L"IoCompletion");
295  ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(KQUEUE);
296  ObjectTypeInitializer.ValidAccessMask = IO_COMPLETION_ALL_ACCESS;
297  ObjectTypeInitializer.InvalidAttributes |= OBJ_PERMANENT;
298  ObjectTypeInitializer.GenericMapping = IopCompletionMapping;
299  ObjectTypeInitializer.DeleteProcedure = IopDeleteIoCompletion;
301  &ObjectTypeInitializer,
302  NULL,
303  &IoCompletionType))) return FALSE;
304 
305  /* Initialize the File object type */
306  RtlInitUnicodeString(&Name, L"File");
307  ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(FILE_OBJECT);
308  ObjectTypeInitializer.InvalidAttributes |= OBJ_EXCLUSIVE;
309  ObjectTypeInitializer.MaintainHandleCount = TRUE;
310  ObjectTypeInitializer.ValidAccessMask = FILE_ALL_ACCESS;
311  ObjectTypeInitializer.GenericMapping = IopFileMapping;
312  ObjectTypeInitializer.CloseProcedure = IopCloseFile;
313  ObjectTypeInitializer.DeleteProcedure = IopDeleteFile;
314  ObjectTypeInitializer.SecurityProcedure = IopGetSetSecurityObject;
315  ObjectTypeInitializer.QueryNameProcedure = IopQueryName;
316  ObjectTypeInitializer.ParseProcedure = IopParseFile;
317  ObjectTypeInitializer.UseDefaultObject = FALSE;
319  &ObjectTypeInitializer,
320  NULL,
321  &IoFileObjectType))) return FALSE;
322 
323  /* Success */
324  return TRUE;
325 }
#define OBJ_OPENLINK
Definition: winternl.h:230
NTSTATUS NTAPI ObCreateObjectType(IN PUNICODE_STRING TypeName, IN POBJECT_TYPE_INITIALIZER ObjectTypeInitializer, IN PVOID Reserved, OUT POBJECT_TYPE *ObjectType)
Definition: oblife.c:1048
#define IO_COMPLETION_ALL_ACCESS
Definition: file.c:72
POBJECT_TYPE IoControllerObjectType
Definition: controller.c:16
#define FILE_ALL_ACCESS
Definition: nt_native.h:651
VOID NTAPI IopCloseFile(IN PEPROCESS Process OPTIONAL, IN PVOID Object, IN ACCESS_MASK GrantedAccess, IN ULONG ProcessHandleCount, IN ULONG SystemHandleCount)
Definition: file.c:2177
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
POBJECT_TYPE IoAdapterObjectType
Definition: adapter.c:18
GENERIC_MAPPING IopFileMapping
Definition: iomgr.c:49
POBJECT_TYPE IoDriverObjectType
Definition: driver.c:33
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
GENERIC_MAPPING IopCompletionMapping
Definition: iocomp.c:20
#define FALSE
Definition: types.h:117
BOOLEAN MaintainHandleCount
Definition: obtypes.h:361
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
VOID NTAPI IopDeleteDevice(IN PVOID ObjectBody)
Definition: device.c:52
VOID NTAPI IopDeleteFile(IN PVOID ObjectBody)
Definition: file.c:1354
OB_CLOSE_METHOD CloseProcedure
Definition: obtypes.h:368
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
OB_PARSE_METHOD ParseProcedure
Definition: obtypes.h:370
struct _CONTROLLER_OBJECT CONTROLLER_OBJECT
VOID NTAPI IopDeleteIoCompletion(PVOID ObjectBody)
Definition: iocomp.c:100
struct _DEVICE_OBJECT DEVICE_OBJECT
static const WCHAR L[]
Definition: oid.c:1250
#define OBJ_PERMANENT
Definition: winternl.h:226
struct _DRIVER_OBJECT DRIVER_OBJECT
POBJECT_TYPE IoFileObjectType
Definition: iomgr.c:36
GENERIC_MAPPING GenericMapping
Definition: obtypes.h:358
OB_SECURITY_METHOD SecurityProcedure
Definition: obtypes.h:371
#define NULL
Definition: types.h:112
OB_QUERYNAME_METHOD QueryNameProcedure
Definition: obtypes.h:372
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
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:79
OB_DELETE_METHOD DeleteProcedure
Definition: obtypes.h:369
POBJECT_TYPE IoCompletionType
Definition: iocomp.c:16
POBJECT_TYPE IoDeviceObjectType
Definition: iomgr.c:35
ULONG DefaultNonPagedPoolCharge
Definition: obtypes.h:365

Referenced by IoInitSystem().

◆ IopCreateRootDirectories()

BOOLEAN NTAPI IopCreateRootDirectories ( VOID  )

Definition at line 330 of file iomgr.c.

331 {
334  HANDLE Handle;
336 
337  /* Create the '\Driver' object directory */
338  RtlInitUnicodeString(&DirName, L"\\Driver");
340  &DirName,
342  NULL,
343  NULL);
347  if (!NT_SUCCESS(Status))
348  {
349  DPRINT1("Failed to create \\Driver directory: 0x%lx\n", Status);
350  return FALSE;
351  }
352  NtClose(Handle);
353 
354  /* Create the '\FileSystem' object directory */
355  RtlInitUnicodeString(&DirName, L"\\FileSystem");
357  &DirName,
359  NULL,
360  NULL);
364  if (!NT_SUCCESS(Status))
365  {
366  DPRINT1("Failed to create \\FileSystem directory: 0x%lx\n", Status);
367  return FALSE;
368  }
369  NtClose(Handle);
370 
371  /* Create the '\FileSystem' object directory */
372  RtlInitUnicodeString(&DirName, L"\\FileSystem\\Filters");
374  &DirName,
376  NULL,
377  NULL);
381  if (!NT_SUCCESS(Status))
382  {
383  DPRINT1("Failed to create \\FileSystem\\Filters directory: 0x%lx\n", Status);
384  return FALSE;
385  }
386  NtClose(Handle);
387 
388  /* Return success */
389  return TRUE;
390 }
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
#define TRUE
Definition: types.h:120
LONG NTSTATUS
Definition: precomp.h:26
#define FALSE
Definition: types.h:117
Status
Definition: gdiplustypes.h:24
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
Definition: obhandle.c:3399
static const WCHAR L[]
Definition: oid.c:1250
#define OBJ_PERMANENT
Definition: winternl.h:226
NTSTATUS NTAPI NtCreateDirectoryObject(OUT PHANDLE DirectoryHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
Definition: obdir.c:773
#define DIRECTORY_ALL_ACCESS
Definition: nt_native.h:1259
#define NULL
Definition: types.h:112
#define DPRINT1
Definition: precomp.h:8
_In_ HANDLE Handle
Definition: extypes.h:390
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
_In_ PFCB _In_ PCD_NAME DirName
Definition: cdprocs.h:736
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106

Referenced by IoInitSystem().

◆ IopInitLookasideLists()

VOID NTAPI IopInitLookasideLists ( VOID  )

Definition at line 94 of file iomgr.c.

95 {
96  ULONG LargeIrpSize, SmallIrpSize, MdlSize;
97  LONG i;
98  PKPRCB Prcb;
99  PGENERAL_LOOKASIDE CurrentList = NULL;
100 
101  /* Calculate the sizes */
102  LargeIrpSize = sizeof(IRP) + (8 * sizeof(IO_STACK_LOCATION));
103  SmallIrpSize = sizeof(IRP) + sizeof(IO_STACK_LOCATION);
104  MdlSize = sizeof(MDL) + (23 * sizeof(PFN_NUMBER));
105 
106  /* Initialize the Lookaside List for I\O Completion */
108  NonPagedPool,
110  IOC_TAG1,
111  32,
113 
114  /* Initialize the Lookaside List for Large IRPs */
116  NonPagedPool,
117  LargeIrpSize,
118  IO_LARGEIRP,
119  64,
121 
122 
123  /* Initialize the Lookaside List for Small IRPs */
125  NonPagedPool,
126  SmallIrpSize,
127  IO_SMALLIRP,
128  32,
130 
131  /* Initialize the Lookaside List for MDLs */
133  NonPagedPool,
134  MdlSize,
135  TAG_MDL,
136  128,
138 
139  /* Allocate the global lookaside list buffer */
140  CurrentList = ExAllocatePoolWithTag(NonPagedPool,
141  4 * KeNumberProcessors *
142  sizeof(GENERAL_LOOKASIDE),
143  TAG_IO);
144 
145  /* Loop all processors */
146  for (i = 0; i < KeNumberProcessors; i++)
147  {
148  /* Get the PRCB for this CPU */
149  Prcb = KiProcessorBlock[i];
150  DPRINT("Setting up lookaside for CPU: %x, PRCB: %p\n", i, Prcb);
151 
152  /* Write IRP credit limit */
154 
155  /* Set the I/O Completion List */
157  if (CurrentList)
158  {
159  /* Initialize the Lookaside List for mini-packets */
161  NonPagedPool,
164  32,
166  Prcb->PPLookasideList[LookasideCompletionList].P = CurrentList;
167  CurrentList++;
168 
169  }
170  else
171  {
173  }
174 
175  /* Set the Large IRP List */
177  if (CurrentList)
178  {
179  /* Initialize the Lookaside List for Large IRPs */
181  NonPagedPool,
182  LargeIrpSize,
184  64,
186  Prcb->PPLookasideList[LookasideLargeIrpList].P = CurrentList;
187  CurrentList++;
188 
189  }
190  else
191  {
193  }
194 
195  /* Set the Small IRP List */
197  if (CurrentList)
198  {
199  /* Initialize the Lookaside List for Small IRPs */
201  NonPagedPool,
202  SmallIrpSize,
204  32,
206  Prcb->PPLookasideList[LookasideSmallIrpList].P = CurrentList;
207  CurrentList++;
208 
209  }
210  else
211  {
213  }
214 
215  /* Set the MDL Completion List */
217  if (CurrentList)
218  {
219  /* Initialize the Lookaside List for MDLs */
221  NonPagedPool,
222  SmallIrpSize,
223  TAG_MDL,
224  128,
226 
227  Prcb->PPLookasideList[LookasideMdlList].P = CurrentList;
228  CurrentList++;
229 
230  }
231  else
232  {
234  }
235  }
236 }
#define TAG_IO
Definition: tag.h:69
GENERAL_LOOKASIDE IoLargeIrpLookaside
Definition: iomgr.c:82
LONG LookasideIrpFloat
Definition: ketypes.h:655
struct LOOKASIDE_ALIGN _GENERAL_LOOKASIDE GENERAL_LOOKASIDE
PP_LOOKASIDE_LIST PPLookasideList[16]
Definition: ketypes.h:624
ULONG PFN_NUMBER
Definition: ke.h:9
long LONG
Definition: pedump.c:60
struct LOOKASIDE_ALIGN _GENERAL_LOOKASIDE * PGENERAL_LOOKASIDE
GENERAL_LOOKASIDE IoCompletionPacketLookaside
Definition: iocomp.c:18
void DPRINT(...)
Definition: polytest.cpp:61
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
GENERAL_LOOKASIDE IoSmallIrpLookaside
Definition: iomgr.c:83
#define IO_LARGEIRP_CPU
Definition: tag.h:64
#define TAG_MDL
Definition: tag.h:86
struct _IRP IRP
struct _GENERAL_LOOKASIDE * L
Definition: ketypes.h:802
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
MDL
Definition: mmtypes.h:117
#define IOC_TAG1
Definition: tag.h:66
#define IO_SMALLIRP_CPU
Definition: tag.h:65
CCHAR KeNumberProcessors
Definition: krnlinit.c:35
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
PKPRCB KiProcessorBlock[]
Definition: krnlinit.c:32
#define NULL
Definition: types.h:112
unsigned int ULONG
Definition: retypes.h:1
GENERAL_LOOKASIDE IopMdlLookasideList
Definition: iomgr.c:84
#define IO_SMALLIRP
Definition: tag.h:63
#define IO_LARGEIRP
Definition: tag.h:62
LIST_ENTRY ExSystemLookasideListHead
Definition: lookas.c:21

Referenced by IoInitSystem().

◆ IopMarkBootPartition()

BOOLEAN NTAPI IopMarkBootPartition ( IN PLOADER_PARAMETER_BLOCK  LoaderBlock)

Definition at line 395 of file iomgr.c.

396 {
398  STRING DeviceString;
399  CHAR Buffer[256];
405 
406  /* Build the ARC device name */
407  sprintf(Buffer, "\\ArcName\\%s", LoaderBlock->ArcBootDeviceName);
408  RtlInitAnsiString(&DeviceString, Buffer);
410  if (!NT_SUCCESS(Status)) return FALSE;
411 
412  /* Open it */
414  &DeviceName,
416  NULL,
417  NULL);
421  &IoStatusBlock,
422  0,
424  if (!NT_SUCCESS(Status))
425  {
426  /* Fail */
427  KeBugCheckEx(INACCESSIBLE_BOOT_DEVICE,
429  Status,
430  0,
431  0);
432  }
433 
434  /* Get the DO */
436  0,
438  KernelMode,
439  (PVOID *)&FileObject,
440  NULL);
441  if (!NT_SUCCESS(Status))
442  {
443  /* Fail */
445  return FALSE;
446  }
447 
448  /* Mark it as the boot partition */
449  FileObject->DeviceObject->Flags |= DO_SYSTEM_BOOT_PARTITION;
450 
451  /* Save a copy of the DO for the I/O Error Logger */
452  ObReferenceObject(FileObject->DeviceObject);
453  IopErrorLogObject = FileObject->DeviceObject;
454 
455  /* Cleanup and return success */
459  return TRUE;
460 }
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
#define OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
#define TRUE
Definition: types.h:120
char CHAR
Definition: xmlstorage.h:175
LONG NTSTATUS
Definition: precomp.h:26
NTSYSAPI VOID NTAPI RtlInitAnsiString(PANSI_STRING DestinationString, PCSZ SourceString)
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define sprintf(buf, format,...)
Definition: sprintf.c:55
HANDLE FileHandle
Definition: stats.c:38
_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
#define FALSE
Definition: types.h:117
#define DO_SYSTEM_BOOT_PARTITION
Definition: env_spec_w32.h:400
Definition: bufpool.h:45
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:547
Status
Definition: gdiplustypes.h:24
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define ObDereferenceObject
Definition: obfuncs.h:203
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
* PFILE_OBJECT
Definition: iotypes.h:1995
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
Definition: obhandle.c:3399
#define FILE_READ_ATTRIBUTES
Definition: nt_native.h:647
std::wstring STRING
Definition: fontsub.cpp:33
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)
#define FILE_NON_DIRECTORY_FILE
Definition: constants.h:492
POBJECT_TYPE IoFileObjectType
Definition: iomgr.c:36
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString, PANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
static OUT PIO_STATUS_BLOCK IoStatusBlock
Definition: pipe.c:75
#define NULL
Definition: types.h:112
#define ObReferenceObject
Definition: obfuncs.h:204
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
PDEVICE_OBJECT IopErrorLogObject
Definition: error.c:38
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

Referenced by IoInitSystem().

◆ IopTimerDispatch()

VOID NTAPI IopTimerDispatch ( IN PKDPC  Dpc,
IN PVOID  DeferredContext,
IN PVOID  SystemArgument1,
IN PVOID  SystemArgument2 
)

Definition at line 32 of file iotimer.c.

36 {
37  KIRQL OldIrql;
38  PLIST_ENTRY TimerEntry;
40  ULONG i;
41 
42  /* Check if any Timers are actualyl enabled as of now */
43  if (IopTimerCount)
44  {
45  /* Lock the Timers */
47 
48  /* Call the Timer Routine of each enabled Timer */
49  for (TimerEntry = IopTimerQueueHead.Flink, i = IopTimerCount;
50  (TimerEntry != &IopTimerQueueHead) && i;
51  TimerEntry = TimerEntry->Flink)
52  {
53  /* Get the timer and check if it's enabled */
54  Timer = CONTAINING_RECORD(TimerEntry, IO_TIMER, IoTimerList);
55  if (Timer->TimerEnabled)
56  {
57  /* Call the timer routine */
58  Timer->TimerRoutine(Timer->DeviceObject, Timer->Context);
59  i--;
60  }
61  }
62 
63  /* Unlock the Timers */
65  }
66 }
UCHAR KIRQL
Definition: env_spec_w32.h:591
LIST_ENTRY IopTimerQueueHead
Definition: iotimer.c:19
KSPIN_LOCK IopTimerLock
Definition: iotimer.c:18
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
#define KeAcquireSpinLock(sl, irql)
Definition: env_spec_w32.h:609
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:790
Definition: typedefs.h:119
_Must_inspect_result_ _In_ PWDF_TIMER_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFTIMER * Timer
Definition: wdftimer.h:153
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
#define KeReleaseSpinLock(sl, irql)
Definition: env_spec_w32.h:627
ULONG IopTimerCount
Definition: iotimer.c:26
unsigned int ULONG
Definition: retypes.h:1

Referenced by IoInitSystem().

◆ WmiInitialize()

BOOLEAN NTAPI WmiInitialize ( VOID  )

Definition at line 38 of file wmi.c.

40 {
41  UNICODE_STRING DriverName = RTL_CONSTANT_STRING(L"\\Driver\\WMIxWDM");
43 
44  /* Initialize the GUID object type */
46  if (!NT_SUCCESS(Status))
47  {
48  DPRINT1("WmipInitializeGuidObjectType() failed: 0x%lx\n", Status);
49  return FALSE;
50  }
51 
52  /* Create the WMI driver */
53  Status = IoCreateDriver(&DriverName, WmipDriverEntry);
54  if (!NT_SUCCESS(Status))
55  {
56  DPRINT1("Failed to create WMI driver: 0x%lx\n", Status);
57  return FALSE;
58  }
59 
60  return TRUE;
61 }
#define TRUE
Definition: types.h:120
LONG NTSTATUS
Definition: precomp.h:26
#define FALSE
Definition: types.h:117
NTSTATUS NTAPI IoCreateDriver(_In_opt_ PUNICODE_STRING DriverName, _In_ PDRIVER_INITIALIZE InitializationFunction)
Definition: driver.c:1414
Status
Definition: gdiplustypes.h:24
NTSTATUS NTAPI WmipInitializeGuidObjectType(VOID)
Definition: guidobj.c:113
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
static const WCHAR L[]
Definition: oid.c:1250
#define DPRINT1
Definition: precomp.h:8
#define RTL_CONSTANT_STRING(s)
Definition: tunneltest.c:14

Referenced by IoInitSystem().

Variable Documentation

◆ DriverBootReinitListHead

LIST_ENTRY DriverBootReinitListHead

◆ DriverBootReinitListLock

KSPIN_LOCK DriverBootReinitListLock

◆ DriverReinitListHead

LIST_ENTRY DriverReinitListHead

Definition at line 21 of file driver.c.

Referenced by IoInitSystem(), IopReinitializeDrivers(), and IoRegisterDriverReinitialization().

◆ DriverReinitListLock

KSPIN_LOCK DriverReinitListLock

Definition at line 22 of file driver.c.

Referenced by IoInitSystem(), IopReinitializeDrivers(), and IoRegisterDriverReinitialization().

◆ IoAdapterObjectType

POBJECT_TYPE IoAdapterObjectType

Definition at line 18 of file adapter.c.

Referenced by IopCreateObjectTypes().

◆ IoCompletionPacketLookaside

GENERAL_LOOKASIDE IoCompletionPacketLookaside

Definition at line 18 of file iocomp.c.

Referenced by IopInitLookasideLists().

◆ IoControllerObjectType

POBJECT_TYPE IoControllerObjectType

Definition at line 16 of file controller.c.

Referenced by IoCreateController(), and IopCreateObjectTypes().

◆ IoCountOperations

BOOLEAN IoCountOperations = TRUE

Definition at line 38 of file iomgr.c.

Referenced by IopUpdateOperationCount(), and IopUpdateTransferCount().

◆ IoDeviceObjectType

POBJECT_TYPE IoDeviceObjectType = NULL

◆ IoFileObjectType

POBJECT_TYPE IoFileObjectType = NULL

Definition at line 36 of file iomgr.c.

Referenced by add_device(), AfdBindSocket(), BasicBehaviorChecks(), CompBattGetDeviceObjectPointer(), Control(), create_snapshot(), CreateGreenFdo(), CreateMixerPinAndSetFormat(), DispTdiAssociateAddress(), duplicate_extents(), Ext2InvalidateVolumes(), FFSInvalidateVolumes(), IKsPin_PinMasterClock(), invalidate_volumes(), IoCheckDesiredAccess(), IoComputeDesiredAccessFileObject(), IoCreateStreamFileObjectEx(), IoCreateStreamFileObjectLite(), IopCreateObjectTypes(), IopDeviceFsIoControl(), IopGetDeviceObjectPointer(), IopMarkBootPartition(), IopOpenLinkOrRenameTarget(), IopParseDevice(), KernelModeTest(), MmCreateArm3Section(), MmCreateSection(), MountMgrVolumeMountPointChanged(), NtCancelIoFile(), NtCreatePagingFile(), NtFlushBuffersFile(), NtLoadKeyEx(), NtLockFile(), NtNotifyChangeDirectoryFile(), NtQueryDirectoryFile(), NtQueryInformationFile(), NtQueryVolumeInformationFile(), NtReadFile(), NtSaveKeyEx(), NtSaveMergedKeys(), NtSetInformationFile(), NtSetVolumeInformationFile(), NtUnlockFile(), ObpLookupObjectName(), OpenDevice(), FxIoTargetRemote::OpenTargetHandle(), Pin_fnDeviceIoControl(), Pin_fnWrite(), PopAddRemoveSysCapsCallback(), RfsdInvalidateVolumes(), send_subvol(), START_TEST(), TdiOpenDevice(), TestIoCreateFile(), TestObjectTypes(), TestProviderInfo(), TestSharedCacheMap(), TestSymlinks(), TestTcpConnect(), UDFInvalidateVolumes(), VfatSetRenameInformation(), WdmAudControlDeviceState(), WdmAudFrameSize(), WdmAudOpenSysAudioDevices(), WdmAudReadWrite(), and WdmAudResetStream().

◆ IoLargeIrpLookaside

GENERAL_LOOKASIDE IoLargeIrpLookaside

Definition at line 82 of file iomgr.c.

Referenced by IopInitLookasideLists().

◆ IoOtherOperationCount

ULONG IoOtherOperationCount = 0

Definition at line 43 of file iomgr.c.

Referenced by IopUpdateOperationCount(), and QSI_DEF().

◆ IoOtherTransferCount

LARGE_INTEGER IoOtherTransferCount = {{0, 0}}

Definition at line 44 of file iomgr.c.

Referenced by IopUpdateTransferCount(), and QSI_DEF().

◆ IopCdRomFileSystemQueueHead

LIST_ENTRY IopCdRomFileSystemQueueHead

◆ IopDatabaseResource

◆ IopDiskFileSystemQueueHead

LIST_ENTRY IopDiskFileSystemQueueHead

◆ IopDriverLoadResource

ERESOURCE IopDriverLoadResource

Definition at line 19 of file driver.c.

Referenced by IoInitSystem().

◆ IopErrorLogListHead

LIST_ENTRY IopErrorLogListHead

Definition at line 30 of file error.c.

Referenced by IoInitSystem(), IopGetErrorLogEntry(), IopLogWorker(), and IoWriteErrorLogEntry().

◆ IopErrorLogObject

PDEVICE_OBJECT IopErrorLogObject

Definition at line 38 of file error.c.

Referenced by IopMarkBootPartition().

◆ IopFileMapping

GENERIC_MAPPING IopFileMapping
Initial value:
= {
#define FILE_GENERIC_READ
Definition: nt_native.h:653
#define FILE_ALL_ACCESS
Definition: nt_native.h:651
#define FILE_GENERIC_EXECUTE
Definition: nt_native.h:668
#define FILE_GENERIC_WRITE
Definition: nt_native.h:660

Definition at line 49 of file iomgr.c.

Referenced by IoGetFileObjectGenericMapping(), and IopCreateObjectTypes().

◆ IopFsNotifyChangeQueueHead

◆ IopLoaderBlock

PLOADER_PARAMETER_BLOCK IopLoaderBlock

Definition at line 87 of file iomgr.c.

Referenced by IoGetBootDiskInformation(), and IoInitSystem().

◆ IopLogListLock

KSPIN_LOCK IopLogListLock

Definition at line 31 of file error.c.

Referenced by IoInitSystem(), IopGetErrorLogEntry(), IopLogWorker(), and IoWriteErrorLogEntry().

◆ IopMdlLookasideList

GENERAL_LOOKASIDE IopMdlLookasideList

Definition at line 84 of file iomgr.c.

Referenced by IopInitLookasideLists().

◆ IopNetworkFileSystemQueueHead

LIST_ENTRY IopNetworkFileSystemQueueHead

Definition at line 21 of file volume.c.

Referenced by IoInitSystem(), IoRegisterFileSystem(), and IoRegisterFsRegistrationChange().

◆ IopNumTriageDumpDataBlocks

ULONG IopNumTriageDumpDataBlocks

Definition at line 46 of file iomgr.c.

◆ IopSecurityResource

ERESOURCE IopSecurityResource

◆ IopTapeFileSystemQueueHead

LIST_ENTRY IopTapeFileSystemQueueHead

◆ IopTimer

KTIMER IopTimer

Definition at line 23 of file iotimer.c.

Referenced by IoInitSystem().

◆ IopTimerDpc

KDPC IopTimerDpc

Definition at line 22 of file iotimer.c.

Referenced by IoInitSystem().

◆ IopTimerLock

◆ IopTimerQueueHead

LIST_ENTRY IopTimerQueueHead

Definition at line 19 of file iotimer.c.

Referenced by IoInitializeTimer(), IoInitSystem(), and IopTimerDispatch().

◆ IopTraceLevel

ULONG IopTraceLevel = 0

Definition at line 16 of file iomgr.c.

◆ IopTriageDumpDataBlocks

PVOID IopTriageDumpDataBlocks[64]

Definition at line 47 of file iomgr.c.

◆ IoReadOperationCount

ULONG IoReadOperationCount = 0

Definition at line 39 of file iomgr.c.

Referenced by IopUpdateOperationCount(), and QSI_DEF().

◆ IoReadTransferCount

LARGE_INTEGER IoReadTransferCount = {{0, 0}}

Definition at line 40 of file iomgr.c.

Referenced by IopUpdateTransferCount(), and QSI_DEF().

◆ IoSmallIrpLookaside

GENERAL_LOOKASIDE IoSmallIrpLookaside

Definition at line 83 of file iomgr.c.

Referenced by IopInitLookasideLists().

◆ IoStatisticsLock

KSPIN_LOCK IoStatisticsLock = 0

Definition at line 45 of file iomgr.c.

Referenced by IoInitSystem().

◆ IoWriteOperationCount

ULONG IoWriteOperationCount = 0

Definition at line 41 of file iomgr.c.

Referenced by IopUpdateOperationCount(), and QSI_DEF().

◆ IoWriteTransferCount

LARGE_INTEGER IoWriteTransferCount = {{0, 0}}

Definition at line 42 of file iomgr.c.

Referenced by IopUpdateTransferCount(), and QSI_DEF().

◆ LastChanceShutdownListHead

◆ PnPBootDriversInitialized

BOOLEAN PnPBootDriversInitialized

Definition at line 27 of file pnpinit.c.

Referenced by IoInitSystem().

◆ PnpSystemInit

BOOLEAN PnpSystemInit = FALSE

Definition at line 17 of file iomgr.c.

Referenced by IoInitSystem(), and IopInitializeDriverModule().

◆ ShutdownListHead

◆ ShutdownListLock