Re: Problem with getting nonpaged system-space virtual address
From: Maxim S. Shatskih (maxim_at_storagecraft.com)
Date: 06/14/04
- Next message: Maxim S. Shatskih: "Re: Unidirectional NDIS adapters"
- Previous message: NagarajuS: "Re: Implementing Multi-Interface USB Device Driver"
- In reply to: Peter: "Re: Problem with getting nonpaged system-space virtual address"
- Next in thread: Gary G. Little: "Re: Problem with getting nonpaged system-space virtual address"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 14 Jun 2004 10:38:05 +0400
Lack of usable system address space to map the MDL.
-- Maxim Shatskih, Windows DDK MVP StorageCraft Corporation maxim@storagecraft.com http://www.storagecraft.com "Peter" <pskvarka@softinengines.com> wrote in message news:OoQJo5cUEHA.1656@TK2MSFTNGP09.phx.gbl... > It is unrepaetable error, mostly all is OK only sometimes error express. > If your first idea is true : " Usually out of system PTEs... " > (Page table entries ?) > does it mean lack of usable physical memory ? > > Peter > > > "Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message > news:OOtCJ8UUEHA.556@tk2msftngp13.phx.gbl... > > Usually out of system PTEs, but note - for zero-length transfer, > > Irp->MdlAddress can be NULL. Check for this case. > > > > -- > > Maxim Shatskih, Windows DDK MVP > > StorageCraft Corporation > > maxim@storagecraft.com > > http://www.storagecraft.com > > > > > > "Peter" <pskvarka@softinengines.com> wrote in message > > news:edmnQEUUEHA.2540@TK2MSFTNGP10.phx.gbl... > > > My driver I/O is set to DIRECT_IO. > > > > > > I call from user mode: > > > included in user-mode app and also in driver sources: > > > #define IOCTL_READ_DATA CTL_CODE(FILE_DEVICE_NETWORK, 0x801, > > > METHOD_OUT_DIRECT, FILE_READ_DATA) > > > .... > > > //global: > > > PUCHAR g_data = NULL; > > > > > > ... > > > > > > > > > g_data = malloc(1024); > > > ... > > > DeviceIoControl( > > > drvHandle, > > > IOCTL_READ_DATA, > > > NULL, > > > 0, > > > g_data, > > > 1024, > > > &bytesRet, > > > NULL > > > ); > > > > > > first call in driver function which processes this ioctl: > > > > > > outBuff = MmGetSystemAddressForMdlSafe(pIrp->MdlAddress, > HighPagePriority); > > > > > > Mostly is all functional. > > > Problem is that sometimes MmGetSystemAddressForMdlSafe() returns NULL. > > > I am sure that buffer in user mode is always allocated. > > > > > > What can be reason ? > > > > > > I see in DDK doc: > > > "Even drivers that request direct I/O use buffered I/O to satisfy > certain > > > IRPs. In particular, drivers typically use buffered I/O for some I/O > control > > > codes for IRP_MJ_DEVICE_CONTROL requests that require data transfers, > > > whether or not the driver uses direct I/O for read and write > operations." > > > > > > Can be my problem relating to this ? > > > > > > Peter > > > > > > > > > > > > > > >
- Next message: Maxim S. Shatskih: "Re: Unidirectional NDIS adapters"
- Previous message: NagarajuS: "Re: Implementing Multi-Interface USB Device Driver"
- In reply to: Peter: "Re: Problem with getting nonpaged system-space virtual address"
- Next in thread: Gary G. Little: "Re: Problem with getting nonpaged system-space virtual address"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
Loading