Re: Problem with getting nonpaged system-space virtual address

From: Maxim S. Shatskih (maxim_at_storagecraft.com)
Date: 06/14/04


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
> > >
> > >
> > >
> >
> >
>
>


Relevant Pages

  • Re: Access GPIO on W83627
    ... >> Maxim Shatskih, Windows DDK MVP ... >> StorageCraft Corporation ... The driver ...
    (microsoft.public.development.device.drivers)
  • Re: getting the driver names from a device stack
    ... then take the PDO pointer (provided to ... Use ObQueryNameString on driver objects. ... >> Maxim Shatskih, Windows DDK MVP ...
    (microsoft.public.development.device.drivers)
  • Re: Audio Wave driver installation
    ... Maxim Shatskih, Windows DDK MVP ... Because the wave driver code logs all the messages that it process ... I would like to know how to install the audio driver in the ...
    (microsoft.public.development.device.drivers)
  • Re: HCT Tests Submission
    ... Avoid any use of INF files and write the driver to UpperFilters directly. ... both for disk and CD-ROM filters. ... >> Maxim Shatskih, Windows DDK MVP ...
    (microsoft.public.windowsxp.device_driver.dev)
  • Re: HCT Tests Submission
    ... Avoid any use of INF files and write the driver to UpperFilters directly. ... both for disk and CD-ROM filters. ... >> Maxim Shatskih, Windows DDK MVP ...
    (microsoft.public.development.device.drivers)

Loading