Prev: IRP_MJ_CREATE not called. Please help me
Next: Microsoft PS printer driver rendering plug-in questions
From: v_mirgorodsky on 19 Oct 2009 11:55 Hello all, I have a Windows 2003 Server with 4GB of RAM installed. I have a PCI board capable of 32 bit transfers only. Whenever I try to allocate the DMA adapter object using the following statement sequence - it fails. DEVICE_DESCRIPTION dd = { 0 }; dd.Version = DEVICE_DESCRIPTION_VERSION; dd.InterfaceType = BusType; dd.MaximumLength = 16 * 1024 * 1024; dd.Dma32BitAddresses = TRUE; dd.Master = TRUE; dd.ScatterGather = TRUE; pdc->DmaAdapter = IoGetDmaAdapter(pdc->PhysicalDeviceObject, &dd, &pdc- >DmaMapRegisters); IoGetDmaAdapter() returns NULL as a result. Is there any reason for such a weird behavior? With best regards, Vladimir Mirgorodsky
From: Alexander Grigoriev on 19 Oct 2009 22:18 With 4GB of RAM, part of it is remapped above 4GB, to provide a window for the PCI devices. You request that the maximum transfer size is 16MB, while the HAL has to use bounce buffers to make sure they are below 4GB. Such large bounce buffers cannot be provided. "v_mirgorodsky" <v.mirgorodsky(a)gmail.com> wrote in message news:eccd0646-828c-4067-a01d-a3df4071b23b(a)m20g2000vbp.googlegroups.com... > Hello all, > > I have a Windows 2003 Server with 4GB of RAM installed. I have a PCI > board capable of 32 bit transfers only. Whenever I try to allocate the > DMA adapter object using the following statement sequence - it fails. > > DEVICE_DESCRIPTION dd = { 0 }; > dd.Version = DEVICE_DESCRIPTION_VERSION; > dd.InterfaceType = BusType; > dd.MaximumLength = 16 * 1024 * 1024; > dd.Dma32BitAddresses = TRUE; > dd.Master = TRUE; > dd.ScatterGather = TRUE; > pdc->DmaAdapter = IoGetDmaAdapter(pdc->PhysicalDeviceObject, &dd, &pdc- >>DmaMapRegisters); > > IoGetDmaAdapter() returns NULL as a result. Is there any reason for > such a weird behavior? > > With best regards, > Vladimir Mirgorodsky
From: Tim Roberts on 20 Oct 2009 00:19 v_mirgorodsky <v.mirgorodsky(a)gmail.com> wrote: > >I have a Windows 2003 Server with 4GB of RAM installed. I have a PCI >board capable of 32 bit transfers only. Whenever I try to allocate the >DMA adapter object using the following statement sequence - it fails. > >DEVICE_DESCRIPTION dd = { 0 }; >dd.Version = DEVICE_DESCRIPTION_VERSION; >dd.InterfaceType = BusType; >dd.MaximumLength = 16 * 1024 * 1024; >dd.Dma32BitAddresses = TRUE; >dd.Master = TRUE; >dd.ScatterGather = TRUE; >pdc->DmaAdapter = IoGetDmaAdapter(pdc->PhysicalDeviceObject, &dd, &pdc- >>DmaMapRegisters); > >IoGetDmaAdapter() returns NULL as a result. Is there any reason for >such a weird behavior? What did you pass in pdc->DmaMapRegisters? -- Tim Roberts, timr(a)probo.com Providenza & Boekelheide, Inc.
From: v_mirgorodsky on 20 Oct 2009 06:22 Hello Tim, According to MSDN DmaMapRegisters is purelly output parameter, so I don't initialize it to any praticular value before call. Since I initialize all my driver control structa\ure with zeros - it happen to be zero during call entrance. > v_mirgorodsky <v.mirgorodsky(a)gmail.com> wrote: > > > >I have a Windows 2003 Server with 4GB of RAM installed. I have a PCI > >board capable of 32 bit transfers only. Whenever I try to allocate the > >DMA adapter object using the following statement sequence - it fails. > > > >DEVICE_DESCRIPTION dd = { 0 }; > >dd.Version = DEVICE_DESCRIPTION_VERSION; > >dd.InterfaceType = BusType; > >dd.MaximumLength = 16 * 1024 * 1024; > >dd.Dma32BitAddresses = TRUE; > >dd.Master = TRUE; > >dd.ScatterGather = TRUE; > >pdc->DmaAdapter = IoGetDmaAdapter(pdc->PhysicalDeviceObject, &dd, &pdc- > >>DmaMapRegisters); > > > >IoGetDmaAdapter() returns NULL as a result. Is there any reason for > >such a weird behavior? > > What did you pass in pdc->DmaMapRegisters? > -- > Tim Roberts, timr(a)probo.com > Providenza & Boekelheide, Inc.
From: v_mirgorodsky on 20 Oct 2009 06:28 Hello Alexander, It happens to be the most probable scenario. I'll try to reduce split the transfer into several smaller ones. Alexander Grigoriev: > With 4GB of RAM, part of it is remapped above 4GB, to provide a window for > the PCI devices. > > You request that the maximum transfer size is 16MB, while the HAL has to use > bounce buffers to make sure they are below 4GB. Such large bounce buffers > cannot be provided. > > "v_mirgorodsky" <v.mirgorodsky(a)gmail.com> wrote in message > news:eccd0646-828c-4067-a01d-a3df4071b23b(a)m20g2000vbp.googlegroups.com... > > Hello all, > > > > I have a Windows 2003 Server with 4GB of RAM installed. I have a PCI > > board capable of 32 bit transfers only. Whenever I try to allocate the > > DMA adapter object using the following statement sequence - it fails. > > > > DEVICE_DESCRIPTION dd = { 0 }; > > dd.Version = DEVICE_DESCRIPTION_VERSION; > > dd.InterfaceType = BusType; > > dd.MaximumLength = 16 * 1024 * 1024; > > dd.Dma32BitAddresses = TRUE; > > dd.Master = TRUE; > > dd.ScatterGather = TRUE; > > pdc->DmaAdapter = IoGetDmaAdapter(pdc->PhysicalDeviceObject, &dd, &pdc- > >>DmaMapRegisters); > > > > IoGetDmaAdapter() returns NULL as a result. Is there any reason for > > such a weird behavior? > > > > With best regards, > > Vladimir Mirgorodsky
|
Pages: 1 Prev: IRP_MJ_CREATE not called. Please help me Next: Microsoft PS printer driver rendering plug-in questions |