They're pagable in NT6, I don't know whether that's the case in NT5.
Change looks good to me, I'm not really sure why Alex used NNP?
Perhaps our kernel does/did things slightly differently back when he wrote the Null
driver?
Ged.
-----Original Message-----
From: Ros-dev <ros-dev-bounces(a)reactos.org> On Behalf Of Thomas Faber
Sent: Monday, 23 April 2018 07:49
To: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
Cc: ros-dev(a)reactos.org
Subject: Re: [ros-dev] [ros-diffs] 01/01: [NULL] Additions for the Null driver.
On 2018-04-22 22:23, Hermès Bélusca-Maïto wrote:
diff --git a/drivers/base/null/null.c
b/drivers/base/null/null.c index
610e886ddd..0d4ed541de 100644
--- a/drivers/base/null/null.c
+++ b/drivers/base/null/null.c
@@ -181,26 +199,16 @@ DriverEntry(IN PDRIVER_OBJECT DriverObject,
DriverObject->MajorFunction[IRP_MJ_READ] = NullDispatch;
DriverObject->MajorFunction[IRP_MJ_LOCK_CONTROL] = NullDispatch;
DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] =
NullDispatch;
+ DriverObject->DriverUnload = NullUnload;
- /* Allocate the fast I/O dispatch table */
- FastIoDispatch = ExAllocatePoolWithTag(NonPagedPool,
- sizeof(FAST_IO_DISPATCH),
- 'llun');
- if (!FastIoDispatch)
- {
- /* Failed, cleanup */
- IoDeleteDevice(DeviceObject);
- return STATUS_INSUFFICIENT_RESOURCES;
- }
-
- /* Initialize it */
- RtlZeroMemory(FastIoDispatch, sizeof(FAST_IO_DISPATCH));
- FastIoDispatch->SizeOfFastIoDispatch = sizeof(FAST_IO_DISPATCH);
+ /* Initialize the fast I/O dispatch table */
+ RtlZeroMemory(&FastIoDispatch, sizeof(FastIoDispatch));
+ FastIoDispatch.SizeOfFastIoDispatch = sizeof(FastIoDispatch);
/* Setup our pointers */
- FastIoDispatch->FastIoRead = NullRead;
- FastIoDispatch->FastIoWrite = NullWrite;
- DriverObject->FastIoDispatch = FastIoDispatch;
+ FastIoDispatch.FastIoRead = NullRead;
+ FastIoDispatch.FastIoWrite = NullWrite;
+ DriverObject->FastIoDispatch = &FastIoDispatch;
Are you sure FAST_IO_DISPATCH is allowed to be pageable? It seems to only be used at low
IRQLs, so it seems logical. However I see it allocated nonpaged everywhere else and
can't seem to find definitive documentation on the subject.
(And yes, most filesystem drivers use a static structure, but those
drivers don't use MmPageEntireDriver)
Thanks,
Thomas
_______________________________________________
Ros-dev mailing list
Ros-dev(a)reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev