Hello,
now I can build driver.
I try using STATUS_NOT_SUPPORTED as default behavior for
CipeTapDeviceHook using following code:
default:
{
DbgPrint ("[%s] [CIPE] release [%d.%d] CipeTapDeviceHook:
unknown request 0x%x\n", l_Adapter->m_Name, CIPE_DRIVER_MAJOR_VERSION,
CIPE_DRIVER_MINOR_VERSION, l_IrpSp->MajorFunction);
p_IRP->IoStatus.Status = STATUS_NOT_SUPPORTED;
p_IRP->IoStatus.Information = 0;
l_Status = STATUS_NOT_SUPPORTED;
IoCompleteRequest (p_IRP, IO_NO_INCREMENT);
break;
}
but verifier report me the same error 231. Is anyone there, who know what
and how return for fix this error.
Second thing is that driver verifier report following warning:
*******************************************************************************
*
*
* The Driver Verifier has detected the driver at address EB4BD502
* is calling MmMapLockedPages instead of MmMapLockedPagesSpecifyCache.
* This can cause the system to needlessly bugcheck whenever system
* resources are low. This driver needs to be fixed.
*
*
*******************************************************************************
I look into source and DDK headers and see this macro:
#define MmGetSystemAddressForMdl(MDL) \
(((MDL)->MdlFlags & (MDL_MAPPED_TO_SYSTEM_VA | \
MDL_SOURCE_IS_NONPAGED_POOL)) ? \
((MDL)->MappedSystemVa) : \
(MmMapLockedPages((MDL),KernelMode)))
I think, that there is new macro
#define MmGetSystemAddressForMdlSafe(MDL, PRIORITY) \
(((MDL)->MdlFlags & (MDL_MAPPED_TO_SYSTEM_VA | \
MDL_SOURCE_IS_NONPAGED_POOL)) ? \
((MDL)->MappedSystemVa) : \
(MmMapLockedPagesSpecifyCache((MDL), \
KernelMode, \
MmCached, \
NULL, \
FALSE, \
(PRIORITY))))
which may be used instead previous. I don't know if it's in nt 4.0 DDK.
I try replace MmGetSystemAddressForMdl(xx) with
MmGetSystemAddressForMdlSafe(xx, LowPagePriority) and now warning is not
reported.
Vladimir
> On Wed, 20 Nov 2002, Damion Wilson wrote:
>
>
> I build using NT4.0 DDK which doesn't even have IRP_MJ_POWER defined. I can
>
> change the code so that the default behaviour is
>
> though, but I'll have to see what other side effects there are.
>
> I think that STATUS_NOT_SUPPORTED is good way. Side effects must be fixed
> otherwise.
> The question is, what to do if returning STATUS_NOT_SUPPORTED.
> Complete Request or not or how?
>
> May you try build debug version with this?
>
> I try compile CIPE, but without success. I have W2k DDK with VC 5.0.
>
> > I didn't even know about the driver verifier...
>
> It is since W2k.
>
> I discover it today.
>
> > DKW
> >
> > On Wednesday 20 November 2002 06:28 am, Vladimir Michl wrote:
> > > W2k and later versions have driver verifier (run verifier.exe from
> > > WINNT\system32\).
> > >
> > > The page about verifier is:
> > >
>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ddtools/hh
> > >/ddtools/dv_962b.asp
> > >
> > > I try verification on cipdrvr and this is result.
> > >
> > > IO verification level 2:
> > > - BSOD with IO System Verification Error (WDM DRIVER ERROR 231)
> > > cipdrvr.sys+1c43 at EB4B9C43
> > > Meaning of code 231 may be read from
> > >
>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ddtools/hh
> > >/ddtools/bccodes_5pyf.asp and is "The caller has completed a successful
> > > IRP_MJ_POWER instead of passing it down. (IRP specified.)".
> > >
> > > I look to cipdrvr.c and see in CipeTapDeviceHook:
> > >
> > > NTSTATUS l_Status = STATUS_SUCCESS;
> > > ...
> > >
> > > switch (l_IrpSp->MajorFunction) {
> > > ...
> > >
> > > default:
> > > IoCompleteRequest (p_IRP, IO_NO_INCREMENT);
> > > break;
> > > }
> > > }
> > > return l_Status;
> > > }
> > >
> > > It mean, that any unknown MajorFunction is reported as SUCCESS and this
> > > generate previous error. I think that result for default must be
> > > STATUS_NOT_SUPPORTED.
> > > Good may be DbgView for all default responses.
> > >
> > > Vladimir
---------------------------------------------------------------------------
Vladimír Michl <Vladimir.Michl,AT,hlubocky,DOT,del,DOT,cz>
Del a.s., Strojírenská 38, Žďár nad Sázavou
pobočka Olomoucká 355, Hlubočky-Mariánské Údolí
tel: +420 585 353 548, fax: +420 585 352 364
http://hlubocky.del.cz