> I’m confused. What device does this 16K buffer belong to?
It is a special industrial keyboard.
What bus is this device attached to?
Well, I have set “legacy, non-enumerable” in the geninf.exe wizard. All my
input comes from the dual-port memory mapped to the memory space.
It is the driver for this device that needs to allocate the resources.
IRP_MN_QUERY_RESOURCE_REQUIREMENTS, as the ddk clearly indicates, is a bus
driver PnP request.=====================
Mark Roddy
Hollis Technology Solutions
www.hollistech.com
xxxxx@hollistech.com-----Original Message-----
From: Ferenc Deak [mailto:xxxxx@nct.hu]
Sent: Friday, August 22, 2003 9:22 AM
To: Windows System Software Developers Interest List
Subject: [ntdev] Device-dedicated memory
(IRP_MN_QUERY_RESOURCE_REQUIREMENTS)Hi,
I would like to access my dual port memory from my keyboard port driver.
The
physical address of the dual port memory is 0x000b0000. It is 16 KByte. I
would like to allocate it for exlusive usage.I do this in my AddDevice now:
physAddr_dual.LowPart = 0x000b0000;
physAddr_dual.HighPart = 0x00000000;// map 4 bytes from dual-port memory
devExt->DualRam = MmMapIoSpace(physAddr_dual,4,MmNonCached);It works, but I have read about
IRP_MN_QUERY_RESOURCE_REQUIREMENTS.(http://msdn.microsoft.com/library/defaul
t.asp?url=/library/en-us/kmarch/hh/kmarch/memmgmt_7o6f.asp)
Now I handle it like this:
case IRP_MN_QUERY_RESOURCE_REQUIREMENTS:
IoSkipCurrentIrpStackLocation(Irp);
status = IoCallDriver(devExt->TopOfStack, Irp);break;
How can I allocate this 16KByte properly? How should
IRP_MN_QUERY_RESOURCE_REQUIREMENTS be handled? Probably I must modify the
list on the IRP’s way back up the device stack. “If a … driver changes
the
size of the resource requirements list, the driver must allocate a new
structure from paged memory and free the previous structure” (DDK) How?Is there sample for allocating physical memory?
Thanks in advance,
Ferenc
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256You are currently subscribed to ntdev as: xxxxx@stratus.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=256You are currently subscribed to ntdev as: xxxxx@nct.hu
To unsubscribe send a blank email to xxxxx@lists.osr.com