2006-06-29 23:52:45 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: ReactOS Kernel
|
|
|
|
* LICENSE: GPL - See COPYING in the top level directory
|
2015-10-04 11:54:25 +00:00
|
|
|
* FILE: ntoskrnl/include/internal/io.h
|
2006-06-29 23:52:45 +00:00
|
|
|
* PURPOSE: Internal header for the I/O Manager
|
|
|
|
* PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
|
|
|
|
*/
|
2016-11-07 13:29:09 +00:00
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
#include "ntdddisk.h"
|
|
|
|
|
|
|
|
//
|
|
|
|
// Define this if you want debugging support
|
|
|
|
//
|
2015-09-25 18:40:56 +00:00
|
|
|
#define _IO_DEBUG_ 0x00
|
2006-06-29 23:52:45 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// These define the Debug Masks Supported
|
|
|
|
//
|
|
|
|
#define IO_IRP_DEBUG 0x01
|
- Fix SleepEx.
- Put volatile statements in EX_RUNDOWN_REF, IRP, DEVICE_OBJECT, ERESOURCE, FILE_OBJECT, IO_REMOVE_LOCK, WORK_QUEUE_ITEM where required (thanks to Microsoft's changes in the WDK to mark the fields properly).
- Update FILE_OBJECT definition.
- Add some asserts to some I/O functions.
- Add stub support for File Objects created by XP+ Drivers which have File Object Extensions.
- Add some fixes to IopDeleteFile, including proper reference counting for the DO and VPB, as well as cleanup when the file is closed without a handle.
- Fix a bug in IopSecurityFile.
- Queue and unqueue IRPs in all I/O functions.
- Fully support IRP cancellation now.
- Fix critical bugs in NtDeviceIoControlFile and NtDeviceFsControlFile which were causing double queueing of IRPs and freeing of invalid memory, as well as invalid paramter checking for user-mode buffers.
- Add exhaustive validation checks to IoCreateFile, add more failure cases, and validate the EA buffer. Also support IO_ATTACH_DEVICE_API flag.
- Implement IoCreateStreamFileObjectEx and IoCreateStreamFileObjectLite and fix several bugs in the original implementation of IoCreateStreamFileObject.
- Fix a bug in RtlRaiseException.
- Update Io*ShareAccess routines to support XP+ style semantics related to special File Object flags which disable their use.
- Add validation to all Query/Set routines so that information clasess, lengths, buffers and alignment are properly checked.
- Also add an array for the proper acess rights that each query/set operation requires.
- Check backup/restore privileges during I/O File operations.
- Check traverse access during I/O File Operations.
- Check access privileges to the device during I/O file operations.
- Rename IopReferenceDeviceObject and also verify if an exclusive DO is trying to be invalidly opened.
- Support various extra security checks during I/O File/Device Parse Routine.
- Fix a bug during IopCleanupIrp so that we don't dereference the File OBject if this was a create operation.
- Fix some bogus asserts in IofCompleteRequest, and save the IRP Flags before signalling it's event, since the driver might've freed it behind our back.
- Fix a large bug in ObInsertObject which affected the insert of unnamed objects with forced security options (Such as process/threads).
- Fix the creation of the Process/Thread/Job Obejct Types to that security information is forced.
- Remove "Fix PS!!!" messages since the bug is now fixed and these objects now get proper security descriptors.
- Fix another bug in ObInsertObjet which wasn't properly validating user-mode objects and always assumed kernel mode.
- Silence multiple trace/checkpoint messages that have accumulated throughout time for various debugging purposes.
svn path=/trunk/; revision=25118
2006-12-10 18:40:30 +00:00
|
|
|
#define IO_FILE_DEBUG 0x02
|
|
|
|
#define IO_API_DEBUG 0x04
|
|
|
|
#define IO_CTL_DEBUG 0x08
|
2006-06-29 23:52:45 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Debug/Tracing support
|
|
|
|
//
|
|
|
|
#if _IO_DEBUG_
|
|
|
|
#ifdef NEW_DEBUG_SYSTEM_IMPLEMENTED // enable when Debug Filters are implemented
|
- Fix SleepEx.
- Put volatile statements in EX_RUNDOWN_REF, IRP, DEVICE_OBJECT, ERESOURCE, FILE_OBJECT, IO_REMOVE_LOCK, WORK_QUEUE_ITEM where required (thanks to Microsoft's changes in the WDK to mark the fields properly).
- Update FILE_OBJECT definition.
- Add some asserts to some I/O functions.
- Add stub support for File Objects created by XP+ Drivers which have File Object Extensions.
- Add some fixes to IopDeleteFile, including proper reference counting for the DO and VPB, as well as cleanup when the file is closed without a handle.
- Fix a bug in IopSecurityFile.
- Queue and unqueue IRPs in all I/O functions.
- Fully support IRP cancellation now.
- Fix critical bugs in NtDeviceIoControlFile and NtDeviceFsControlFile which were causing double queueing of IRPs and freeing of invalid memory, as well as invalid paramter checking for user-mode buffers.
- Add exhaustive validation checks to IoCreateFile, add more failure cases, and validate the EA buffer. Also support IO_ATTACH_DEVICE_API flag.
- Implement IoCreateStreamFileObjectEx and IoCreateStreamFileObjectLite and fix several bugs in the original implementation of IoCreateStreamFileObject.
- Fix a bug in RtlRaiseException.
- Update Io*ShareAccess routines to support XP+ style semantics related to special File Object flags which disable their use.
- Add validation to all Query/Set routines so that information clasess, lengths, buffers and alignment are properly checked.
- Also add an array for the proper acess rights that each query/set operation requires.
- Check backup/restore privileges during I/O File operations.
- Check traverse access during I/O File Operations.
- Check access privileges to the device during I/O file operations.
- Rename IopReferenceDeviceObject and also verify if an exclusive DO is trying to be invalidly opened.
- Support various extra security checks during I/O File/Device Parse Routine.
- Fix a bug during IopCleanupIrp so that we don't dereference the File OBject if this was a create operation.
- Fix some bogus asserts in IofCompleteRequest, and save the IRP Flags before signalling it's event, since the driver might've freed it behind our back.
- Fix a large bug in ObInsertObject which affected the insert of unnamed objects with forced security options (Such as process/threads).
- Fix the creation of the Process/Thread/Job Obejct Types to that security information is forced.
- Remove "Fix PS!!!" messages since the bug is now fixed and these objects now get proper security descriptors.
- Fix another bug in ObInsertObjet which wasn't properly validating user-mode objects and always assumed kernel mode.
- Silence multiple trace/checkpoint messages that have accumulated throughout time for various debugging purposes.
svn path=/trunk/; revision=25118
2006-12-10 18:40:30 +00:00
|
|
|
#define IOTRACE(x, ...) \
|
|
|
|
{ \
|
|
|
|
DbgPrintEx("%s [%.16s] - ", \
|
|
|
|
__FUNCTION__, \
|
|
|
|
PsGetCurrentProcess()->ImageFileName); \
|
|
|
|
DbgPrintEx(__VA_ARGS__); \
|
|
|
|
}
|
2006-06-29 23:52:45 +00:00
|
|
|
#else
|
- Fix SleepEx.
- Put volatile statements in EX_RUNDOWN_REF, IRP, DEVICE_OBJECT, ERESOURCE, FILE_OBJECT, IO_REMOVE_LOCK, WORK_QUEUE_ITEM where required (thanks to Microsoft's changes in the WDK to mark the fields properly).
- Update FILE_OBJECT definition.
- Add some asserts to some I/O functions.
- Add stub support for File Objects created by XP+ Drivers which have File Object Extensions.
- Add some fixes to IopDeleteFile, including proper reference counting for the DO and VPB, as well as cleanup when the file is closed without a handle.
- Fix a bug in IopSecurityFile.
- Queue and unqueue IRPs in all I/O functions.
- Fully support IRP cancellation now.
- Fix critical bugs in NtDeviceIoControlFile and NtDeviceFsControlFile which were causing double queueing of IRPs and freeing of invalid memory, as well as invalid paramter checking for user-mode buffers.
- Add exhaustive validation checks to IoCreateFile, add more failure cases, and validate the EA buffer. Also support IO_ATTACH_DEVICE_API flag.
- Implement IoCreateStreamFileObjectEx and IoCreateStreamFileObjectLite and fix several bugs in the original implementation of IoCreateStreamFileObject.
- Fix a bug in RtlRaiseException.
- Update Io*ShareAccess routines to support XP+ style semantics related to special File Object flags which disable their use.
- Add validation to all Query/Set routines so that information clasess, lengths, buffers and alignment are properly checked.
- Also add an array for the proper acess rights that each query/set operation requires.
- Check backup/restore privileges during I/O File operations.
- Check traverse access during I/O File Operations.
- Check access privileges to the device during I/O file operations.
- Rename IopReferenceDeviceObject and also verify if an exclusive DO is trying to be invalidly opened.
- Support various extra security checks during I/O File/Device Parse Routine.
- Fix a bug during IopCleanupIrp so that we don't dereference the File OBject if this was a create operation.
- Fix some bogus asserts in IofCompleteRequest, and save the IRP Flags before signalling it's event, since the driver might've freed it behind our back.
- Fix a large bug in ObInsertObject which affected the insert of unnamed objects with forced security options (Such as process/threads).
- Fix the creation of the Process/Thread/Job Obejct Types to that security information is forced.
- Remove "Fix PS!!!" messages since the bug is now fixed and these objects now get proper security descriptors.
- Fix another bug in ObInsertObjet which wasn't properly validating user-mode objects and always assumed kernel mode.
- Silence multiple trace/checkpoint messages that have accumulated throughout time for various debugging purposes.
svn path=/trunk/; revision=25118
2006-12-10 18:40:30 +00:00
|
|
|
#define IOTRACE(x, ...) \
|
|
|
|
if (x & IopTraceLevel) \
|
|
|
|
{ \
|
|
|
|
DbgPrint("%s [%.16s] - ", \
|
|
|
|
__FUNCTION__, \
|
|
|
|
PsGetCurrentProcess()->ImageFileName); \
|
|
|
|
DbgPrint(__VA_ARGS__); \
|
|
|
|
}
|
2006-06-29 23:52:45 +00:00
|
|
|
#endif
|
|
|
|
#else
|
2011-08-01 22:59:44 +00:00
|
|
|
#define IOTRACE(x, fmt, ...) DPRINT(fmt, ##__VA_ARGS__)
|
2006-06-29 23:52:45 +00:00
|
|
|
#endif
|
2005-08-11 00:01:17 +00:00
|
|
|
|
2008-01-01 20:44:09 +00:00
|
|
|
//
|
|
|
|
// Registry path to the enumeration root key
|
|
|
|
//
|
|
|
|
#define ENUM_ROOT L"\\Registry\\Machine\\System\\CurrentControlSet\\Enum"
|
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
//
|
2006-06-30 03:48:03 +00:00
|
|
|
// Returns the type of METHOD_ used in this IOCTL
|
2006-06-29 23:52:45 +00:00
|
|
|
//
|
2006-06-30 03:48:03 +00:00
|
|
|
#define IO_METHOD_FROM_CTL_CODE(c) (c & 0x00000003)
|
2006-06-29 23:52:45 +00:00
|
|
|
|
2008-06-30 02:15:48 +00:00
|
|
|
//
|
|
|
|
// Bugcheck codes for RAM disk booting
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// No LoaderXIPRom descriptor was found in the loader memory list
|
|
|
|
//
|
|
|
|
#define RD_NO_XIPROM_DESCRIPTOR 1
|
|
|
|
//
|
|
|
|
// Unable to open the RAM disk driver (ramdisk.sys or \Device\Ramdisk)
|
|
|
|
//
|
|
|
|
#define RD_NO_RAMDISK_DRIVER 2
|
|
|
|
//
|
|
|
|
// FSCTL_CREATE_RAM_DISK failed
|
|
|
|
//
|
|
|
|
#define RD_FSCTL_FAILED 3
|
|
|
|
//
|
|
|
|
// Unable to create GUID string from binary GUID
|
|
|
|
//
|
|
|
|
#define RD_GUID_CONVERT_FAILED 4
|
|
|
|
//
|
|
|
|
// Unable to create symbolic link pointing to the RAM disk device
|
|
|
|
//
|
|
|
|
#define RD_SYMLINK_CREATE_FAILED 5
|
|
|
|
|
2015-04-05 20:02:30 +00:00
|
|
|
//
|
|
|
|
// Max traversal of reparse points for a single open in IoParseDevice
|
|
|
|
//
|
|
|
|
#define IOP_MAX_REPARSE_TRAVERSAL 0x20
|
|
|
|
|
2016-07-08 13:18:39 +00:00
|
|
|
//
|
|
|
|
// Private flags for IoCreateFile / IoParseDevice
|
|
|
|
//
|
|
|
|
#define IOP_USE_TOP_LEVEL_DEVICE_HINT 0x01
|
|
|
|
#define IOP_CREATE_FILE_OBJECT_EXTENSION 0x02
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _FILE_OBJECT_EXTENSION
|
|
|
|
{
|
|
|
|
PDEVICE_OBJECT TopDeviceObjectHint;
|
2018-10-04 17:19:24 +00:00
|
|
|
PVOID FilterContext;
|
2016-07-08 13:18:39 +00:00
|
|
|
|
|
|
|
} FILE_OBJECT_EXTENSION, *PFILE_OBJECT_EXTENSION;
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-06-30 15:59:06 +00:00
|
|
|
//
|
|
|
|
// We can call the Ob Inlined API, it's the same thing
|
|
|
|
//
|
|
|
|
#define IopAllocateMdlFromLookaside \
|
2008-06-18 12:28:29 +00:00
|
|
|
ObpAllocateObjectCreateInfoBuffer
|
2006-06-30 15:59:06 +00:00
|
|
|
#define IopFreeMdlFromLookaside \
|
|
|
|
ObpFreeCapturedAttributes
|
|
|
|
|
2006-06-30 03:15:56 +00:00
|
|
|
//
|
|
|
|
// Determines if the IRP is Synchronous
|
|
|
|
//
|
|
|
|
#define IsIrpSynchronous(Irp, FileObject) \
|
|
|
|
((Irp->Flags & IRP_SYNCHRONOUS_API) || \
|
|
|
|
(!(FileObject) ? \
|
|
|
|
FALSE : \
|
|
|
|
FileObject->Flags & FO_SYNCHRONOUS_IO)) \
|
|
|
|
|
2006-07-01 17:40:03 +00:00
|
|
|
//
|
|
|
|
// Returns the internal Device Object Extension
|
|
|
|
//
|
|
|
|
#define IoGetDevObjExtension(DeviceObject) \
|
|
|
|
((PEXTENDED_DEVOBJ_EXTENSION) \
|
|
|
|
(DeviceObject->DeviceObjectExtension)) \
|
|
|
|
|
2006-07-09 00:01:31 +00:00
|
|
|
//
|
|
|
|
// Returns the internal Driver Object Extension
|
|
|
|
//
|
|
|
|
#define IoGetDrvObjExtension(DriverObject) \
|
|
|
|
((PEXTENDED_DRIVER_EXTENSION) \
|
|
|
|
(DriverObject->DriverExtension)) \
|
|
|
|
|
2001-09-16 13:19:32 +00:00
|
|
|
/*
|
|
|
|
* VOID
|
|
|
|
* IopDeviceNodeSetFlag(
|
|
|
|
* PDEVICE_NODE DeviceNode,
|
|
|
|
* ULONG Flag);
|
|
|
|
*/
|
2006-06-29 23:52:45 +00:00
|
|
|
#define IopDeviceNodeSetFlag(DeviceNode, Flag) \
|
2005-06-25 17:01:17 +00:00
|
|
|
((DeviceNode)->Flags |= (Flag))
|
2001-09-16 13:19:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* VOID
|
|
|
|
* IopDeviceNodeClearFlag(
|
|
|
|
* PDEVICE_NODE DeviceNode,
|
|
|
|
* ULONG Flag);
|
|
|
|
*/
|
2006-06-29 23:52:45 +00:00
|
|
|
#define IopDeviceNodeClearFlag(DeviceNode, Flag) \
|
2005-06-25 17:01:17 +00:00
|
|
|
((DeviceNode)->Flags &= ~(Flag))
|
2001-09-16 13:19:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* BOOLEAN
|
|
|
|
* IopDeviceNodeHasFlag(
|
|
|
|
* PDEVICE_NODE DeviceNode,
|
|
|
|
* ULONG Flag);
|
|
|
|
*/
|
2006-06-29 23:52:45 +00:00
|
|
|
#define IopDeviceNodeHasFlag(DeviceNode, Flag) \
|
2005-06-25 17:01:17 +00:00
|
|
|
(((DeviceNode)->Flags & (Flag)) > 0)
|
2001-09-16 13:19:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* VOID
|
|
|
|
* IopDeviceNodeSetUserFlag(
|
|
|
|
* PDEVICE_NODE DeviceNode,
|
|
|
|
* ULONG UserFlag);
|
|
|
|
*/
|
2006-06-29 23:52:45 +00:00
|
|
|
#define IopDeviceNodeSetUserFlag(DeviceNode, UserFlag) \
|
2005-06-25 17:01:17 +00:00
|
|
|
((DeviceNode)->UserFlags |= (UserFlag))
|
2001-09-16 13:19:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* VOID
|
|
|
|
* IopDeviceNodeClearUserFlag(
|
|
|
|
* PDEVICE_NODE DeviceNode,
|
|
|
|
* ULONG UserFlag);
|
|
|
|
*/
|
2006-06-29 23:52:45 +00:00
|
|
|
#define IopDeviceNodeClearUserFlag(DeviceNode, UserFlag)\
|
2005-06-25 17:01:17 +00:00
|
|
|
((DeviceNode)->UserFlags &= ~(UserFlag))
|
2001-09-16 13:19:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* BOOLEAN
|
|
|
|
* IopDeviceNodeHasUserFlag(
|
|
|
|
* PDEVICE_NODE DeviceNode,
|
|
|
|
* ULONG UserFlag);
|
|
|
|
*/
|
2006-06-29 23:52:45 +00:00
|
|
|
#define IopDeviceNodeHasUserFlag(DeviceNode, UserFlag) \
|
2005-06-25 17:01:17 +00:00
|
|
|
(((DeviceNode)->UserFlags & (UserFlag)) > 0)
|
2001-09-16 13:19:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* VOID
|
|
|
|
* IopDeviceNodeSetProblem(
|
|
|
|
* PDEVICE_NODE DeviceNode,
|
|
|
|
* ULONG Problem);
|
|
|
|
*/
|
2006-06-29 23:52:45 +00:00
|
|
|
#define IopDeviceNodeSetProblem(DeviceNode, Problem) \
|
2005-06-25 17:01:17 +00:00
|
|
|
((DeviceNode)->Problem |= (Problem))
|
2001-09-16 13:19:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* VOID
|
|
|
|
* IopDeviceNodeClearProblem(
|
|
|
|
* PDEVICE_NODE DeviceNode,
|
|
|
|
* ULONG Problem);
|
|
|
|
*/
|
2006-06-29 23:52:45 +00:00
|
|
|
#define IopDeviceNodeClearProblem(DeviceNode, Problem) \
|
2005-06-25 17:01:17 +00:00
|
|
|
((DeviceNode)->Problem &= ~(Problem))
|
2001-09-16 13:19:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* BOOLEAN
|
|
|
|
* IopDeviceNodeHasProblem(
|
|
|
|
* PDEVICE_NODE DeviceNode,
|
|
|
|
* ULONG Problem);
|
|
|
|
*/
|
2006-06-29 23:52:45 +00:00
|
|
|
#define IopDeviceNodeHasProblem(DeviceNode, Problem) \
|
2005-06-25 17:01:17 +00:00
|
|
|
(((DeviceNode)->Problem & (Problem)) > 0)
|
2001-09-16 13:19:32 +00:00
|
|
|
|
|
|
|
/*
|
2006-06-29 23:52:45 +00:00
|
|
|
* VOID
|
|
|
|
* IopInitDeviceTreeTraverseContext(
|
|
|
|
* PDEVICETREE_TRAVERSE_CONTEXT DeviceTreeTraverseContext,
|
|
|
|
* PDEVICE_NODE DeviceNode,
|
|
|
|
* DEVICETREE_TRAVERSE_ROUTINE Action,
|
|
|
|
* PVOID Context);
|
2001-09-16 13:19:32 +00:00
|
|
|
*/
|
2006-06-29 23:52:45 +00:00
|
|
|
#define IopInitDeviceTreeTraverseContext( \
|
|
|
|
_DeviceTreeTraverseContext, _DeviceNode, _Action, \
|
|
|
|
_Context) { \
|
|
|
|
(_DeviceTreeTraverseContext)->FirstDeviceNode = \
|
|
|
|
(_DeviceNode); \
|
|
|
|
(_DeviceTreeTraverseContext)->Action = (_Action); \
|
|
|
|
(_DeviceTreeTraverseContext)->Context = (_Context); }
|
|
|
|
|
2010-06-22 18:47:22 +00:00
|
|
|
/*
|
|
|
|
* BOOLEAN
|
|
|
|
* IopIsValidPhysicalDeviceObject(
|
|
|
|
* IN PDEVICE_OBJECT PhysicalDeviceObject);
|
|
|
|
*/
|
|
|
|
#define IopIsValidPhysicalDeviceObject(PhysicalDeviceObject) \
|
|
|
|
(((PEXTENDED_DEVOBJ_EXTENSION)PhysicalDeviceObject) && \
|
|
|
|
(((PEXTENDED_DEVOBJ_EXTENSION)PhysicalDeviceObject->DeviceObjectExtension)->DeviceNode) && \
|
|
|
|
(((PEXTENDED_DEVOBJ_EXTENSION)PhysicalDeviceObject->DeviceObjectExtension)->DeviceNode->Flags & DNF_ENUMERATED))
|
|
|
|
|
2006-07-01 17:40:03 +00:00
|
|
|
//
|
|
|
|
// Device List Operations
|
|
|
|
//
|
|
|
|
typedef enum _IOP_DEVICE_LIST_OPERATION
|
|
|
|
{
|
|
|
|
IopRemove,
|
|
|
|
IopAdd
|
|
|
|
} IOP_DEVICE_LIST_OPERATION, *PIOP_DEVICE_LIST_OPERATION;
|
|
|
|
|
2006-07-02 16:20:10 +00:00
|
|
|
//
|
|
|
|
// Transfer statistics
|
|
|
|
//
|
|
|
|
typedef enum _IOP_TRANSFER_TYPE
|
|
|
|
{
|
|
|
|
IopReadTransfer,
|
|
|
|
IopWriteTransfer,
|
|
|
|
IopOtherTransfer
|
|
|
|
} IOP_TRANSFER_TYPE, *PIOP_TRANSFER_TYPE;
|
|
|
|
|
2008-11-04 21:55:55 +00:00
|
|
|
//
|
|
|
|
// Packet Types when piggybacking on the IRP Overlay
|
|
|
|
//
|
|
|
|
typedef enum _COMPLETION_PACKET_TYPE
|
|
|
|
{
|
|
|
|
IopCompletionPacketIrp,
|
|
|
|
IopCompletionPacketMini,
|
|
|
|
IopCompletionPacketQuota
|
|
|
|
} COMPLETION_PACKET_TYPE, *PCOMPLETION_PACKET_TYPE;
|
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
//
|
|
|
|
// Special version of the IRP Overlay used to optimize I/O completion
|
|
|
|
// by not using up a separate structure.
|
|
|
|
//
|
2008-11-04 21:55:55 +00:00
|
|
|
typedef struct _IOP_MINI_COMPLETION_PACKET
|
2006-06-29 23:52:45 +00:00
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
LIST_ENTRY ListEntry;
|
|
|
|
union
|
|
|
|
{
|
|
|
|
struct _IO_STACK_LOCATION *CurrentStackLocation;
|
|
|
|
ULONG PacketType;
|
|
|
|
};
|
|
|
|
};
|
2008-11-04 21:55:55 +00:00
|
|
|
PVOID KeyContext;
|
|
|
|
PVOID ApcContext;
|
|
|
|
NTSTATUS IoStatus;
|
|
|
|
ULONG_PTR IoStatusInformation;
|
|
|
|
} IOP_MINI_COMPLETION_PACKET, *PIOP_MINI_COMPLETION_PACKET;
|
2006-06-29 23:52:45 +00:00
|
|
|
|
2006-11-12 22:39:09 +00:00
|
|
|
//
|
|
|
|
// I/O Completion Context for IoSetIoCompletionRoutineEx
|
|
|
|
//
|
|
|
|
typedef struct _IO_UNLOAD_SAFE_COMPLETION_CONTEXT
|
|
|
|
{
|
|
|
|
PDEVICE_OBJECT DeviceObject;
|
|
|
|
PVOID Context;
|
|
|
|
PIO_COMPLETION_ROUTINE CompletionRoutine;
|
|
|
|
} IO_UNLOAD_SAFE_COMPLETION_CONTEXT, *PIO_UNLOAD_SAFE_COMPLETION_CONTEXT;
|
|
|
|
|
2006-06-30 16:56:18 +00:00
|
|
|
//
|
|
|
|
// I/O Wrapper around the Executive Work Item
|
|
|
|
//
|
|
|
|
typedef struct _IO_WORKITEM
|
|
|
|
{
|
|
|
|
WORK_QUEUE_ITEM Item;
|
|
|
|
PDEVICE_OBJECT DeviceObject;
|
|
|
|
PIO_WORKITEM_ROUTINE WorkerRoutine;
|
|
|
|
PVOID Context;
|
2008-12-01 15:12:23 +00:00
|
|
|
} IO_WORKITEM;
|
2006-06-30 16:56:18 +00:00
|
|
|
|
2006-06-30 18:54:34 +00:00
|
|
|
//
|
|
|
|
// I/O Wrapper around the Kernel Interrupt
|
|
|
|
//
|
|
|
|
typedef struct _IO_INTERRUPT
|
|
|
|
{
|
|
|
|
KINTERRUPT FirstInterrupt;
|
|
|
|
PKINTERRUPT Interrupt[MAXIMUM_PROCESSORS];
|
|
|
|
KSPIN_LOCK SpinLock;
|
|
|
|
} IO_INTERRUPT, *PIO_INTERRUPT;
|
|
|
|
|
2006-07-01 03:36:15 +00:00
|
|
|
//
|
|
|
|
// I/O Error Log Packet Header
|
|
|
|
//
|
|
|
|
typedef struct _ERROR_LOG_ENTRY
|
|
|
|
{
|
|
|
|
CSHORT Type;
|
|
|
|
CSHORT Size;
|
|
|
|
LIST_ENTRY ListEntry;
|
|
|
|
PDEVICE_OBJECT DeviceObject;
|
|
|
|
PDRIVER_OBJECT DriverObject;
|
|
|
|
LARGE_INTEGER TimeStamp;
|
|
|
|
} ERROR_LOG_ENTRY, *PERROR_LOG_ENTRY;
|
|
|
|
|
2006-06-30 18:54:34 +00:00
|
|
|
//
|
|
|
|
// To simplify matters, the kernel is made to support both the checked and free
|
|
|
|
// version of the I/O Remove Lock in the same binary. This structure includes
|
|
|
|
// both, since the DDK has the structure with a compile-time #ifdef.
|
|
|
|
//
|
|
|
|
typedef struct _EXTENDED_IO_REMOVE_LOCK
|
|
|
|
{
|
|
|
|
IO_REMOVE_LOCK_COMMON_BLOCK Common;
|
|
|
|
IO_REMOVE_LOCK_DBG_BLOCK Dbg;
|
|
|
|
} EXTENDED_IO_REMOVE_LOCK, *PEXTENDED_IO_REMOVE_LOCK;
|
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
//
|
|
|
|
// Dummy File Object used inside the Open Packet so that OB knows how to
|
|
|
|
// deal with the Object Pointer even though it's not a real file.
|
|
|
|
//
|
|
|
|
typedef struct _DUMMY_FILE_OBJECT
|
|
|
|
{
|
|
|
|
OBJECT_HEADER ObjectHeader;
|
|
|
|
CHAR FileObjectBody[sizeof(FILE_OBJECT)];
|
|
|
|
} DUMMY_FILE_OBJECT, *PDUMMY_FILE_OBJECT;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Open packet used as a context for Device/File parsing so that the parse
|
|
|
|
// routine can know what operation is being requested.
|
|
|
|
//
|
|
|
|
typedef struct _OPEN_PACKET
|
|
|
|
{
|
|
|
|
CSHORT Type;
|
|
|
|
CSHORT Size;
|
|
|
|
PFILE_OBJECT FileObject;
|
|
|
|
NTSTATUS FinalStatus;
|
|
|
|
ULONG_PTR Information;
|
|
|
|
ULONG ParseCheck;
|
|
|
|
PFILE_OBJECT RelatedFileObject;
|
|
|
|
OBJECT_ATTRIBUTES OriginalAttributes;
|
|
|
|
LARGE_INTEGER AllocationSize;
|
|
|
|
ULONG CreateOptions;
|
|
|
|
USHORT FileAttributes;
|
|
|
|
USHORT ShareAccess;
|
|
|
|
PVOID EaBuffer;
|
|
|
|
ULONG EaLength;
|
|
|
|
ULONG Options;
|
|
|
|
ULONG Disposition;
|
|
|
|
PFILE_BASIC_INFORMATION BasicInformation;
|
|
|
|
PFILE_NETWORK_OPEN_INFORMATION NetworkInformation;
|
|
|
|
CREATE_FILE_TYPE CreateFileType;
|
2013-09-11 18:50:28 +00:00
|
|
|
PVOID ExtraCreateParameters;
|
2006-06-29 23:52:45 +00:00
|
|
|
BOOLEAN Override;
|
|
|
|
BOOLEAN QueryOnly;
|
|
|
|
BOOLEAN DeleteOnly;
|
|
|
|
BOOLEAN FullAttributes;
|
2013-09-11 18:50:28 +00:00
|
|
|
PDUMMY_FILE_OBJECT LocalFileObject;
|
|
|
|
BOOLEAN TraversedMountPoint;
|
2006-06-29 23:52:45 +00:00
|
|
|
ULONG InternalFlags;
|
2013-09-11 18:50:28 +00:00
|
|
|
PDEVICE_OBJECT TopDeviceObjectHint;
|
2006-06-29 23:52:45 +00:00
|
|
|
} OPEN_PACKET, *POPEN_PACKET;
|
|
|
|
|
2007-10-03 10:17:04 +00:00
|
|
|
//
|
|
|
|
// Parameters packet for Load/Unload work item's context
|
|
|
|
//
|
|
|
|
typedef struct _LOAD_UNLOAD_PARAMS
|
|
|
|
{
|
|
|
|
NTSTATUS Status;
|
2014-10-23 14:37:51 +00:00
|
|
|
PCUNICODE_STRING RegistryPath;
|
2007-10-03 10:17:04 +00:00
|
|
|
WORK_QUEUE_ITEM WorkItem;
|
|
|
|
KEVENT Event;
|
2007-10-03 11:54:31 +00:00
|
|
|
PDRIVER_OBJECT DriverObject;
|
2007-10-03 10:17:04 +00:00
|
|
|
} LOAD_UNLOAD_PARAMS, *PLOAD_UNLOAD_PARAMS;
|
|
|
|
|
2010-04-02 17:57:33 +00:00
|
|
|
//
|
|
|
|
// Boot Driver List Entry
|
|
|
|
//
|
|
|
|
typedef struct _DRIVER_INFORMATION
|
|
|
|
{
|
|
|
|
LIST_ENTRY Link;
|
|
|
|
PDRIVER_OBJECT DriverObject;
|
|
|
|
PBOOT_DRIVER_LIST_ENTRY DataTableEntry;
|
|
|
|
HANDLE ServiceHandle;
|
|
|
|
USHORT TagPosition;
|
|
|
|
ULONG Failed;
|
|
|
|
ULONG Processed;
|
|
|
|
NTSTATUS Status;
|
|
|
|
} DRIVER_INFORMATION, *PDRIVER_INFORMATION;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Boot Driver Node
|
|
|
|
//
|
|
|
|
typedef struct _BOOT_DRIVER_NODE
|
|
|
|
{
|
|
|
|
BOOT_DRIVER_LIST_ENTRY ListEntry;
|
|
|
|
UNICODE_STRING Group;
|
|
|
|
UNICODE_STRING Name;
|
|
|
|
ULONG Tag;
|
|
|
|
ULONG ErrorControl;
|
|
|
|
} BOOT_DRIVER_NODE, *PBOOT_DRIVER_NODE;
|
[HAL/NDK]
- Make Vector parameter in HalEnableSystemInterrupt, HalDisableSystemInterrupt and HalBeginSystemInterrupt an ULONG, not an UCHAR
[NDK]
- 64bit fixes for HANDLE_TABLE, KPROCESS, SECTION_IMAGE_INFORMATION, MMADDRESS_LIST, MMVAD_FLAGS, MMVAD, MMVAD_LONG, MMVAD_SHORT, MEMORY_DESCRIPTOR, MEMORY_ALLOCATION_DESCRIPTOR, LdrVerifyMappedImageMatchesChecksum
- KDPC_DATA::DpcQueueDepth is signed on amd64, unsigned on x86
[NTOSKRNL]
- Fix hundreds of MSVC and amd64 warnings
- add a pragma message to FstubFixupEfiPartition, since it looks broken
- Move portable Ke constants from <arch>/cpu.c to krnlinit.c
- Fixed a bug in amd64 KiGeneralProtectionFaultHandler
svn path=/trunk/; revision=53734
2011-09-18 13:11:45 +00:00
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
//
|
|
|
|
// List of Bus Type GUIDs
|
|
|
|
//
|
|
|
|
typedef struct _IO_BUS_TYPE_GUID_LIST
|
|
|
|
{
|
|
|
|
ULONG GuidCount;
|
|
|
|
FAST_MUTEX Lock;
|
|
|
|
GUID Guids[1];
|
|
|
|
} IO_BUS_TYPE_GUID_LIST, *PIO_BUS_TYPE_GUID_LIST;
|
|
|
|
extern PIO_BUS_TYPE_GUID_LIST IopBusTypeGuidList;
|
|
|
|
|
2006-07-01 21:51:06 +00:00
|
|
|
//
|
|
|
|
// Shutdown entry for registed devices
|
|
|
|
//
|
|
|
|
typedef struct _SHUTDOWN_ENTRY
|
|
|
|
{
|
|
|
|
LIST_ENTRY ShutdownList;
|
|
|
|
PDEVICE_OBJECT DeviceObject;
|
|
|
|
} SHUTDOWN_ENTRY, *PSHUTDOWN_ENTRY;
|
|
|
|
|
2006-07-02 01:29:12 +00:00
|
|
|
//
|
|
|
|
// F/S Notification entry for registered File Systems
|
|
|
|
//
|
|
|
|
typedef struct _FS_CHANGE_NOTIFY_ENTRY
|
|
|
|
{
|
|
|
|
LIST_ENTRY FsChangeNotifyList;
|
|
|
|
PDRIVER_OBJECT DriverObject;
|
|
|
|
PDRIVER_FS_NOTIFICATION FSDNotificationProc;
|
|
|
|
} FS_CHANGE_NOTIFY_ENTRY, *PFS_CHANGE_NOTIFY_ENTRY;
|
|
|
|
|
2006-07-09 00:01:31 +00:00
|
|
|
//
|
|
|
|
// Driver (Boot) Re-Initialization Entry
|
|
|
|
//
|
|
|
|
typedef struct _DRIVER_REINIT_ITEM
|
|
|
|
{
|
|
|
|
LIST_ENTRY ItemEntry;
|
|
|
|
PDRIVER_OBJECT DriverObject;
|
|
|
|
PDRIVER_REINITIALIZE ReinitRoutine;
|
|
|
|
PVOID Context;
|
|
|
|
} DRIVER_REINIT_ITEM, *PDRIVER_REINIT_ITEM;
|
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
//
|
|
|
|
// Called on every visit of a node during a preorder-traversal of the device
|
|
|
|
// node tree.
|
|
|
|
// If the routine returns STATUS_UNSUCCESSFUL the traversal will stop and
|
|
|
|
// STATUS_SUCCESS is returned to the caller who initiated the tree traversal.
|
|
|
|
// Any other returned status code will be returned to the caller. If a status
|
|
|
|
// code that indicates an error (other than STATUS_UNSUCCESSFUL) is returned,
|
|
|
|
// the traversal is stopped immediately and the status code is returned to
|
|
|
|
// the caller.
|
|
|
|
//
|
|
|
|
typedef
|
|
|
|
NTSTATUS
|
|
|
|
(*DEVICETREE_TRAVERSE_ROUTINE)(
|
|
|
|
IN PDEVICE_NODE DeviceNode,
|
|
|
|
IN PVOID Context
|
2005-06-25 17:01:17 +00:00
|
|
|
);
|
2001-09-16 13:19:32 +00:00
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
//
|
|
|
|
// Context information for traversing the device tree
|
|
|
|
//
|
2001-09-16 13:19:32 +00:00
|
|
|
typedef struct _DEVICETREE_TRAVERSE_CONTEXT
|
|
|
|
{
|
2006-06-29 23:52:45 +00:00
|
|
|
//
|
|
|
|
// Current device node during a traversal
|
|
|
|
//
|
2005-06-25 17:01:17 +00:00
|
|
|
PDEVICE_NODE DeviceNode;
|
2006-06-29 23:52:45 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Initial device node where we start the traversal
|
|
|
|
//
|
2005-06-25 17:01:17 +00:00
|
|
|
PDEVICE_NODE FirstDeviceNode;
|
2006-06-29 23:52:45 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Action routine to be called for every device node
|
|
|
|
//
|
2005-06-25 17:01:17 +00:00
|
|
|
DEVICETREE_TRAVERSE_ROUTINE Action;
|
2006-06-29 23:52:45 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Context passed to the action routine
|
|
|
|
//
|
2005-06-25 17:01:17 +00:00
|
|
|
PVOID Context;
|
2001-09-16 13:19:32 +00:00
|
|
|
} DEVICETREE_TRAVERSE_CONTEXT, *PDEVICETREE_TRAVERSE_CONTEXT;
|
|
|
|
|
2018-02-24 13:50:23 +00:00
|
|
|
//
|
|
|
|
// Reserve IRP allocator
|
|
|
|
// Used for read paging IOs in low-memory situations
|
|
|
|
//
|
|
|
|
typedef struct _RESERVE_IRP_ALLOCATOR
|
|
|
|
{
|
|
|
|
PIRP ReserveIrp;
|
|
|
|
volatile LONG ReserveIrpInUse;
|
|
|
|
KEVENT WaitEvent;
|
|
|
|
CCHAR StackSize;
|
|
|
|
} RESERVE_IRP_ALLOCATOR, *PRESERVE_IRP_ALLOCATOR;
|
|
|
|
|
2018-12-04 18:10:40 +00:00
|
|
|
//
|
2018-12-04 18:20:47 +00:00
|
|
|
// Type selection for IopCreateSecurityDescriptorPerType()
|
2018-12-04 18:10:40 +00:00
|
|
|
//
|
|
|
|
typedef enum _SECURITY_DESCRIPTOR_TYPE
|
|
|
|
{
|
|
|
|
RestrictedPublic = 1,
|
|
|
|
UnrestrictedPublic,
|
|
|
|
RestrictedPublicOpen,
|
|
|
|
UnrestrictedPublicOpen,
|
|
|
|
SystemDefault,
|
|
|
|
} SECURITY_DESCRIPTOR_TYPE, *PSECURITY_DESCRIPTOR_TYPE;
|
|
|
|
|
2020-03-01 22:29:23 +00:00
|
|
|
//
|
2020-06-24 01:49:18 +00:00
|
|
|
// Action types and data for PiQueueDeviceAction()
|
2020-03-01 22:29:23 +00:00
|
|
|
//
|
|
|
|
typedef enum _DEVICE_ACTION
|
|
|
|
{
|
2020-06-24 01:49:18 +00:00
|
|
|
PiActionEnumDeviceTree,
|
2020-08-21 05:20:59 +00:00
|
|
|
PiActionEnumRootDevices,
|
|
|
|
PiActionResetDevice
|
2020-03-01 22:29:23 +00:00
|
|
|
} DEVICE_ACTION;
|
|
|
|
|
2010-04-21 22:33:11 +00:00
|
|
|
//
|
|
|
|
// Resource code
|
|
|
|
//
|
|
|
|
ULONG
|
|
|
|
NTAPI
|
2010-05-28 23:17:59 +00:00
|
|
|
PnpDetermineResourceListSize(IN PCM_RESOURCE_LIST ResourceList);
|
2010-04-21 22:33:11 +00:00
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
IopAssignDeviceResources(
|
|
|
|
IN PDEVICE_NODE DeviceNode
|
|
|
|
);
|
|
|
|
|
2010-10-24 02:38:14 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2012-02-11 03:54:10 +00:00
|
|
|
IopFixupResourceListWithRequirements(
|
2010-10-24 02:38:14 +00:00
|
|
|
IN PIO_RESOURCE_REQUIREMENTS_LIST RequirementsList,
|
|
|
|
OUT PCM_RESOURCE_LIST *ResourceList
|
|
|
|
);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
IopDetectResourceConflict(
|
|
|
|
IN PCM_RESOURCE_LIST ResourceList,
|
|
|
|
IN BOOLEAN Silent,
|
|
|
|
OUT OPTIONAL PCM_PARTIAL_RESOURCE_DESCRIPTOR ConflictingDescriptor
|
|
|
|
);
|
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
//
|
|
|
|
// PNP Routines
|
|
|
|
//
|
2010-04-11 16:10:49 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
PipCallDriverAddDevice(
|
|
|
|
IN PDEVICE_NODE DeviceNode,
|
[HAL/NDK]
- Make Vector parameter in HalEnableSystemInterrupt, HalDisableSystemInterrupt and HalBeginSystemInterrupt an ULONG, not an UCHAR
[NDK]
- 64bit fixes for HANDLE_TABLE, KPROCESS, SECTION_IMAGE_INFORMATION, MMADDRESS_LIST, MMVAD_FLAGS, MMVAD, MMVAD_LONG, MMVAD_SHORT, MEMORY_DESCRIPTOR, MEMORY_ALLOCATION_DESCRIPTOR, LdrVerifyMappedImageMatchesChecksum
- KDPC_DATA::DpcQueueDepth is signed on amd64, unsigned on x86
[NTOSKRNL]
- Fix hundreds of MSVC and amd64 warnings
- add a pragma message to FstubFixupEfiPartition, since it looks broken
- Move portable Ke constants from <arch>/cpu.c to krnlinit.c
- Fixed a bug in amd64 KiGeneralProtectionFaultHandler
svn path=/trunk/; revision=53734
2011-09-18 13:11:45 +00:00
|
|
|
IN BOOLEAN LoadDriver,
|
2010-04-11 16:10:49 +00:00
|
|
|
IN PDRIVER_OBJECT DriverObject
|
|
|
|
);
|
|
|
|
|
2018-12-30 11:19:11 +00:00
|
|
|
INIT_FUNCTION
|
2010-04-11 21:25:50 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
IopInitializePlugPlayServices(
|
2006-06-29 23:52:45 +00:00
|
|
|
VOID
|
|
|
|
);
|
2001-05-01 23:08:21 +00:00
|
|
|
|
2007-01-24 19:48:34 +00:00
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
|
|
|
PpInitSystem(
|
|
|
|
VOID
|
|
|
|
);
|
|
|
|
|
2005-06-04 22:55:58 +00:00
|
|
|
VOID
|
2006-06-29 23:52:45 +00:00
|
|
|
PnpInit2(
|
|
|
|
VOID
|
|
|
|
);
|
2005-06-04 22:55:58 +00:00
|
|
|
|
2002-06-10 08:50:55 +00:00
|
|
|
VOID
|
2006-06-29 23:52:45 +00:00
|
|
|
IopInitDriverImplementation(
|
|
|
|
VOID
|
|
|
|
);
|
2002-06-10 08:50:55 +00:00
|
|
|
|
2005-04-30 09:39:09 +00:00
|
|
|
VOID
|
2006-06-29 23:52:45 +00:00
|
|
|
IopInitPnpNotificationImplementation(
|
|
|
|
VOID
|
|
|
|
);
|
2005-04-30 09:39:09 +00:00
|
|
|
|
|
|
|
VOID
|
|
|
|
IopNotifyPlugPlayNotification(
|
2005-06-25 17:01:17 +00:00
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN IO_NOTIFICATION_EVENT_CATEGORY EventCategory,
|
2006-01-11 22:13:02 +00:00
|
|
|
IN LPCGUID Event,
|
2005-06-25 17:01:17 +00:00
|
|
|
IN PVOID EventCategoryData1,
|
|
|
|
IN PVOID EventCategoryData2
|
|
|
|
);
|
2005-04-30 09:39:09 +00:00
|
|
|
|
2001-05-01 23:08:21 +00:00
|
|
|
NTSTATUS
|
2006-06-29 23:52:45 +00:00
|
|
|
IopGetSystemPowerDeviceObject(
|
|
|
|
IN PDEVICE_OBJECT *DeviceObject
|
|
|
|
);
|
2005-06-25 17:01:17 +00:00
|
|
|
|
2010-04-11 21:25:50 +00:00
|
|
|
PDEVICE_NODE
|
|
|
|
NTAPI
|
|
|
|
PipAllocateDeviceNode(
|
|
|
|
IN PDEVICE_OBJECT PhysicalDeviceObject
|
|
|
|
);
|
|
|
|
|
2001-05-01 23:08:21 +00:00
|
|
|
NTSTATUS
|
2005-06-25 17:01:17 +00:00
|
|
|
IopCreateDeviceNode(
|
2006-06-29 23:52:45 +00:00
|
|
|
IN PDEVICE_NODE ParentNode,
|
|
|
|
IN PDEVICE_OBJECT PhysicalDeviceObject,
|
2007-03-22 17:13:14 +00:00
|
|
|
IN PUNICODE_STRING ServiceName,
|
2006-06-29 23:52:45 +00:00
|
|
|
OUT PDEVICE_NODE *DeviceNode
|
2005-06-25 17:01:17 +00:00
|
|
|
);
|
|
|
|
|
2001-05-01 23:08:21 +00:00
|
|
|
NTSTATUS
|
2006-06-29 23:52:45 +00:00
|
|
|
IopFreeDeviceNode(
|
|
|
|
IN PDEVICE_NODE DeviceNode
|
|
|
|
);
|
1998-09-13 15:55:36 +00:00
|
|
|
|
2011-05-31 18:11:40 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
IopQueryDeviceCapabilities(PDEVICE_NODE DeviceNode,
|
|
|
|
PDEVICE_CAPABILITIES DeviceCaps);
|
|
|
|
|
2002-04-10 09:58:45 +00:00
|
|
|
NTSTATUS
|
2010-04-11 16:10:49 +00:00
|
|
|
NTAPI
|
|
|
|
IopSynchronousCall(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PIO_STACK_LOCATION IoStackLocation,
|
|
|
|
OUT PVOID *Information
|
|
|
|
);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-06-29 23:52:45 +00:00
|
|
|
IopInitiatePnpIrp(
|
2005-06-25 17:01:17 +00:00
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
2006-06-29 23:52:45 +00:00
|
|
|
IN PIO_STATUS_BLOCK IoStatusBlock,
|
[HAL/NDK]
- Make Vector parameter in HalEnableSystemInterrupt, HalDisableSystemInterrupt and HalBeginSystemInterrupt an ULONG, not an UCHAR
[NDK]
- 64bit fixes for HANDLE_TABLE, KPROCESS, SECTION_IMAGE_INFORMATION, MMADDRESS_LIST, MMVAD_FLAGS, MMVAD, MMVAD_LONG, MMVAD_SHORT, MEMORY_DESCRIPTOR, MEMORY_ALLOCATION_DESCRIPTOR, LdrVerifyMappedImageMatchesChecksum
- KDPC_DATA::DpcQueueDepth is signed on amd64, unsigned on x86
[NTOSKRNL]
- Fix hundreds of MSVC and amd64 warnings
- add a pragma message to FstubFixupEfiPartition, since it looks broken
- Move portable Ke constants from <arch>/cpu.c to krnlinit.c
- Fixed a bug in amd64 KiGeneralProtectionFaultHandler
svn path=/trunk/; revision=53734
2011-09-18 13:11:45 +00:00
|
|
|
IN UCHAR MinorFunction,
|
2006-06-29 23:52:45 +00:00
|
|
|
IN PIO_STACK_LOCATION Stack
|
2005-06-25 17:01:17 +00:00
|
|
|
);
|
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
PDEVICE_NODE
|
|
|
|
FASTCALL
|
|
|
|
IopGetDeviceNode(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject
|
|
|
|
);
|
2005-06-25 17:01:17 +00:00
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
NTSTATUS
|
|
|
|
IopActionConfigureChildServices(
|
|
|
|
IN PDEVICE_NODE DeviceNode,
|
|
|
|
IN PVOID Context
|
2005-06-25 17:01:17 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSTATUS
|
2006-06-29 23:52:45 +00:00
|
|
|
IopActionInitChildServices(
|
|
|
|
IN PDEVICE_NODE DeviceNode,
|
2008-08-22 17:47:13 +00:00
|
|
|
IN PVOID Context
|
2005-06-25 17:01:17 +00:00
|
|
|
);
|
2005-04-17 04:20:16 +00:00
|
|
|
|
2005-05-09 01:38:29 +00:00
|
|
|
NTSTATUS
|
2006-06-29 23:52:45 +00:00
|
|
|
IoCreateDriverList(
|
|
|
|
VOID
|
|
|
|
);
|
1999-02-01 20:58:37 +00:00
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
NTSTATUS
|
|
|
|
IoDestroyDriverList(
|
|
|
|
VOID
|
|
|
|
);
|
2005-06-25 17:01:17 +00:00
|
|
|
|
2018-12-30 11:19:11 +00:00
|
|
|
INIT_FUNCTION
|
2007-10-19 23:21:45 +00:00
|
|
|
NTSTATUS
|
2006-06-29 23:52:45 +00:00
|
|
|
IopInitPlugPlayEvents(VOID);
|
2005-06-25 17:01:17 +00:00
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
NTSTATUS
|
|
|
|
IopQueueTargetDeviceEvent(
|
|
|
|
const GUID *Guid,
|
|
|
|
PUNICODE_STRING DeviceIds
|
|
|
|
);
|
1999-11-12 12:01:17 +00:00
|
|
|
|
2002-03-13 01:30:34 +00:00
|
|
|
NTSTATUS
|
2006-06-29 23:52:45 +00:00
|
|
|
IopInitializePnpServices(
|
2008-08-22 17:47:13 +00:00
|
|
|
IN PDEVICE_NODE DeviceNode);
|
2008-01-01 21:01:28 +00:00
|
|
|
|
|
|
|
NTSTATUS
|
2008-08-21 11:04:50 +00:00
|
|
|
NTAPI
|
2008-01-01 21:01:28 +00:00
|
|
|
IopOpenRegistryKeyEx(
|
|
|
|
PHANDLE KeyHandle,
|
|
|
|
HANDLE ParentKey,
|
|
|
|
PUNICODE_STRING Name,
|
|
|
|
ACCESS_MASK DesiredAccess);
|
2002-03-13 01:30:34 +00:00
|
|
|
|
2008-08-23 17:11:12 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2010-04-11 21:25:50 +00:00
|
|
|
IopGetRegistryValue(
|
|
|
|
IN HANDLE Handle,
|
|
|
|
IN PWSTR ValueName,
|
|
|
|
OUT PKEY_VALUE_FULL_INFORMATION *Information
|
|
|
|
);
|
2008-08-23 17:11:12 +00:00
|
|
|
|
2010-04-11 21:25:50 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
IopCreateRegistryKeyEx(
|
|
|
|
OUT PHANDLE Handle,
|
|
|
|
IN HANDLE BaseHandle OPTIONAL,
|
|
|
|
IN PUNICODE_STRING KeyName,
|
|
|
|
IN ACCESS_MASK DesiredAccess,
|
|
|
|
IN ULONG CreateOptions,
|
|
|
|
OUT PULONG Disposition OPTIONAL
|
|
|
|
);
|
2008-08-23 17:11:12 +00:00
|
|
|
|
2011-06-19 04:25:33 +00:00
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
IopTraverseDeviceTree(
|
|
|
|
PDEVICETREE_TRAVERSE_CONTEXT Context);
|
|
|
|
|
2020-06-19 20:55:40 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
IopCreateDeviceKeyPath(
|
|
|
|
IN PCUNICODE_STRING RegistryPath,
|
|
|
|
IN ULONG CreateOptions,
|
|
|
|
OUT PHANDLE Handle);
|
|
|
|
|
2010-04-02 17:57:33 +00:00
|
|
|
//
|
|
|
|
// PnP Routines
|
|
|
|
//
|
2018-12-30 11:19:11 +00:00
|
|
|
INIT_FUNCTION
|
2010-04-11 21:25:50 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
IopUpdateRootKey(
|
|
|
|
VOID
|
|
|
|
);
|
|
|
|
|
2018-12-30 11:19:11 +00:00
|
|
|
INIT_FUNCTION
|
2010-04-02 17:57:33 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
PiInitCacheGroupInformation(
|
|
|
|
VOID
|
|
|
|
);
|
|
|
|
|
|
|
|
USHORT
|
|
|
|
NTAPI
|
|
|
|
PpInitGetGroupOrderIndex(
|
|
|
|
IN HANDLE ServiceHandle
|
|
|
|
);
|
|
|
|
|
|
|
|
USHORT
|
|
|
|
NTAPI
|
|
|
|
PipGetDriverTagPriority(
|
|
|
|
IN HANDLE ServiceHandle
|
|
|
|
);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
PnpRegMultiSzToUnicodeStrings(
|
|
|
|
IN PKEY_VALUE_FULL_INFORMATION KeyValueInformation,
|
|
|
|
OUT PUNICODE_STRING *UnicodeStringList,
|
|
|
|
OUT PULONG UnicodeStringCount
|
|
|
|
);
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
|
|
|
PnpRegSzToString(
|
|
|
|
IN PWCHAR RegSzData,
|
|
|
|
IN ULONG RegSzLength,
|
|
|
|
OUT PUSHORT StringLength OPTIONAL
|
|
|
|
);
|
[HAL/NDK]
- Make Vector parameter in HalEnableSystemInterrupt, HalDisableSystemInterrupt and HalBeginSystemInterrupt an ULONG, not an UCHAR
[NDK]
- 64bit fixes for HANDLE_TABLE, KPROCESS, SECTION_IMAGE_INFORMATION, MMADDRESS_LIST, MMVAD_FLAGS, MMVAD, MMVAD_LONG, MMVAD_SHORT, MEMORY_DESCRIPTOR, MEMORY_ALLOCATION_DESCRIPTOR, LdrVerifyMappedImageMatchesChecksum
- KDPC_DATA::DpcQueueDepth is signed on amd64, unsigned on x86
[NTOSKRNL]
- Fix hundreds of MSVC and amd64 warnings
- add a pragma message to FstubFixupEfiPartition, since it looks broken
- Move portable Ke constants from <arch>/cpu.c to krnlinit.c
- Fixed a bug in amd64 KiGeneralProtectionFaultHandler
svn path=/trunk/; revision=53734
2011-09-18 13:11:45 +00:00
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
//
|
|
|
|
// Initialization Routines
|
|
|
|
//
|
2018-12-30 11:19:11 +00:00
|
|
|
INIT_FUNCTION
|
2001-09-01 15:36:45 +00:00
|
|
|
NTSTATUS
|
2006-10-08 21:38:45 +00:00
|
|
|
NTAPI
|
|
|
|
IopCreateArcNames(
|
|
|
|
IN PLOADER_PARAMETER_BLOCK LoaderBlock
|
2005-06-25 17:01:17 +00:00
|
|
|
);
|
2001-09-01 15:36:45 +00:00
|
|
|
|
2018-12-30 11:19:11 +00:00
|
|
|
INIT_FUNCTION
|
2002-06-12 23:30:36 +00:00
|
|
|
NTSTATUS
|
2006-10-08 07:53:37 +00:00
|
|
|
NTAPI
|
|
|
|
IopReassignSystemRoot(
|
|
|
|
IN PLOADER_PARAMETER_BLOCK LoaderBlock,
|
|
|
|
OUT PANSI_STRING NtBootPath
|
2006-06-29 23:52:45 +00:00
|
|
|
);
|
2002-06-12 23:30:36 +00:00
|
|
|
|
2018-12-30 11:19:11 +00:00
|
|
|
INIT_FUNCTION
|
2006-10-08 23:46:26 +00:00
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
|
|
|
IoInitSystem(
|
|
|
|
IN PLOADER_PARAMETER_BLOCK LoaderBlock
|
|
|
|
);
|
|
|
|
|
[NTOSKRNL]
Implemented IopFetchConfigurationInformation(), IopCreateArcNamesCd(), IopCreateArcNamesDisk(), IopVerifyDiskSignature()
Removed IopApplyRosCdromArcHack(), IopGetDiskInformation(), IopAssignArcNamesToCdrom()
Finally, rewritten IopCreateArcNames()
To make it short, this is the rewrite of ARC names handling in the kernel.
This brings our kernel to a higher state of existence. Indeed, it's leaving NT4 design for a proper NT5.2 design, with less hacks, less ROS specific stuff and such.
This code handles the mount manager we don't have yet.
svn path=/trunk/; revision=49131
2010-10-12 20:29:50 +00:00
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
|
|
|
IopVerifyDiskSignature(
|
|
|
|
IN PDRIVE_LAYOUT_INFORMATION_EX DriveLayout,
|
|
|
|
IN PARC_DISK_SIGNATURE ArcDiskSignature,
|
|
|
|
OUT PULONG Signature
|
|
|
|
);
|
|
|
|
|
2018-09-18 19:42:01 +00:00
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
|
|
|
IoInitializeCrashDump(
|
|
|
|
IN HANDLE PageFileHandle
|
|
|
|
);
|
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
//
|
|
|
|
// Device/Volume Routines
|
|
|
|
//
|
2010-04-11 16:10:49 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
IopReadyDeviceObjects(
|
|
|
|
IN PDRIVER_OBJECT Driver
|
|
|
|
);
|
|
|
|
|
2002-06-12 23:30:36 +00:00
|
|
|
NTSTATUS
|
2006-06-29 23:52:45 +00:00
|
|
|
FASTCALL
|
|
|
|
IopInitializeDevice(
|
|
|
|
IN PDEVICE_NODE DeviceNode,
|
|
|
|
IN PDRIVER_OBJECT DriverObject
|
|
|
|
);
|
2002-06-12 23:30:36 +00:00
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
NTSTATUS
|
|
|
|
IopStartDevice(
|
|
|
|
IN PDEVICE_NODE DeviceNode
|
|
|
|
);
|
2004-09-23 11:27:58 +00:00
|
|
|
|
2011-05-31 19:34:08 +00:00
|
|
|
NTSTATUS
|
|
|
|
IopStopDevice(
|
|
|
|
IN PDEVICE_NODE DeviceNode
|
|
|
|
);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
IopRemoveDevice(
|
|
|
|
IN PDEVICE_NODE DeviceNode
|
|
|
|
);
|
|
|
|
|
2006-07-07 17:18:52 +00:00
|
|
|
PVPB
|
|
|
|
NTAPI
|
|
|
|
IopCheckVpbMounted(
|
|
|
|
IN POPEN_PACKET OpenPacket,
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PUNICODE_STRING RemainingName,
|
|
|
|
OUT PNTSTATUS Status
|
|
|
|
);
|
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
NTSTATUS
|
2006-07-01 22:47:52 +00:00
|
|
|
NTAPI
|
|
|
|
IopMountVolume(
|
2006-06-29 23:52:45 +00:00
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
2006-07-02 01:29:12 +00:00
|
|
|
IN BOOLEAN AllowRawMount,
|
|
|
|
IN BOOLEAN DeviceIsLocked,
|
|
|
|
IN BOOLEAN Alertable,
|
|
|
|
OUT PVPB *Vpb
|
2006-06-29 23:52:45 +00:00
|
|
|
);
|
|
|
|
|
2007-10-19 23:21:45 +00:00
|
|
|
PVOID
|
2006-06-29 23:52:45 +00:00
|
|
|
IoOpenSymlink(
|
|
|
|
IN PVOID SymbolicLink
|
|
|
|
);
|
|
|
|
|
|
|
|
PVOID
|
|
|
|
IoOpenFileOnDevice(
|
|
|
|
IN PVOID SymbolicLink,
|
|
|
|
IN PWCHAR Name
|
|
|
|
);
|
|
|
|
|
|
|
|
NTSTATUS
|
2006-07-01 22:47:52 +00:00
|
|
|
NTAPI
|
2006-07-02 01:29:12 +00:00
|
|
|
IopCreateVpb(
|
2006-06-29 23:52:45 +00:00
|
|
|
IN PDEVICE_OBJECT DeviceObject
|
|
|
|
);
|
2004-09-23 11:27:58 +00:00
|
|
|
|
2006-07-07 17:29:12 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
2011-06-02 17:43:44 +00:00
|
|
|
IopDereferenceVpbAndFree(
|
2006-07-07 17:29:12 +00:00
|
|
|
IN PVPB Vpb
|
|
|
|
);
|
|
|
|
|
2004-09-23 11:27:58 +00:00
|
|
|
VOID
|
2006-07-01 22:47:52 +00:00
|
|
|
NTAPI
|
2006-06-29 23:52:45 +00:00
|
|
|
IoInitFileSystemImplementation(
|
|
|
|
VOID
|
|
|
|
);
|
2004-09-23 11:27:58 +00:00
|
|
|
|
|
|
|
VOID
|
2006-07-01 22:47:52 +00:00
|
|
|
NTAPI
|
2006-06-29 23:52:45 +00:00
|
|
|
IoInitVpbImplementation(
|
|
|
|
VOID
|
|
|
|
);
|
2004-09-23 11:27:58 +00:00
|
|
|
|
2006-07-01 17:40:03 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
IopReferenceDeviceObject(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject
|
|
|
|
);
|
|
|
|
|
2006-07-07 17:18:52 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
IopDereferenceDeviceObject(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN BOOLEAN ForceUnload
|
|
|
|
);
|
|
|
|
|
2009-01-04 09:35:35 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2011-06-02 17:43:44 +00:00
|
|
|
IoGetRelatedTargetDevice(
|
|
|
|
IN PFILE_OBJECT FileObject,
|
|
|
|
OUT PDEVICE_OBJECT *DeviceObject
|
|
|
|
);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
IopUnloadDevice(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject
|
2019-03-29 20:51:41 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
PDEVICE_OBJECT
|
|
|
|
NTAPI
|
|
|
|
IopGetDeviceAttachmentBase(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject
|
2009-01-04 09:35:35 +00:00
|
|
|
);
|
|
|
|
|
2006-07-04 22:28:23 +00:00
|
|
|
//
|
|
|
|
// IRP Routines
|
|
|
|
//
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
IopCleanupFailedIrp(
|
|
|
|
IN PFILE_OBJECT FileObject,
|
2006-07-29 16:56:26 +00:00
|
|
|
IN PKEVENT EventObject,
|
|
|
|
IN PVOID Buffer OPTIONAL
|
2006-07-04 22:28:23 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
IopAbortInterruptedIrp(
|
|
|
|
IN PKEVENT EventObject,
|
|
|
|
IN PIRP Irp
|
|
|
|
);
|
|
|
|
|
2013-01-27 16:11:55 +00:00
|
|
|
PIRP
|
|
|
|
NTAPI
|
|
|
|
IopAllocateIrpMustSucceed(
|
|
|
|
IN CCHAR StackSize
|
|
|
|
);
|
|
|
|
|
2018-02-24 13:50:23 +00:00
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
|
|
|
IopInitializeReserveIrp(
|
|
|
|
IN PRESERVE_IRP_ALLOCATOR ReserveIrpAllocator
|
|
|
|
);
|
|
|
|
|
|
|
|
PIRP
|
|
|
|
NTAPI
|
|
|
|
IopAllocateReserveIrp(
|
|
|
|
IN CCHAR StackSize
|
|
|
|
);
|
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
//
|
|
|
|
// Shutdown routines
|
|
|
|
//
|
2004-09-23 11:27:58 +00:00
|
|
|
VOID
|
2006-06-29 23:52:45 +00:00
|
|
|
IoInitShutdownNotification(
|
|
|
|
VOID
|
2005-06-25 17:01:17 +00:00
|
|
|
);
|
2004-09-23 11:27:58 +00:00
|
|
|
|
|
|
|
VOID
|
2006-07-01 18:26:22 +00:00
|
|
|
NTAPI
|
2010-03-08 20:47:10 +00:00
|
|
|
IoShutdownSystem(
|
|
|
|
IN ULONG Phase
|
2006-06-29 23:52:45 +00:00
|
|
|
);
|
2002-06-12 23:30:36 +00:00
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
VOID
|
2006-07-01 22:47:52 +00:00
|
|
|
NTAPI
|
2010-03-08 20:47:10 +00:00
|
|
|
IopShutdownBaseFileSystems(
|
|
|
|
IN PLIST_ENTRY ListHead
|
2006-06-29 23:52:45 +00:00
|
|
|
);
|
2005-03-05 11:27:15 +00:00
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
//
|
|
|
|
// Boot logging support
|
|
|
|
//
|
2018-12-30 11:19:11 +00:00
|
|
|
INIT_FUNCTION
|
2005-06-25 17:01:17 +00:00
|
|
|
VOID
|
2006-06-29 23:52:45 +00:00
|
|
|
IopInitBootLog(
|
|
|
|
IN BOOLEAN StartBootLog
|
|
|
|
);
|
2005-03-05 11:27:15 +00:00
|
|
|
|
2018-12-30 11:19:11 +00:00
|
|
|
INIT_FUNCTION
|
2006-06-29 23:52:45 +00:00
|
|
|
VOID
|
|
|
|
IopStartBootLog(
|
|
|
|
VOID
|
|
|
|
);
|
2003-06-20 22:43:27 +00:00
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
VOID
|
|
|
|
IopStopBootLog(
|
|
|
|
VOID
|
|
|
|
);
|
2003-06-20 22:43:27 +00:00
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
VOID
|
|
|
|
IopBootLog(
|
|
|
|
IN PUNICODE_STRING DriverName,
|
|
|
|
IN BOOLEAN Success
|
|
|
|
);
|
2003-05-13 21:28:26 +00:00
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
VOID
|
|
|
|
IopSaveBootLogToFile(
|
|
|
|
VOID
|
|
|
|
);
|
2003-05-13 21:28:26 +00:00
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
//
|
|
|
|
// I/O Cancellation Routines
|
|
|
|
//
|
|
|
|
VOID
|
2006-09-06 12:19:00 +00:00
|
|
|
NTAPI
|
2006-06-29 23:52:45 +00:00
|
|
|
IoCancelThreadIo(
|
|
|
|
IN PETHREAD Thread
|
|
|
|
);
|
2005-10-08 14:47:25 +00:00
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
VOID
|
|
|
|
IoInitCancelHandling(
|
|
|
|
VOID
|
|
|
|
);
|
2005-10-08 14:47:25 +00:00
|
|
|
|
2006-07-02 16:20:10 +00:00
|
|
|
//
|
|
|
|
// I/O Completion
|
|
|
|
//
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
IopCompleteRequest(
|
|
|
|
IN PKAPC Apc,
|
|
|
|
IN PKNORMAL_ROUTINE* NormalRoutine,
|
|
|
|
IN PVOID* NormalContext,
|
|
|
|
IN PVOID* SystemArgument1,
|
|
|
|
IN PVOID* SystemArgument2
|
|
|
|
);
|
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
//
|
|
|
|
// Error Logging Routines
|
|
|
|
//
|
2006-07-01 03:36:15 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
2006-06-29 23:52:45 +00:00
|
|
|
IopInitErrorLog(
|
|
|
|
VOID
|
|
|
|
);
|
2005-10-08 14:47:25 +00:00
|
|
|
|
2006-07-01 03:36:15 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
IopLogWorker(
|
|
|
|
IN PVOID Parameter
|
|
|
|
);
|
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
//
|
|
|
|
// Raw File System MiniDriver
|
|
|
|
//
|
|
|
|
BOOLEAN
|
|
|
|
RawFsIsRawFileSystemDeviceObject(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject
|
|
|
|
);
|
2005-10-08 14:47:25 +00:00
|
|
|
|
2018-12-30 11:19:11 +00:00
|
|
|
INIT_FUNCTION
|
2006-06-29 23:52:45 +00:00
|
|
|
NTSTATUS
|
2006-09-06 12:19:00 +00:00
|
|
|
NTAPI
|
2006-06-29 23:52:45 +00:00
|
|
|
RawFsDriverEntry(
|
|
|
|
IN PDRIVER_OBJECT DriverObject,
|
|
|
|
IN PUNICODE_STRING RegistryPath
|
|
|
|
);
|
2001-09-16 13:19:32 +00:00
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
//
|
|
|
|
// PnP Root MiniDriver
|
|
|
|
//
|
2001-09-16 13:19:32 +00:00
|
|
|
NTSTATUS
|
2006-09-06 12:19:00 +00:00
|
|
|
NTAPI
|
2001-09-16 13:19:32 +00:00
|
|
|
PnpRootDriverEntry(
|
2005-06-25 17:01:17 +00:00
|
|
|
IN PDRIVER_OBJECT DriverObject,
|
|
|
|
IN PUNICODE_STRING RegistryPath
|
|
|
|
);
|
2001-09-16 13:19:32 +00:00
|
|
|
|
|
|
|
NTSTATUS
|
2006-06-29 23:52:45 +00:00
|
|
|
PnpRootCreateDevice(
|
2007-03-22 17:13:14 +00:00
|
|
|
IN PUNICODE_STRING ServiceName,
|
2011-08-23 03:57:24 +00:00
|
|
|
IN OPTIONAL PDRIVER_OBJECT DriverObject,
|
2010-04-02 04:58:41 +00:00
|
|
|
OUT PDEVICE_OBJECT *PhysicalDeviceObject,
|
|
|
|
OUT OPTIONAL PUNICODE_STRING FullInstancePath
|
2005-06-25 17:01:17 +00:00
|
|
|
);
|
2004-03-21 18:58:53 +00:00
|
|
|
|
2012-03-21 07:15:55 +00:00
|
|
|
NTSTATUS
|
|
|
|
PnpRootRegisterDevice(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject);
|
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
//
|
|
|
|
// Driver Routines
|
|
|
|
//
|
2018-12-30 11:19:11 +00:00
|
|
|
INIT_FUNCTION
|
2005-06-25 17:01:17 +00:00
|
|
|
VOID
|
|
|
|
FASTCALL
|
2006-06-29 23:52:45 +00:00
|
|
|
IopInitializeBootDrivers(
|
|
|
|
VOID
|
|
|
|
);
|
2003-10-15 17:04:39 +00:00
|
|
|
|
2018-12-30 11:19:11 +00:00
|
|
|
INIT_FUNCTION
|
2005-06-25 17:01:17 +00:00
|
|
|
VOID
|
|
|
|
FASTCALL
|
2006-06-29 23:52:45 +00:00
|
|
|
IopInitializeSystemDrivers(
|
|
|
|
VOID
|
|
|
|
);
|
2003-10-15 17:04:39 +00:00
|
|
|
|
2007-03-09 18:14:34 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
IopCreateDriver(IN PUNICODE_STRING DriverName OPTIONAL,
|
|
|
|
IN PDRIVER_INITIALIZE InitializationFunction,
|
2018-04-03 00:14:48 +00:00
|
|
|
IN PUNICODE_STRING RegistryPath OPTIONAL,
|
2014-09-27 14:58:40 +00:00
|
|
|
IN PCUNICODE_STRING ServiceName,
|
2018-04-03 00:14:48 +00:00
|
|
|
IN PLDR_DATA_TABLE_ENTRY ModuleObject OPTIONAL,
|
2007-03-09 18:14:34 +00:00
|
|
|
OUT PDRIVER_OBJECT *pDriverObject);
|
|
|
|
|
2006-07-04 22:41:47 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
IopDeleteDriver(
|
|
|
|
IN PVOID ObjectBody
|
|
|
|
);
|
|
|
|
|
2005-06-25 17:01:17 +00:00
|
|
|
NTSTATUS
|
|
|
|
FASTCALL
|
2005-05-19 22:02:34 +00:00
|
|
|
IopGetDriverObject(
|
2006-06-29 23:52:45 +00:00
|
|
|
OUT PDRIVER_OBJECT *DriverObject,
|
|
|
|
IN PUNICODE_STRING ServiceName,
|
|
|
|
IN BOOLEAN FileSystem
|
2005-06-25 17:01:17 +00:00
|
|
|
);
|
2005-05-19 22:02:34 +00:00
|
|
|
|
2005-06-25 17:01:17 +00:00
|
|
|
NTSTATUS
|
|
|
|
FASTCALL
|
2004-03-27 19:41:32 +00:00
|
|
|
IopLoadServiceModule(
|
2005-06-25 17:01:17 +00:00
|
|
|
IN PUNICODE_STRING ServiceName,
|
2005-07-30 16:25:35 +00:00
|
|
|
OUT PLDR_DATA_TABLE_ENTRY *ModuleObject
|
2005-06-25 17:01:17 +00:00
|
|
|
);
|
2004-03-27 19:41:32 +00:00
|
|
|
|
2014-10-23 14:37:51 +00:00
|
|
|
NTSTATUS
|
2007-10-03 11:54:31 +00:00
|
|
|
NTAPI
|
|
|
|
IopLoadUnloadDriver(
|
2014-10-23 14:37:51 +00:00
|
|
|
_In_opt_ PCUNICODE_STRING RegistryPath,
|
|
|
|
_Inout_ PDRIVER_OBJECT *DriverObject
|
2007-10-03 11:54:31 +00:00
|
|
|
);
|
|
|
|
|
2007-10-19 23:21:45 +00:00
|
|
|
NTSTATUS
|
2005-06-25 17:01:17 +00:00
|
|
|
FASTCALL
|
2004-03-27 19:41:32 +00:00
|
|
|
IopInitializeDriverModule(
|
2005-06-25 17:01:17 +00:00
|
|
|
IN PDEVICE_NODE DeviceNode,
|
2005-07-30 16:25:35 +00:00
|
|
|
IN PLDR_DATA_TABLE_ENTRY ModuleObject,
|
2005-06-25 17:01:17 +00:00
|
|
|
IN PUNICODE_STRING ServiceName,
|
|
|
|
IN BOOLEAN FileSystemDriver,
|
|
|
|
OUT PDRIVER_OBJECT *DriverObject
|
|
|
|
);
|
2004-03-27 19:41:32 +00:00
|
|
|
|
2005-06-25 17:01:17 +00:00
|
|
|
NTSTATUS
|
|
|
|
FASTCALL
|
2004-03-27 19:41:32 +00:00
|
|
|
IopAttachFilterDrivers(
|
2006-06-29 23:52:45 +00:00
|
|
|
IN PDEVICE_NODE DeviceNode,
|
2017-06-15 13:33:55 +00:00
|
|
|
IN HANDLE EnumSubKey,
|
2017-06-15 18:32:14 +00:00
|
|
|
IN HANDLE ClassKey,
|
2006-06-29 23:52:45 +00:00
|
|
|
IN BOOLEAN Lower
|
2005-06-25 17:01:17 +00:00
|
|
|
);
|
2004-03-27 19:41:32 +00:00
|
|
|
|
2005-06-25 17:01:17 +00:00
|
|
|
VOID
|
2006-07-09 02:21:13 +00:00
|
|
|
NTAPI
|
2006-06-29 23:52:45 +00:00
|
|
|
IopReinitializeDrivers(
|
|
|
|
VOID
|
|
|
|
);
|
2005-02-01 16:24:10 +00:00
|
|
|
|
2006-07-02 18:34:21 +00:00
|
|
|
VOID
|
2006-07-09 02:21:13 +00:00
|
|
|
NTAPI
|
2006-07-02 18:34:21 +00:00
|
|
|
IopReinitializeBootDrivers(
|
|
|
|
VOID
|
|
|
|
);
|
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
//
|
|
|
|
// File Routines
|
|
|
|
//
|
2009-06-02 12:10:17 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
IopDeleteDevice(IN PVOID ObjectBody);
|
|
|
|
|
2005-05-09 01:38:29 +00:00
|
|
|
NTSTATUS
|
2006-06-11 22:26:54 +00:00
|
|
|
NTAPI
|
|
|
|
IopParseDevice(
|
|
|
|
IN PVOID ParseObject,
|
2006-06-11 22:32:12 +00:00
|
|
|
IN PVOID ObjectType,
|
2006-06-11 22:26:54 +00:00
|
|
|
IN OUT PACCESS_STATE AccessState,
|
|
|
|
IN KPROCESSOR_MODE AccessMode,
|
|
|
|
IN ULONG Attributes,
|
|
|
|
IN OUT PUNICODE_STRING CompleteName,
|
|
|
|
IN OUT PUNICODE_STRING RemainingName,
|
2010-08-30 11:51:17 +00:00
|
|
|
IN OUT PVOID Context,
|
2006-06-11 22:26:54 +00:00
|
|
|
IN PSECURITY_QUALITY_OF_SERVICE SecurityQos OPTIONAL,
|
|
|
|
OUT PVOID *Object
|
|
|
|
);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
IopParseFile(
|
|
|
|
IN PVOID ParseObject,
|
2006-06-11 22:32:12 +00:00
|
|
|
IN PVOID ObjectType,
|
2006-06-11 22:26:54 +00:00
|
|
|
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
|
2005-06-25 17:01:17 +00:00
|
|
|
);
|
2005-05-09 01:38:29 +00:00
|
|
|
|
|
|
|
VOID
|
2006-09-06 12:19:00 +00:00
|
|
|
NTAPI
|
2006-06-29 23:52:45 +00:00
|
|
|
IopDeleteFile(
|
|
|
|
IN PVOID ObjectBody
|
|
|
|
);
|
IO Manager Cleanup continues:
- Removed many extra files that expanded the I/O Manager too much. We usually stick with the standard of
one object/class per file, like io/device.c or io/controller.c, so it was very confusing to have some
objects split up in 5 or 6 different files, some containing only one api. Additionally, even a third
system was used, were objects were bunched up together by class. This mess was so bad that NtCreateFile,
IopCreateFile, IoCreateFile, IopDeleteFile, NtDeleteFile and NtWriteFile were in 5 different files (as an
example).
- Cleaned up some IRP code and fixed a couple of bugs, mainly:
- Write I/O Type in IRP
- Write proper IRP Flags where they shoudl be used (Will help for completing requests when i clean up that code)
- Do *NOT* zero out buffers or data that shouldn't be zeroed. Scsiport actually dependen on this incorrect
behaviour. Code should never depend on a buffer being zeroed!
- Remove a lot of duplicated code and helper/alternate functions that weren't really useful.
- Free MDL and IRP on some failures where we didn't
- Alphabetized some of the large io files for easier lookup of functions. This and the deletions have resulted
in a completely bloated diff file. I will provide a cleaned up diff on request by manually downloading the
old revision and copy/pasting the new code directly above it. The functions which we touched are:
- IoAllocateIrp
- IoBuild[A]SyncronousFsdRequest
- IoBuildDeviceIoControlRequest
- IoInitializeIrp
- IoPageRead, IoSynchronousPageWrite
svn path=/trunk/; revision=14837
2005-04-28 00:54:59 +00:00
|
|
|
|
|
|
|
NTSTATUS
|
2006-09-06 12:19:00 +00:00
|
|
|
NTAPI
|
2014-12-27 13:46:00 +00:00
|
|
|
IopGetSetSecurityObject(
|
2006-06-29 23:52:45 +00:00
|
|
|
IN PVOID ObjectBody,
|
|
|
|
IN SECURITY_OPERATION_CODE OperationCode,
|
2006-12-29 22:17:29 +00:00
|
|
|
IN PSECURITY_INFORMATION SecurityInformation,
|
2006-06-29 23:52:45 +00:00
|
|
|
IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
|
|
|
|
IN OUT PULONG BufferLength,
|
|
|
|
OUT PSECURITY_DESCRIPTOR *OldSecurityDescriptor,
|
|
|
|
IN POOL_TYPE PoolType,
|
|
|
|
IN OUT PGENERIC_MAPPING GenericMapping
|
2005-06-25 17:01:17 +00:00
|
|
|
);
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2018-10-03 09:45:08 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
IopQueryName(
|
|
|
|
IN PVOID ObjectBody,
|
|
|
|
IN BOOLEAN HasName,
|
|
|
|
OUT POBJECT_NAME_INFORMATION ObjectNameInfo,
|
|
|
|
IN ULONG Length,
|
|
|
|
OUT PULONG ReturnLength,
|
|
|
|
IN KPROCESSOR_MODE PreviousMode
|
|
|
|
);
|
|
|
|
|
IO Manager Cleanup continues:
- Removed many extra files that expanded the I/O Manager too much. We usually stick with the standard of
one object/class per file, like io/device.c or io/controller.c, so it was very confusing to have some
objects split up in 5 or 6 different files, some containing only one api. Additionally, even a third
system was used, were objects were bunched up together by class. This mess was so bad that NtCreateFile,
IopCreateFile, IoCreateFile, IopDeleteFile, NtDeleteFile and NtWriteFile were in 5 different files (as an
example).
- Cleaned up some IRP code and fixed a couple of bugs, mainly:
- Write I/O Type in IRP
- Write proper IRP Flags where they shoudl be used (Will help for completing requests when i clean up that code)
- Do *NOT* zero out buffers or data that shouldn't be zeroed. Scsiport actually dependen on this incorrect
behaviour. Code should never depend on a buffer being zeroed!
- Remove a lot of duplicated code and helper/alternate functions that weren't really useful.
- Free MDL and IRP on some failures where we didn't
- Alphabetized some of the large io files for easier lookup of functions. This and the deletions have resulted
in a completely bloated diff file. I will provide a cleaned up diff on request by manually downloading the
old revision and copy/pasting the new code directly above it. The functions which we touched are:
- IoAllocateIrp
- IoBuild[A]SyncronousFsdRequest
- IoBuildDeviceIoControlRequest
- IoInitializeIrp
- IoPageRead, IoSynchronousPageWrite
svn path=/trunk/; revision=14837
2005-04-28 00:54:59 +00:00
|
|
|
NTSTATUS
|
2006-09-06 12:19:00 +00:00
|
|
|
NTAPI
|
2018-10-03 08:15:30 +00:00
|
|
|
IopQueryNameInternal(
|
2006-06-29 23:52:45 +00:00
|
|
|
IN PVOID ObjectBody,
|
2006-05-10 17:47:44 +00:00
|
|
|
IN BOOLEAN HasName,
|
2018-10-03 09:45:08 +00:00
|
|
|
IN BOOLEAN QueryDosName,
|
2006-06-29 23:52:45 +00:00
|
|
|
OUT POBJECT_NAME_INFORMATION ObjectNameInfo,
|
|
|
|
IN ULONG Length,
|
|
|
|
OUT PULONG ReturnLength,
|
2006-06-11 06:52:56 +00:00
|
|
|
IN KPROCESSOR_MODE PreviousMode
|
2005-06-25 17:01:17 +00:00
|
|
|
);
|
2005-05-09 01:38:29 +00:00
|
|
|
|
|
|
|
VOID
|
2006-09-06 12:19:00 +00:00
|
|
|
NTAPI
|
2005-06-25 17:01:17 +00:00
|
|
|
IopCloseFile(
|
2006-05-10 17:47:44 +00:00
|
|
|
IN PEPROCESS Process OPTIONAL,
|
|
|
|
IN PVOID Object,
|
|
|
|
IN ACCESS_MASK GrantedAccess,
|
|
|
|
IN ULONG ProcessHandleCount,
|
|
|
|
IN ULONG SystemHandleCount
|
2005-06-25 17:01:17 +00:00
|
|
|
);
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2018-10-02 07:55:07 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
IopAcquireFileObjectLock(
|
|
|
|
_In_ PFILE_OBJECT FileObject,
|
|
|
|
_In_ KPROCESSOR_MODE AccessMode,
|
|
|
|
_In_ BOOLEAN Alertable,
|
|
|
|
_Out_ PBOOLEAN LockFailed
|
|
|
|
);
|
|
|
|
|
2010-11-23 20:01:04 +00:00
|
|
|
PVOID
|
|
|
|
NTAPI
|
|
|
|
IoGetFileObjectFilterContext(
|
|
|
|
IN PFILE_OBJECT FileObject
|
|
|
|
);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
IoChangeFileObjectFilterContext(
|
|
|
|
IN PFILE_OBJECT FileObject,
|
|
|
|
IN PVOID FilterContext,
|
|
|
|
IN BOOLEAN Define
|
|
|
|
);
|
|
|
|
|
2014-12-07 18:02:04 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
IopDoNameTransmogrify(
|
|
|
|
IN PIRP Irp,
|
|
|
|
IN PFILE_OBJECT FileObject,
|
|
|
|
IN PREPARSE_DATA_BUFFER DataBuffer
|
|
|
|
);
|
|
|
|
|
2017-11-12 21:26:18 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
IoComputeDesiredAccessFileObject(
|
|
|
|
IN PFILE_OBJECT FileObject,
|
|
|
|
IN PACCESS_MASK DesiredAccess
|
|
|
|
);
|
|
|
|
|
2018-10-03 08:21:39 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
IopGetFileInformation(
|
|
|
|
IN PFILE_OBJECT FileObject,
|
|
|
|
IN ULONG Length,
|
|
|
|
IN FILE_INFORMATION_CLASS FileInfoClass,
|
|
|
|
OUT PVOID Buffer,
|
|
|
|
OUT PULONG ReturnedLength
|
|
|
|
);
|
|
|
|
|
2018-10-05 08:45:21 +00:00
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
|
|
|
IopVerifyDeviceObjectOnStack(
|
|
|
|
IN PDEVICE_OBJECT BaseDeviceObject,
|
|
|
|
IN PDEVICE_OBJECT TopDeviceObjectHint
|
|
|
|
);
|
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
//
|
|
|
|
// I/O Timer Routines
|
|
|
|
//
|
2004-11-06 04:12:59 +00:00
|
|
|
VOID
|
|
|
|
FASTCALL
|
2006-06-29 23:52:45 +00:00
|
|
|
IopInitTimerImplementation(
|
|
|
|
VOID
|
|
|
|
);
|
2004-11-06 04:12:59 +00:00
|
|
|
|
|
|
|
VOID
|
2006-09-06 12:19:00 +00:00
|
|
|
NTAPI
|
2006-06-29 23:52:45 +00:00
|
|
|
IopRemoveTimerFromTimerList(
|
|
|
|
IN PIO_TIMER Timer
|
|
|
|
);
|
2004-11-19 21:31:02 +00:00
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
//
|
|
|
|
// I/O Completion Routines
|
|
|
|
//
|
2004-12-21 18:37:28 +00:00
|
|
|
VOID
|
2006-07-04 22:41:47 +00:00
|
|
|
NTAPI
|
|
|
|
IopDeleteIoCompletion(
|
|
|
|
PVOID ObjectBody
|
2006-06-29 23:52:45 +00:00
|
|
|
);
|
2004-11-19 21:31:02 +00:00
|
|
|
|
2015-05-18 19:49:15 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
IoSetIoCompletion(
|
|
|
|
IN PVOID IoCompletion,
|
|
|
|
IN PVOID KeyContext,
|
|
|
|
IN PVOID ApcContext,
|
|
|
|
IN NTSTATUS IoStatus,
|
|
|
|
IN ULONG_PTR IoStatusInformation,
|
2020-06-19 20:55:40 +00:00
|
|
|
IN BOOLEAN Quota
|
2015-05-18 19:49:15 +00:00
|
|
|
);
|
|
|
|
|
2008-06-30 02:15:48 +00:00
|
|
|
//
|
|
|
|
// Ramdisk Routines
|
|
|
|
//
|
2018-12-30 11:19:11 +00:00
|
|
|
INIT_FUNCTION
|
2008-06-30 02:15:48 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
IopStartRamdisk(
|
|
|
|
IN PLOADER_PARAMETER_BLOCK LoaderBlock
|
|
|
|
);
|
|
|
|
|
[NTOSKRNL]
Implemented IopFetchConfigurationInformation(), IopCreateArcNamesCd(), IopCreateArcNamesDisk(), IopVerifyDiskSignature()
Removed IopApplyRosCdromArcHack(), IopGetDiskInformation(), IopAssignArcNamesToCdrom()
Finally, rewritten IopCreateArcNames()
To make it short, this is the rewrite of ARC names handling in the kernel.
This brings our kernel to a higher state of existence. Indeed, it's leaving NT4 design for a proper NT5.2 design, with less hacks, less ROS specific stuff and such.
This code handles the mount manager we don't have yet.
svn path=/trunk/; revision=49131
2010-10-12 20:29:50 +00:00
|
|
|
//
|
2010-10-07 20:08:24 +00:00
|
|
|
// Configuration Routines
|
|
|
|
//
|
[NTOSKRNL]
Implemented IopFetchConfigurationInformation(), IopCreateArcNamesCd(), IopCreateArcNamesDisk(), IopVerifyDiskSignature()
Removed IopApplyRosCdromArcHack(), IopGetDiskInformation(), IopAssignArcNamesToCdrom()
Finally, rewritten IopCreateArcNames()
To make it short, this is the rewrite of ARC names handling in the kernel.
This brings our kernel to a higher state of existence. Indeed, it's leaving NT4 design for a proper NT5.2 design, with less hacks, less ROS specific stuff and such.
This code handles the mount manager we don't have yet.
svn path=/trunk/; revision=49131
2010-10-12 20:29:50 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
IopFetchConfigurationInformation(OUT PWSTR * SymbolicLinkList,
|
|
|
|
IN GUID Guid,
|
|
|
|
IN ULONG ExpectedInterfaces,
|
|
|
|
IN PULONG Interfaces
|
|
|
|
);
|
|
|
|
|
2010-10-07 20:08:24 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
IopStoreSystemPartitionInformation(IN PUNICODE_STRING NtSystemPartitionDeviceName,
|
|
|
|
IN PUNICODE_STRING OsLoaderPathName
|
|
|
|
);
|
|
|
|
|
2020-03-01 22:29:23 +00:00
|
|
|
//
|
|
|
|
// Device action
|
|
|
|
//
|
|
|
|
VOID
|
2020-06-24 01:49:18 +00:00
|
|
|
PiQueueDeviceAction(
|
|
|
|
_In_ PDEVICE_OBJECT DeviceObject,
|
|
|
|
_In_ DEVICE_ACTION Action,
|
|
|
|
_In_opt_ PKEVENT CompletionEvent,
|
|
|
|
_Out_opt_ NTSTATUS *CompletionStatus);
|
2020-03-01 22:29:23 +00:00
|
|
|
|
2020-06-24 16:34:44 +00:00
|
|
|
NTSTATUS
|
|
|
|
PiPerformSyncDeviceAction(
|
|
|
|
_In_ PDEVICE_OBJECT DeviceObject,
|
|
|
|
_In_ DEVICE_ACTION Action);
|
|
|
|
|
2006-06-29 23:52:45 +00:00
|
|
|
//
|
|
|
|
// Global I/O Data
|
|
|
|
//
|
|
|
|
extern POBJECT_TYPE IoCompletionType;
|
|
|
|
extern PDEVICE_NODE IopRootDeviceNode;
|
2010-04-11 21:25:50 +00:00
|
|
|
extern KSPIN_LOCK IopDeviceTreeLock;
|
2006-06-29 23:52:45 +00:00
|
|
|
extern ULONG IopTraceLevel;
|
2008-11-04 21:55:55 +00:00
|
|
|
extern GENERAL_LOOKASIDE IopMdlLookasideList;
|
2006-07-04 22:41:47 +00:00
|
|
|
extern GENERIC_MAPPING IopCompletionMapping;
|
2006-07-05 20:08:08 +00:00
|
|
|
extern GENERIC_MAPPING IopFileMapping;
|
2006-09-07 22:38:06 +00:00
|
|
|
extern POBJECT_TYPE _IoFileObjectType;
|
|
|
|
extern HAL_DISPATCH _HalDispatchTable;
|
2007-02-19 18:52:23 +00:00
|
|
|
extern LIST_ENTRY IopErrorLogListHead;
|
2009-10-31 01:02:35 +00:00
|
|
|
extern ULONG IopNumTriageDumpDataBlocks;
|
|
|
|
extern PVOID IopTriageDumpDataBlocks[64];
|
2010-04-11 21:25:50 +00:00
|
|
|
extern PIO_BUS_TYPE_GUID_LIST PnpBusTypeGuidList;
|
|
|
|
extern PDRIVER_OBJECT IopRootDriverObject;
|
2017-12-17 21:53:01 +00:00
|
|
|
extern KSPIN_LOCK IopDeviceActionLock;
|
|
|
|
extern LIST_ENTRY IopDeviceActionRequestList;
|
2018-02-24 13:50:23 +00:00
|
|
|
extern RESERVE_IRP_ALLOCATOR IopReserveIrpAllocator;
|
2019-10-21 12:16:58 +00:00
|
|
|
extern BOOLEAN IoRemoteBootClient;
|
2006-07-02 16:20:10 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Inlined Functions
|
|
|
|
//
|
|
|
|
#include "io_x.h"
|