Hi all,
I want to assign resource to my device by using IoAssignResources().
IO_RESOURCE_REQUIREMENT_LIST parameter to IoAssignResources() function, holds information about resource. My resource type is CmResourceMemory.
After calling this function i am getting status as STATUS_CONFLICTING_ADDRESSES (0xC0000018L).
It’s a 64 bit machine (win 2k3-r2).
Parameter i set for memory resource are
memory.length=0xffffffff (4 gb)
memory.allignment = 0xffff ffff
memory.minimumaddress.quadpart=0
memory.maximumaddress.quadpart=0xffff ffff ffff ffff
- Are these parameters right? what parameters i should set?No sufficient documentation on this function.
- What if i want to set 64 bit memory resource? Length is just 32 bit parameter.
- This function is obsolete. What other func. i should use instead?
PNP request with FILTER_RESOURCE_REQUIREMENTS dont come to storport miniport driver.
Actually i want to assign resource of size > 4Gb on 64 bit. How can i do that?
Thanks in anticipation
~
First of all, you should not use IoAssignResources() at all. Instead, you should write your driver as PnP-compliant one, so that you will get a resource list that has been allocated for your device by PnP along with IRP_MN_START_DEVICE request.
Are these parameters right?
What do you think yourself??? You are claiming all 4G of address space for your device. What are you supposed to get, apart from STATUS_CONFLICTING_ADDRESSES???
what parameters i should set
You should not define any parameters on your own. Instead, write PnP-compliant driver, so that
you will receive a resource list from the OS.
Anton Bassov
What? You want to assign a device memory resource of 4gb? To a storport
miniport driver? There is simply no defined mechanism for doing this.
Exactly what sort of device is this? If you have a virtual miniport - it has
no device memory that needs a resource allocation. Are you trying to
allocate ram this way?
On Feb 12, 2008 5:08 AM, wrote:
> Hi all,
>
> I want to assign resource to my device by using IoAssignResources().
> IO_RESOURCE_REQUIREMENT_LIST parameter to IoAssignResources() function,
> holds information about resource. My resource type is CmResourceMemory.
> After calling this function i am getting status as
> STATUS_CONFLICTING_ADDRESSES (0xC0000018L).
> It’s a 64 bit machine (win 2k3-r2).
> Parameter i set for memory resource are
> memory.length=0xffffffff (4 gb)
> memory.allignment = 0xffff ffff
> memory.minimumaddress.quadpart=0
> memory.maximumaddress.quadpart=0xffff ffff ffff ffff
>
> 1) Are these parameters right? what parameters i should set?No sufficient
> documentation on this function.
> 2) What if i want to set 64 bit memory resource? Length is just 32 bit
> parameter.
> 3) This function is obsolete. What other func. i should use instead?
> PNP request with FILTER_RESOURCE_REQUIREMENTS dont come to storport
> miniport driver.
>
> Actually i want to assign resource of size > 4Gb on 64 bit. How can i do
> that?
>
> Thanks in anticipation
> ~
>
>
>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
–
Mark Roddy
> I want to assign resource to my device by using IoAssignResources().
This NT3/NT4 function is obsoleted since year 2000. Please use PnP for such
things.
–
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
I don’t really understand what you’re trying to do. Others have
responded, and they’ve been right, as far as that goes. But tell us
what you’re shooting for and we might be able to help you.
Incidentally, the call failed partly because you asked for 4GB of
memory-mapped I/O space. Your BIOS probably says that the total of
all MMIO space that will be forwarded to your root PCI bus is
somewhere in the range of a few hundred megabytes or less.
If your BIOS says that cycles generated at the processor won’t be
forwarded to an I/O bus, then Windows can’t possibly succeed a request
like that.
wrote in message news:xxxxx@ntdev…
> Hi all,
>
> I want to assign resource to my device by using IoAssignResources().
> IO_RESOURCE_REQUIREMENT_LIST parameter to IoAssignResources()
> function, holds information about resource. My resource type is
> CmResourceMemory.
> After calling this function i am getting status as
> STATUS_CONFLICTING_ADDRESSES (0xC0000018L).
> It’s a 64 bit machine (win 2k3-r2).
> Parameter i set for memory resource are
> memory.length=0xffffffff (4 gb)
> memory.allignment = 0xffff ffff
> memory.minimumaddress.quadpart=0
> memory.maximumaddress.quadpart=0xffff ffff ffff ffff
>
> 1) Are these parameters right? what parameters i should set?No
> sufficient documentation on this function.
> 2) What if i want to set 64 bit memory resource? Length is just 32
> bit parameter.
> 3) This function is obsolete. What other func. i should use instead?
> PNP request with FILTER_RESOURCE_REQUIREMENTS dont come to
> storport miniport driver.
>
> Actually i want to assign resource of size > 4Gb on 64 bit. How can
> i do that?
>
> Thanks in anticipation
> ~
>
>
>
>
>
Hi all,
Thanks for your reeply.
So i have a PCI device attached to PCI bus whose size is greater than 4GB, have two BAR’s one is of size around a MB and other is of > 4GB(on 64 bit). I am able to get first memory range but i want to assign second memory range to this device. In Linux there is a API called pci_assign_resource that assigns the resource to device explicitly. I can get size of device from BAR1, but not able to assign it explicitly.
How can i assign this resource? Or some equiva. of pci_assign_resource on windows?
Pnp manager requests like START_DEVICE or FILTER_RESOURCE_REQUIREMENT are not reachable to my driver, as my driver is storport miniport driver. What could be the reason?
Can anyone please explain how pci address space is mapped to system address space? or atleast some ref. link to clear it. I am not clear about these concepts.
Thanks in advance!
----- Original Message ----
From: Jake Oshins
To: Windows System Software Devs Interest List
Sent: Wednesday, February 13, 2008 3:18:35 AM
Subject: Re:[ntdev] Problem with assigning resource
I don’t really understand what you’re trying to do. Others have
responded, and they’ve been right, as far as that goes. But tell us
what you’re shooting for and we might be able to help you.
Incidentally, the call failed partly because you asked for 4GB of
memory-mapped I/O space. Your BIOS probably says that the total of
all MMIO space that will be forwarded to your root PCI bus is
somewhere in the range of a few hundred megabytes or less.
If your BIOS says that cycles generated at the processor won’t be
forwarded to an I/O bus, then Windows can’t possibly succeed a request
like that.
- Jake Oshins
Microsoft
wrote in message news:xxxxx@ntdev…
> Hi all,
>
> I want to assign resource to my device by using IoAssignResources().
> IO_RESOURCE_REQUIREMENT_LIST parameter to IoAssignResources()
> function, holds information about resource. My resource type is
> CmResourceMemory.
> After calling this function i am getting status as
> STATUS_CONFLICTING_ADDRESSES (0xC0000018L).
> It’s a 64 bit machine (win 2k3-r2).
> Parameter i set for memory resource are
> memory.length=0xffffffff (4 gb)
> memory.allignment = 0xffff ffff
> memory.minimumaddress.quadpart=0
> memory.maximumaddress.quadpart=0xffff ffff ffff ffff
>
> 1) Are these parameters right? what parameters i should set?No
> sufficient documentation on this function.
> 2) What if i want to set 64 bit memory resource? Length is just 32
> bit parameter.
> 3) This function is obsolete. What other func. i should use instead?
> PNP request with FILTER_RESOURCE_REQUIREMENTS dont come to
> storport miniport driver.
>
> Actually i want to assign resource of size > 4Gb on 64 bit. How can
> i do that?
>
> Thanks in anticipation
> ~
>
>
>
>
>
—
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> How can i assign this resource? Or some equiva. of pci_assign_resource on windows?
Please read all post on this thread again. You just don’t assign resources to your device under Windows. Period. All resource assignment is handled by the OS itself, so that the only thing you can do is to use the resources that have been assigned to your device by the system …
Pnp manager requests like START_DEVICE or FILTER_RESOURCE_REQUIREMENT
are not reachable to my driver, as my driver is storport miniport driver.
What could be the reason?
Miniport drivers are not supposed to interact directly with the OS - all calls to/from miniport drivers are normally made only by/to the class/port driver. Therefore, if you don’t receive PnP requests in miniport driver, it means that class/port driver handles it for you…
Can anyone please explain how pci address space is mapped to system address space?
Basically, a device may be mapped either into memory or into the IO space. In former case you access its registers with MOV instructions, i.e. do things the way you access memory. In latter one you access your device with IN/OUT instructions.On x86 platforms there is one-to-one correspondence between bus addresses and memory addresses, i.e. you can access memory-mapped devices exactly you would access system RAM without any translations. However, this is not necessarily the case on other platforms, so that a translation between bus address and memory one may be required on non-x86 platforms…
Anton Bassov
Thanks for your Reply’s.
Thanks a lot!!!
----- Original Message ----
From: “xxxxx@hotmail.com”
To: Windows System Software Devs Interest List
Sent: Wednesday, February 13, 2008 6:27:40 PM
Subject: RE:[ntdev] Problem with assigning resource
> How can i assign this resource? Or some equiva. of pci_assign_resource on windows?
Please read all post on this thread again. You just don’t assign resources to your device under Windows. Period. All resource assignment is handled by the OS itself, so that the only thing you can do is to use the resources that have been assigned to your device by the system …
> Pnp manager requests like START_DEVICE or FILTER_RESOURCE_REQUIREMENT
> are not reachable to my driver, as my driver is storport miniport driver.
> What could be the reason?
Miniport drivers are not supposed to interact directly with the OS - all calls to/from miniport drivers are normally made only by/to the class/port driver. Therefore, if you don’t receive PnP requests in miniport driver, it means that class/port driver handles it for you…
> Can anyone please explain how pci address space is mapped to system address space?
Basically, a device may be mapped either into memory or into the IO space. In former case you access its registers with MOV instructions, i.e. do things the way you access memory. In latter one you access your device with IN/OUT instructions.On x86 platforms there is one-to-one correspondence between bus addresses and memory addresses, i.e. you can access memory-mapped devices exactly you would access system RAM without any translations. However, this is not necessarily the case on other platforms, so that a translation between bus address and memory one may be required on non-x86 platforms…
Anton Bassov
—
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
>have two BAR’s one is of size around a MB and other is of > 4GB(on 64 bit). I
am
able to get first memory range but i want to assign second memory range to
this
device. In Linux there is a API called pci_assign_resource that assigns the
So what? You cannot map >4GB to virtual addresses using PTEs on a 32bit OS
anyway. More so, non-PAE CPU cannot access >4GB physical addresses, and in XP
32 and Vista 32, even PAE CPU cannot.
So, the device really has issues.
–
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
Omprakash Mehra wrote:
Thanks for your reeply.
So i have a PCI device attached to PCI bus whose size is greater than
4GB, have two BAR’s one is of size around a MB and other is of >
4GB(on 64 bit). I am able to get first memory range but i want to
assign second memory range to this device. In Linux there is a API
called pci_assign_resource that assigns the resource to device
explicitly. I can get size of device from BAR1, but not able to assign
it explicitly.
How can i assign this resource? Or some equiva. of pci_assign_resource
on windows?
The key is that, for a plug-and-play driver, YOU don’t do this. The
operating system does this, and hands you the results.
For a storport miniport, your PCI BARs should be passed to you in the
AccessRanges member of the PORT_CONFIGURATION_INFORMATION structure that
is passed to your HwStorFindAdapter callback. And, by the way, I know
nothing about storage miniports; it took 5 minutes with MSDN to find
this information.
Now, I don’t actually know whether the port driver will correctly hand
you a 4GB BAR, and I’m boggled that a hardware designer would try to do
such a thing. You will probably end up mapping pieces of this space
into memory a bit at a time, rather than mapping the entire space.
Can anyone please explain how pci address space is mapped to system
address space? or atleast some ref. link to clear it. I am not clear
about these concepts.
It’s a pretty fundamental concept. The PnP subsystem gets the physical
addresses from the configuration space, and hands them to the driver via
IRP_MN_START_DEVICE. The driver then maps the physical address range
into virtual address space, as needed.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Scsiport and Storport don’t really support sliding a window across a huge
bar. As somebody else pointed out, on a 32bit system this device is DOA if
it actually requires a 4GB bar. On a 64 bit system the address space is not
an issue in and of itself, but the device still will have the problems with
platform pci bus architecture that Jake pointed out. The reduced
functionality of the storport/scsiport miniport model is just one of the
many hurdles the OP faces.
On Feb 13, 2008 12:52 PM, Tim Roberts wrote:
> Omprakash Mehra wrote:
> >
> > Thanks for your reeply.
> > So i have a PCI device attached to PCI bus whose size is greater than
> > 4GB, have two BAR’s one is of size around a MB and other is of >
> > 4GB(on 64 bit). I am able to get first memory range but i want to
> > assign second memory range to this device. In Linux there is a API
> > called pci_assign_resource that assigns the resource to device
> > explicitly. I can get size of device from BAR1, but not able to assign
> > it explicitly.
> > How can i assign this resource? Or some equiva. of pci_assign_resource
> > on windows?
>
> The key is that, for a plug-and-play driver, YOU don’t do this. The
> operating system does this, and hands you the results.
>
> For a storport miniport, your PCI BARs should be passed to you in the
> AccessRanges member of the PORT_CONFIGURATION_INFORMATION structure that
> is passed to your HwStorFindAdapter callback. And, by the way, I know
> nothing about storage miniports; it took 5 minutes with MSDN to find
> this information.
>
> Now, I don’t actually know whether the port driver will correctly hand
> you a 4GB BAR, and I’m boggled that a hardware designer would try to do
> such a thing. You will probably end up mapping pieces of this space
> into memory a bit at a time, rather than mapping the entire space.
>
>
> > Can anyone please explain how pci address space is mapped to system
> > address space? or atleast some ref. link to clear it. I am not clear
> > about these concepts.
>
> It’s a pretty fundamental concept. The PnP subsystem gets the physical
> addresses from the configuration space, and hands them to the driver via
> IRP_MN_START_DEVICE. The driver then maps the physical address range
> into virtual address space, as needed.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
–
Mark Roddy
If the BIOS says that there is no 4GB window that maps onto the bus
that your device is plugged into, Windows will never start your
device. If the BIOS says that there is such a window, then the PCI
driver will configure your device and this will be handed to your
driver as part of the interface between your driver and storport.
By the way, I’ve never seen a BIOS that does this.
“Omprakash Mehra” wrote in message
news:xxxxx@ntdev…
Hi all,
Thanks for your reeply.
So i have a PCI device attached to PCI bus whose size is greater than
4GB, have two BAR’s one is of size around a MB and other is of >
4GB(on 64 bit). I am able to get first memory range but i want to
assign second memory range to this device. In Linux there is a API
called pci_assign_resource that assigns the resource to device
explicitly. I can get size of device from BAR1, but not able to assign
it explicitly.
How can i assign this resource? Or some equiva. of pci_assign_resource
on windows?
Pnp manager requests like START_DEVICE or FILTER_RESOURCE_REQUIREMENT
are not reachable to my driver, as my driver is storport miniport
driver. What could be the reason?
Can anyone please explain how pci address space is mapped to system
address space? or atleast some ref. link to clear it. I am not clear
about these concepts.
Thanks in advance!
----- Original Message ----
From: Jake Oshins
To: Windows System Software Devs Interest List
Sent: Wednesday, February 13, 2008 3:18:35 AM
Subject: Re:[ntdev] Problem with assigning resource
I don’t really understand what you’re trying to do. Others have
responded, and they’ve been right, as far as that goes. But tell us
what you’re shooting for and we might be able to help you.
Incidentally, the call failed partly because you asked for 4GB of
memory-mapped I/O space. Your BIOS probably says that the total of
all MMIO space that will be forwarded to your root PCI bus is
somewhere in the range of a few hundred megabytes or less.
If your BIOS says that cycles generated at the processor won’t be
forwarded to an I/O bus, then Windows can’t possibly succeed a request
like that.
- Jake Oshins
Microsoft
wrote in message news:xxxxx@ntdev…
> Hi all,
>
> I want to assign resource to my device by using IoAssignResources().
> IO_RESOURCE_REQUIREMENT_LIST parameter to IoAssignResources()
> function, holds information about resource. My resource type is
> CmResourceMemory.
> After calling this function i am getting status as
> STATUS_CONFLICTING_ADDRESSES (0xC0000018L).
> It’s a 64 bit machine (win 2k3-r2).
> Parameter i set for memory resource are
> memory.length=0xffffffff (4 gb)
> memory.allignment = 0xffff ffff
> memory.minimumaddress.quadpart=0
> memory.maximumaddress.quadpart=0xffff ffff ffff ffff
>
> 1) Are these parameters right? what parameters i should set?No
> sufficient documentation on this function.
> 2) What if i want to set 64 bit memory resource? Length is just 32
> bit parameter.
> 3) This function is obsolete. What other func. i should use instead?
> PNP request with FILTER_RESOURCE_REQUIREMENTS dont come to
> storport miniport driver.
>
> Actually i want to assign resource of size > 4Gb on 64 bit. How can
> i do that?
>
> Thanks in anticipation
> ~
>
>
>
>
>
—
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
Looking for last minute shopping deals? Find them fast with Yahoo!
Search.