For the time being no scatter/gather is supported by my bus master
device. So i am going to
implement the common buffer scheme.
The question is this: In case of a very large buffer allocation (16MB)
do i have to declare the
numberofmapregisters (16MB/PAGE_SIZE) when calling IoGetDmaAdapter ?
The reason i am asking this is because the AllocateCommonBuffer will
hold a set of map registers.
Thanks.
Nikolas Stylianides wrote:
For the time being no scatter/gather is supported by my bus master
device. So i am going to
implement the common buffer scheme.
The question is this: In case of a very large buffer allocation (16MB)
do i have to declare the
numberofmapregisters (16MB/PAGE_SIZE) when calling IoGetDmaAdapter ?
The reason i am asking this is because the AllocateCommonBuffer will
hold a set of map registers.
I never find myself worrying about map registers when using
AllocateCommonBuffer to allocate buffers. As I understand it,
common buffers are exactly that, without the need for mapping.
(Of course, you will find that getting a 16MB common buffers
is pretty darn unlikely. That is true in any general purpose O/S.)
–
Steve Williams “The woods are lovely, dark and deep.
steve at icarus.com But I have promises to keep,
http://www.icarus.com and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep.”
Stephen Williams wrote:
Nikolas Stylianides wrote:
> For the time being no scatter/gather is supported by my bus master
> device. So i am going to
> implement the common buffer scheme.
>
> The question is this: In case of a very large buffer allocation
> (16MB) do i have to declare the
> numberofmapregisters (16MB/PAGE_SIZE) when calling IoGetDmaAdapter ?
>
> The reason i am asking this is because the AllocateCommonBuffer will
> hold a set of map registers.
I never find myself worrying about map registers when using
AllocateCommonBuffer to allocate buffers. As I understand it,
common buffers are exactly that, without the need for mapping.
(Of course, you will find that getting a 16MB common buffers
is pretty darn unlikely. That is true in any general purpose O/S.)
Thank you for your answer.
I know that it will propably fail but my routine will downgrade (32M,
16M, 8M, 4M …) the size of buffer until i get a valid virtual address.
It will be much faster than my current configuration (Single IO reads).
Nikolas Stylianides wrote:
For the time being no scatter/gather is supported by my bus master
device. So i am going to
implement the common buffer scheme.
The question is this: In case of a very large buffer allocation (16MB)
do i have to declare the
numberofmapregisters (16MB/PAGE_SIZE) when calling IoGetDmaAdapter ?
The reason i am asking this is because the AllocateCommonBuffer will
hold a set of map registers.
Thanks.
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@4plus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Hello there. I am calling IoGetDmaAdapter and BSOD appears with code
0x000000ca
my code is this:
RtlZeroMemory(&devdesc,sizeof(_DEVICE_DESCRIPTION));
devdesc.Version = DEVICE_DESCRIPTION_VERSION;
devdesc.Master = TRUE;
devdesc.Dma32BitAddresses = TRUE;
devdesc.InterfaceType = PCIBus;
devdesc.MaximumLength = 32*PAGE_SIZE*PAGE_SIZE;
pDevExt->_pDmaAdapter = NULL;
pDevExt->_pVirtualAddress = NULL;
ulMapRegisters = 1;
g_Resources._PhysicalAddress.LowPart =
g_Resources._PhysicalAddress.HighPart = 0;
pDevExt->_pDmaAdapter =
IoGetDmaAdapter(pDevExt->pDevice,&devdesc,&ulMapRegisters);
Any clues?
Use the windbg bugcheck reference. Also, when posting crash information
include all of the crash information, not just the bugcheck code. Most
importantly, include the output from windbg’s ‘analyze -v’ command.
This bugcheck indicates that you did not supply the physical device object
as required in the first parameter. My guess is that pDevice is not the PDO
but is some other device object (your FDO?)
=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
Nikolas Stylianides
Sent: Thursday, July 21, 2005 5:11 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Common Buffer + numberofmapregisters
Nikolas Stylianides wrote:
> For the time being no scatter/gather is supported by my bus master
> device. So i am going to implement the common buffer scheme.
>
> The question is this: In case of a very large buffer
allocation (16MB)
> do i have to declare the numberofmapregisters (16MB/PAGE_SIZE) when
> calling IoGetDmaAdapter ?
>
> The reason i am asking this is because the
AllocateCommonBuffer will
> hold a set of map registers.
>
> Thanks.
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@4plus.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
Hello there. I am calling IoGetDmaAdapter and BSOD appears
with code 0x000000ca
my code is this:
RtlZeroMemory(&devdesc,sizeof(_DEVICE_DESCRIPTION));
devdesc.Version = DEVICE_DESCRIPTION_VERSION;
devdesc.Master = TRUE;
devdesc.Dma32BitAddresses = TRUE;
devdesc.InterfaceType = PCIBus;
devdesc.MaximumLength = 32*PAGE_SIZE*PAGE_SIZE;
pDevExt->_pDmaAdapter = NULL;
pDevExt->_pVirtualAddress = NULL;
ulMapRegisters = 1;
g_Resources._PhysicalAddress.LowPart =
g_Resources._PhysicalAddress.HighPart = 0;
pDevExt->_pDmaAdapter =
IoGetDmaAdapter(pDevExt->pDevice,&devdesc,&ulMapRegisters);
Any clues?
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as:
xxxxx@hollistech.com To unsubscribe send a blank email to
xxxxx@lists.osr.com
Mark Roddy wrote:
Use the windbg bugcheck reference. Also, when posting crash information
include all of the crash information, not just the bugcheck code. Most
importantly, include the output from windbg’s ‘analyze -v’ command.
This bugcheck indicates that you did not supply the physical device object
as required in the first parameter. My guess is that pDevice is not the PDO
but is some other device object (your FDO?)
=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
>-----Original Message-----
>From: xxxxx@lists.osr.com
>[mailto:xxxxx@lists.osr.com] On Behalf Of
>Nikolas Stylianides
>Sent: Thursday, July 21, 2005 5:11 AM
>To: Windows System Software Devs Interest List
>Subject: Re: [ntdev] Common Buffer + numberofmapregisters
>
>Nikolas Stylianides wrote:
>
>
>
>>For the time being no scatter/gather is supported by my bus master
>>device. So i am going to implement the common buffer scheme.
>>
>>The question is this: In case of a very large buffer
>>
>>
>allocation (16MB)
>
>
>>do i have to declare the numberofmapregisters (16MB/PAGE_SIZE) when
>>calling IoGetDmaAdapter ?
>>
>>The reason i am asking this is because the
>>
>>
>AllocateCommonBuffer will
>
>
>>hold a set of map registers.
>>
>>Thanks.
>>
>>
>>—
>>Questions? First check the Kernel Driver FAQ at
>>http://www.osronline.com/article.cfm?id=256
>>
>>You are currently subscribed to ntdev as: xxxxx@4plus.com To
>>unsubscribe send a blank email to xxxxx@lists.osr.com
>>
>>
>>
>>
>Hello there. I am calling IoGetDmaAdapter and BSOD appears
>with code 0x000000ca
>
>my code is this:
>
> RtlZeroMemory(&devdesc,sizeof(_DEVICE_DESCRIPTION));
> devdesc.Version = DEVICE_DESCRIPTION_VERSION;
> devdesc.Master = TRUE;
> devdesc.Dma32BitAddresses = TRUE;
> devdesc.InterfaceType = PCIBus;
> devdesc.MaximumLength = 32*PAGE_SIZE*PAGE_SIZE;
>
> pDevExt->_pDmaAdapter = NULL;
> pDevExt->_pVirtualAddress = NULL;
> ulMapRegisters = 1;
> g_Resources._PhysicalAddress.LowPart =
>g_Resources._PhysicalAddress.HighPart = 0;
>
> pDevExt->_pDmaAdapter =
>IoGetDmaAdapter(pDevExt->pDevice,&devdesc,&ulMapRegisters);
>
>Any clues?
>
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as:
>xxxxx@hollistech.com To unsubscribe send a blank email to
>xxxxx@lists.osr.com
>
>
>
Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@4plus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Mark, you are absolutly right. I am using my fDO instead of the pDO.
Thank you very much.