Hope someone can shed lights on this -
-
I’ve a class lower filter driver in the storage stack. So it sits right
below disk.sys. -
The driver being a boot Volumn filter can not return anything but
STATUS_SUCCESS
Now if certain condition(s) occur(s), the filter should be a (1)transperant
filter at best or (2) better yet no dispatch entries ever gets executed.
As of now the implementation takes the option (2) above, when those
conditions are early enough that no FiDo is created and Attached to the
existing
stack.
So in case of those early enough conditions, it still does leave the
AddDevice pointer to the driver’s AddDevice routine. Setting this back to
NULL,
(BTW; that is what we get from the system when it invokes DriverEntry point)
seems to bugcheck ( need to verify couple more time ).
Now with the AddDevice being pointed to the driver’s AddDevice routine, it
never gets called ( actually that is what we want ). And the Driver shows
up in windbg lm. So the driver is loaded successfully, but has no FiDo, and
not attached to the stack.
DeviceTree confirms that it is not attached to the storage stack ( while in
case of normal scenario, it shows up in the stack, and it is fine)
So the questions are -
a) What is/are the percondition(s) for AddDevice tobe called? (RK: It
is good that it is not being called, but just to know …). Meaning does the
system checks to see if DO is created or not?
b) If the following BugCheck is relevant to this design (Rk: Under debugger,
only sometime I get this and trying to understand if there is deep
rooted latent bug that we have in the driver that is causing this )
0: kd> !analyze -v
****************************************************************************
***
*
*
* Bugcheck Analysis
*
*
*
****************************************************************************
***
INACCESSIBLE_BOOT_DEVICE (7b)
During the initialization of the I/O system, it is possible that the driver
for the boot device failed to initialize the device that the system is
attempting to boot from, or it is possible for the file system that is
supposed to read that device to either fail its initialization or to simply
not recognize the data on the boot device as a file system structure that
it recognizes. In the former case, the argument (#1) is the address of a
Unicode string data structure that is the ARC name of the device from which
the boot was being attempted. In the latter case, the argument (#1) is the
address of the device object that could not be mounted.
If this is the initial setup of the system, then this error can occur if
the system was installed on an unsupported disk or SCSI controller. Note
that some controllers are supported only by drivers which are in the Windows
Driver Library (WDL) which requires the user to do a custom install. See
the Windows Driver Library for more information.
This error can also be caused by the installation of a new SCSI adapter or
disk controller or repartitioning the disk with the system partition. If
this is the case, on x86 systems the boot.ini file must be edited or on ARC
systems setup must be run. See the "Advanced Server System Administrator’s
User Guide" for information on changing boot.ini.
If the argument is a pointer to an ARC name string, then the format of the
first two (and in this case only) longwords will be:
USHORT Length;
USHORT MaximumLength;
PWSTR Buffer;
That is, the first longword will contain something like 00800020 where 20
is the actual length of the Unicode string, and the next longword will
contain the address of buffer. This address will be in system space, so
the high order bit will be set.
If the argument is a pointer to a device object, then the format of the
first
word will be:
USHORT Type;
That is, the first word will contain a 0003, where the Type code will ALWAYS
be 0003.
Note that this makes it immediately obvious whether the argument is a
pointer
to an ARC name string or a device object, since a Unicode string can never
have an odd number of bytes, and a device object will always have a Type
code of 3.
Arguments:
Arg1: fffff880009a9928, Pointer to the device object or Unicode string of
ARC name <— It is the arc name
Arg2: ffffffffc0000034
Arg3: 0000000000000000
Arg4: 0000000000000000
Debugging Details:
DEFAULT_BUCKET_ID: VISTA_DRIVER_FAULT
BUGCHECK_STR: 0x7B
PROCESS_NAME: System
CURRENT_IRQL: 2
LAST_CONTROL_TRANSFER: from fffff80002dc06d2 to fffff80002cc2f60
STACK_TEXT:
fffff880009a9178 fffff800
02dc06d2 : fffff880009a9928 fffffa80
03b83310
0000000000000065 fffff800
02d09314 : nt!DbgBreakPointWithStatus
fffff880009a9180 fffff800
02dc14be : 0000000000000003 00000000
00000000
fffff80002d05ee0 00000000
0000007b : nt!KiBugCheckDebugBreak+0x12
fffff880009a91e0 fffff800
02ccb004 : 0000000000000003 fffff800
02cc66f0
0000000000000010 00000000
00000086 : nt!KeBugCheck2+0x71e
fffff880009a98b0 fffff800
02ddf0d6 : 000000000000007b fffff880
009a9928
ffffffffc0000034 00000000
00000000 : nt!KeBugCheckEx+0x104
fffff880009a98f0 fffff800
031f8034 : 0000000000000001 ffffffff
80000308
0000000000000047 fffff8a0
00379480 : nt!PnpBootDeviceWait+0x136
fffff880009a9970 fffff800
031f8921 : fffff8a000091c00 fffff800
00812d20
0000000000000003 ffffffff
8000016c : nt!IopInitializeBootDrivers+0x624
fffff880009a9a40 fffff800
031fbb20 : 0000000000000000 00000000
00000010
ffffffff80000028 fffff800
00812d20 : nt!IoInitSystem+0x801
fffff880009a9b40 fffff800
0314c419 : 000409af00040768 fffffa80
03b83310
0000000000000080 fffffa80
03b83890 : nt!Phase1InitializationDiscard+0x1290
fffff880009a9d10 fffff800
02f6e166 : 00040b1800040aa4 00000000
00000080
000144a400040b40 fffff800
02ca9479 : nt!Phase1Initialization+0x9
fffff880009a9d40 fffff800
02ca9486 : fffff80002e43e80 fffffa80
03b83310
fffff80002e51c40 000144bc
0004109f : nt!PspSystemThreadStartup+0x5a
fffff880009a9d80 00000000
00000000 : fffff880009aa000 fffff880
009a4000
fffff880009a9260 00000000
00000000 : nt!KxStartSystemThread+0x16