ReactOS  0.4.14-dev-554-g2f8d847
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 #if defined (ALLOC_PRAGMA)
91 #pragma alloc_text(INIT, IoInitSystem)
92 #endif
93 
94 /* INIT FUNCTIONS ************************************************************/
95 
96 VOID
97 INIT_FUNCTION
98 NTAPI
100 {
101  ULONG LargeIrpSize, SmallIrpSize, MdlSize;
102  LONG i;
103  PKPRCB Prcb;
104  PGENERAL_LOOKASIDE CurrentList = NULL;
105 
106  /* Calculate the sizes */
107  LargeIrpSize = sizeof(IRP) + (8 * sizeof(IO_STACK_LOCATION));
108  SmallIrpSize = sizeof(IRP) + sizeof(IO_STACK_LOCATION);
109  MdlSize = sizeof(MDL) + (23 * sizeof(PFN_NUMBER));
110 
111  /* Initialize the Lookaside List for I\O Completion */
113  NonPagedPool,
115  IOC_TAG1,
116  32,
118 
119  /* Initialize the Lookaside List for Large IRPs */
121  NonPagedPool,
122  LargeIrpSize,
123  IO_LARGEIRP,
124  64,
126 
127 
128  /* Initialize the Lookaside List for Small IRPs */
130  NonPagedPool,
131  SmallIrpSize,
132  IO_SMALLIRP,
133  32,
135 
136  /* Initialize the Lookaside List for MDLs */
138  NonPagedPool,
139  MdlSize,
140  TAG_MDL,
141  128,
143 
144  /* Allocate the global lookaside list buffer */
145  CurrentList = ExAllocatePoolWithTag(NonPagedPool,
146  4 * KeNumberProcessors *
147  sizeof(GENERAL_LOOKASIDE),
148  TAG_IO);
149 
150  /* Loop all processors */
151  for (i = 0; i < KeNumberProcessors; i++)
152  {
153  /* Get the PRCB for this CPU */
154  Prcb = KiProcessorBlock[i];
155  DPRINT("Setting up lookaside for CPU: %x, PRCB: %p\n", i, Prcb);
156 
157  /* Write IRP credit limit */
159 
160  /* Set the I/O Completion List */
162  if (CurrentList)
163  {
164  /* Initialize the Lookaside List for mini-packets */
166  NonPagedPool,
169  32,
171  Prcb->PPLookasideList[LookasideCompletionList].P = CurrentList;
172  CurrentList++;
173 
174  }
175  else
176  {
178  }
179 
180  /* Set the Large IRP List */
182  if (CurrentList)
183  {
184  /* Initialize the Lookaside List for Large IRPs */
186  NonPagedPool,
187  LargeIrpSize,
189  64,
191  Prcb->PPLookasideList[LookasideLargeIrpList].P = CurrentList;
192  CurrentList++;
193 
194  }
195  else
196  {
198  }
199 
200  /* Set the Small IRP List */
202  if (CurrentList)
203  {
204  /* Initialize the Lookaside List for Small IRPs */
206  NonPagedPool,
207  SmallIrpSize,
209  32,
211  Prcb->PPLookasideList[LookasideSmallIrpList].P = CurrentList;
212  CurrentList++;
213 
214  }
215  else
216  {
218  }
219 
220  /* Set the MDL Completion List */
222  if (CurrentList)
223  {
224  /* Initialize the Lookaside List for MDLs */
226  NonPagedPool,
227  SmallIrpSize,
228  TAG_MDL,
229  128,
231 
232  Prcb->PPLookasideList[LookasideMdlList].P = CurrentList;
233  CurrentList++;
234 
235  }
236  else
237  {
239  }
240  }
241 }
242 
243 BOOLEAN
244 INIT_FUNCTION
245 NTAPI
247 {
248  OBJECT_TYPE_INITIALIZER ObjectTypeInitializer;
250 
251  /* Initialize default settings */
252  RtlZeroMemory(&ObjectTypeInitializer, sizeof(ObjectTypeInitializer));
253  ObjectTypeInitializer.Length = sizeof(ObjectTypeInitializer);
254  ObjectTypeInitializer.PoolType = NonPagedPool;
255  ObjectTypeInitializer.InvalidAttributes = OBJ_OPENLINK;
256  ObjectTypeInitializer.ValidAccessMask = FILE_ALL_ACCESS;
257  ObjectTypeInitializer.UseDefaultObject = TRUE;
258  ObjectTypeInitializer.GenericMapping = IopFileMapping;
259 
260  /* Do the Adapter Type */
261  RtlInitUnicodeString(&Name, L"Adapter");
263  &ObjectTypeInitializer,
264  NULL,
265  &IoAdapterObjectType))) return FALSE;
266 
267  /* Do the Controller Type */
268  RtlInitUnicodeString(&Name, L"Controller");
269  ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(CONTROLLER_OBJECT);
271  &ObjectTypeInitializer,
272  NULL,
273  &IoControllerObjectType))) return FALSE;
274 
275  /* Do the Device Type */
276  RtlInitUnicodeString(&Name, L"Device");
277  ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(DEVICE_OBJECT);
278  ObjectTypeInitializer.DeleteProcedure = IopDeleteDevice;
279  ObjectTypeInitializer.ParseProcedure = IopParseDevice;
280  ObjectTypeInitializer.SecurityProcedure = IopGetSetSecurityObject;
281  ObjectTypeInitializer.CaseInsensitive = TRUE;
283  &ObjectTypeInitializer,
284  NULL,
285  &IoDeviceObjectType))) return FALSE;
286 
287  /* Initialize the Driver object type */
288  RtlInitUnicodeString(&Name, L"Driver");
289  ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(DRIVER_OBJECT);
290  ObjectTypeInitializer.DeleteProcedure = IopDeleteDriver;
291  ObjectTypeInitializer.ParseProcedure = NULL;
292  ObjectTypeInitializer.SecurityProcedure = NULL;
294  &ObjectTypeInitializer,
295  NULL,
296  &IoDriverObjectType))) return FALSE;
297 
298  /* Initialize the I/O Completion object type */
299  RtlInitUnicodeString(&Name, L"IoCompletion");
300  ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(KQUEUE);
301  ObjectTypeInitializer.ValidAccessMask = IO_COMPLETION_ALL_ACCESS;
302  ObjectTypeInitializer.InvalidAttributes |= OBJ_PERMANENT;
303  ObjectTypeInitializer.GenericMapping = IopCompletionMapping;
304  ObjectTypeInitializer.DeleteProcedure = IopDeleteIoCompletion;
306  &ObjectTypeInitializer,
307  NULL,
308  &IoCompletionType))) return FALSE;
309 
310  /* Initialize the File object type */
311  RtlInitUnicodeString(&Name, L"File");
312  ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(FILE_OBJECT);
313  ObjectTypeInitializer.InvalidAttributes |= OBJ_EXCLUSIVE;
314  ObjectTypeInitializer.MaintainHandleCount = TRUE;
315  ObjectTypeInitializer.ValidAccessMask = FILE_ALL_ACCESS;
316  ObjectTypeInitializer.GenericMapping = IopFileMapping;
317  ObjectTypeInitializer.CloseProcedure = IopCloseFile;
318  ObjectTypeInitializer.DeleteProcedure = IopDeleteFile;
319  ObjectTypeInitializer.SecurityProcedure = IopGetSetSecurityObject;
320  ObjectTypeInitializer.QueryNameProcedure = IopQueryName;
321  ObjectTypeInitializer.ParseProcedure = IopParseFile;
322  ObjectTypeInitializer.UseDefaultObject = FALSE;
324  &ObjectTypeInitializer,
325  NULL,
326  &IoFileObjectType))) return FALSE;
327 
328  /* Success */
329  return TRUE;
330 }
331 
332 BOOLEAN
333 INIT_FUNCTION
334 NTAPI
336 {
339  HANDLE Handle;
341 
342  /* Create the '\Driver' object directory */
343  RtlInitUnicodeString(&DirName, L"\\Driver");
345  &DirName,
347  NULL,
348  NULL);
352  if (!NT_SUCCESS(Status))
353  {
354  DPRINT1("Failed to create \\Driver directory: 0x%lx\n", Status);
355  return FALSE;
356  }
357  NtClose(Handle);
358 
359  /* Create the '\FileSystem' object directory */
360  RtlInitUnicodeString(&DirName, L"\\FileSystem");
362  &DirName,
364  NULL,
365  NULL);
369  if (!NT_SUCCESS(Status))
370  {
371  DPRINT1("Failed to create \\FileSystem directory: 0x%lx\n", Status);
372  return FALSE;
373  }
374  NtClose(Handle);
375 
376  /* Create the '\FileSystem' object directory */
377  RtlInitUnicodeString(&DirName, L"\\FileSystem\\Filters");
379  &DirName,
381  NULL,
382  NULL);
386  if (!NT_SUCCESS(Status))
387  {
388  DPRINT1("Failed to create \\FileSystem\\Filters directory: 0x%lx\n", Status);
389  return FALSE;
390  }
391  NtClose(Handle);
392 
393  /* Return success */
394  return TRUE;
395 }
396 
397 BOOLEAN
398 INIT_FUNCTION
399 NTAPI
401 {
403  STRING DeviceString;
404  CHAR Buffer[256];
410 
411  /* Build the ARC device name */
412  sprintf(Buffer, "\\ArcName\\%s", LoaderBlock->ArcBootDeviceName);
413  RtlInitAnsiString(&DeviceString, Buffer);
415  if (!NT_SUCCESS(Status)) return FALSE;
416 
417  /* Open it */
419  &DeviceName,
421  NULL,
422  NULL);
426  &IoStatusBlock,
427  0,
429  if (!NT_SUCCESS(Status))
430  {
431  /* Fail */
432  KeBugCheckEx(INACCESSIBLE_BOOT_DEVICE,
434  Status,
435  0,
436  0);
437  }
438 
439  /* Get the DO */
441  0,
443  KernelMode,
444  (PVOID *)&FileObject,
445  NULL);
446  if (!NT_SUCCESS(Status))
447  {
448  /* Fail */
450  return FALSE;
451  }
452 
453  /* Mark it as the boot partition */
454  FileObject->DeviceObject->Flags |= DO_SYSTEM_BOOT_PARTITION;
455 
456  /* Save a copy of the DO for the I/O Error Logger */
457  ObReferenceObject(FileObject->DeviceObject);
458  IopErrorLogObject = FileObject->DeviceObject;
459 
460  /* Cleanup and return success */
464  return TRUE;
465 }
466 
467 BOOLEAN
468 INIT_FUNCTION
469 NTAPI
471 {
472  LARGE_INTEGER ExpireTime;
474  CHAR Buffer[256];
475  ANSI_STRING NtBootPath, RootString;
476 
477  /* Initialize empty NT Boot Path */
478  RtlInitEmptyAnsiString(&NtBootPath, Buffer, sizeof(Buffer));
479 
480  /* Initialize the lookaside lists */
482 
483  /* Initialize all locks and lists */
504 
505  /* Initialize the reserve IRP */
507  {
508  DPRINT1("IopInitializeReserveIrp failed!\n");
509  return FALSE;
510  }
511 
512  /* Initialize Timer List Lock */
514 
515  /* Initialize Timer List */
517 
518  /* Initialize the DPC/Timer which will call the other Timer Routines */
519  ExpireTime.QuadPart = -10000000;
522  KeSetTimerEx(&IopTimer, ExpireTime, 1000, &IopTimerDpc);
523 
524  /* Create Object Types */
525  if (!IopCreateObjectTypes())
526  {
527  DPRINT1("IopCreateObjectTypes failed!\n");
528  return FALSE;
529  }
530 
531  /* Create Object Directories */
533  {
534  DPRINT1("IopCreateRootDirectories failed!\n");
535  return FALSE;
536  }
537 
538  /* Initialize PnP manager */
540 
541  /* Initialize SHIM engine */
543 
544  /* Initialize WMI */
545  WmiInitialize();
546 
547  /* Initialize HAL Root Bus Driver */
549 
550  /* Make loader block available for the whole kernel */
551  IopLoaderBlock = LoaderBlock;
552 
553  /* Load boot start drivers */
555 
556  /* Call back drivers that asked for */
558 
559  /* Check if this was a ramdisk boot */
560  if (!_strnicmp(LoaderBlock->ArcBootDeviceName, "ramdisk(0)", 10))
561  {
562  /* Initialize the ramdisk driver */
563  IopStartRamdisk(LoaderBlock);
564  }
565 
566  /* No one should need loader block any longer */
568 
569  /* Create ARC names for boot devices */
570  Status = IopCreateArcNames(LoaderBlock);
571  if (!NT_SUCCESS(Status))
572  {
573  DPRINT1("IopCreateArcNames failed: %lx\n", Status);
574  return FALSE;
575  }
576 
577  /* Mark the system boot partition */
578  if (!IopMarkBootPartition(LoaderBlock))
579  {
580  DPRINT1("IopMarkBootPartition failed!\n");
581  return FALSE;
582  }
583 
584  /* Initialize PnP root relations */
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 FILE_GENERIC_READ
Definition: nt_native.h:653
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
ERESOURCE IopDatabaseResource
Definition: volume.c:25
#define IN
Definition: typedefs.h:38
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
#define TRUE
Definition: types.h:120
PDEVICE_OBJECT PhysicalDeviceObject
Definition: iotypes.h:839
PDEVICE_NODE IopRootDeviceNode
Definition: pnpmgr.c:18
NTSTATUS IopInitializePnpServices(IN PDEVICE_NODE DeviceNode)
Definition: pnpmgr.c:3109
#define IO_COMPLETION_ALL_ACCESS
Definition: file.c:72
POBJECT_TYPE IoControllerObjectType
Definition: controller.c:16
#define TAG_IO
Definition: tag.h:69
UNICODE_STRING NtSystemRoot
Definition: init.c:72
LIST_ENTRY IopCdRomFileSystemQueueHead
Definition: volume.c:27
LARGE_INTEGER IoWriteTransferCount
Definition: iomgr.c:42
KTIMER IopTimer
Definition: iotimer.c:23
#define FILE_ALL_ACCESS
Definition: nt_native.h:651
VOID NTAPI IopReinitializeDrivers(VOID)
Definition: driver.c:1398
VOID FASTCALL IoAssignDriveLetters(IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock, IN PSTRING NtDeviceName, OUT PUCHAR NtSystemPath, OUT PSTRING NtSystemPathString)
Definition: ntoskrnl.c:54
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
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:1434
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
BOOLEAN INIT_FUNCTION NTAPI IoInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: iomgr.c:470
#define OBJ_OPENLINK
Definition: winternl.h:230
#define OBJ_PERMANENT
Definition: winternl.h:226
ULONG IopTraceLevel
Definition: iomgr.c:16
VOID NTAPI ObDereferenceObject(IN PVOID Object)
Definition: obref.c:375
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
IRP
Definition: iotypes.h:2463
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)
WCHAR DeviceName[]
Definition: adapter.cpp:21
GENERAL_LOOKASIDE IoLargeIrpLookaside
Definition: iomgr.c:83
LONG LookasideIrpFloat
Definition: ketypes.h:655
ULONG IoWriteOperationCount
Definition: iomgr.c:41
INIT_FUNCTION NTSTATUS NTAPI PsLocateSystemDll(VOID)
Definition: psmgr.c:279
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:63
struct LOOKASIDE_ALIGN _GENERAL_LOOKASIDE GENERAL_LOOKASIDE
INIT_FUNCTION NTSTATUS NTAPI IopStartRamdisk(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: ramdisk.c:28
BOOLEAN PnpSystemInit
Definition: iomgr.c:17
#define sprintf(buf, format,...)
Definition: sprintf.c:55
INIT_FUNCTION 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
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
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:8
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
long LONG
Definition: pedump.c:60
BOOLEAN MaintainHandleCount
Definition: obtypes.h:361
struct LOOKASIDE_ALIGN _GENERAL_LOOKASIDE * PGENERAL_LOOKASIDE
_Check_return_ _CRTIMP int __cdecl _strnicmp(_In_reads_or_z_(_MaxCount) const char *_Str1, _In_reads_or_z_(_MaxCount) const char *_Str2, _In_ size_t _MaxCount)
INIT_FUNCTION NTSTATUS NTAPI IopInitializePlugPlayServices(VOID)
Definition: pnpinit.c:380
LIST_ENTRY IopTapeFileSystemQueueHead
Definition: volume.c:27
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:464
BOOLEAN NTAPI IopInitializeReserveIrp(IN PRESERVE_IRP_ALLOCATOR ReserveIrpAllocator)
Definition: irp.c:549
FORCEINLINE VOID KeInitializeSpinLock(_Out_ PKSPIN_LOCK SpinLock)
Definition: kefuncs.h:251
LIST_ENTRY IopNetworkFileSystemQueueHead
Definition: volume.c:26
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
smooth NULL
Definition: ftsmooth.c:416
VOID INIT_FUNCTION NTAPI IopInitLookasideLists(VOID)
Definition: iomgr.c:99
#define OBJ_EXCLUSIVE
Definition: winternl.h:227
VOID NTAPI IopDeleteFile(IN PVOID ObjectBody)
Definition: file.c:1354
void DPRINT(...)
Definition: polytest.cpp:61
INIT_FUNCTION VOID FASTCALL IopInitializeSystemDrivers(VOID)
Definition: driver.c:1135
Definition: bufpool.h:45
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToAnsiString(PANSI_STRING DestinationString, PUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
OB_CLOSE_METHOD CloseProcedure
Definition: obtypes.h:368
_Inout_ PFILE_OBJECT FileObject
Definition: cdprocs.h:593
KDPC IopTimerDpc
Definition: iotimer.c:22
GENERAL_LOOKASIDE IoSmallIrpLookaside
Definition: iomgr.c:84
INIT_FUNCTION VOID FASTCALL IopInitializeBootDrivers(VOID)
Definition: driver.c:939
BOOLEAN IoCountOperations
Definition: iomgr.c:38
NTSTATUS IopEnumerateDevice(IN PDEVICE_OBJECT DeviceObject)
Definition: pnpmgr.c:2670
INIT_FUNCTION 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:35
LIST_ENTRY IopDiskFileSystemQueueHead
Definition: volume.c:26
#define FILE_GENERIC_EXECUTE
Definition: nt_native.h:668
BOOLEAN INIT_FUNCTION NTAPI IopMarkBootPartition(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: iomgr.c:400
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
Definition: ketypes.h:675
USHORT MaximumLength
Definition: env_spec_w32.h:377
_In_ HANDLE Handle
Definition: extypes.h:390
_In_ LARGE_INTEGER _In_opt_ PKDPC Dpc
Definition: kefuncs.h:524
#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
INIT_FUNCTION NTSTATUS NTAPI IopReassignSystemRoot(IN PLOADER_PARAMETER_BLOCK LoaderBlock, OUT PANSI_STRING NtBootPath)
Definition: arcname.c:836
LIST_ENTRY PnpNotifyListHead
Definition: pnpnotify.c:31
OB_PARSE_METHOD ParseProcedure
Definition: obtypes.h:370
struct _CONTROLLER_OBJECT CONTROLLER_OBJECT
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
* PFILE_OBJECT
Definition: iotypes.h:1955
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 OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
#define FILE_READ_ATTRIBUTES
Definition: nt_native.h:647
struct _GENERAL_LOOKASIDE * L
Definition: ketypes.h:760
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 FILE_NON_DIRECTORY_FILE
Definition: constants.h:492
struct _DRIVER_OBJECT DRIVER_OBJECT
Definition: typedefs.h:117
#define IO_SMALLIRP_CPU
Definition: tag.h:65
POBJECT_TYPE IoFileObjectType
Definition: iomgr.c:36
KSPIN_LOCK DriverReinitListLock
Definition: driver.c:22
PLOADER_PARAMETER_BLOCK IopLoaderBlock
Definition: iomgr.c:88
CCHAR KeNumberProcessors
Definition: krnlinit.c:35
Status
Definition: gdiplustypes.h:24
_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
struct _GENERAL_LOOKASIDE * P
Definition: ketypes.h:759
BOOLEAN NTAPI KdInitSystem(ULONG Reserved, PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: kdinit.c:169
BOOLEAN INIT_FUNCTION NTAPI IopCreateObjectTypes(VOID)
Definition: iomgr.c:246
VOID NTAPI IopTimerDispatch(IN PKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
Definition: iotimer.c:32
INIT_FUNCTION NTSTATUS NTAPI IopCreateArcNames(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: arcname.c:41
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
KSPIN_LOCK IoStatisticsLock
Definition: iomgr.c:45
#define DPRINT1
Definition: precomp.h:8
KSPIN_LOCK ShutdownListLock
Definition: device.c:22
BOOLEAN INIT_FUNCTION NTAPI IopCreateRootDirectories(VOID)
Definition: iomgr.c:335
#define ObReferenceObject
Definition: obfuncs.h:204
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:114
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
LIST_ENTRY IopFsNotifyChangeQueueHead
Definition: volume.c:28
_In_ PFCB _In_ PCD_NAME DirName
Definition: cdprocs.h:741
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
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:58
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:107
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:25
LONGLONG QuadPart
Definition: typedefs.h:112
_In_opt_ PVOID DeferredContext
Definition: ketypes.h:675