Hi!,

In Stream.sys there was a PORT_CONFIGURATION structure available, that
pointed out mappings from physical to virtual memory.

My PCI card has a large memory range, and I want to access last 256
bytes of it (not using DMA, I just want to map this memory into virtual
address - those my PCI card registers).
I'm trying to use MmMapIoSpace, this supposed to look like this:

PHYSICAL_ADDRESS physAddress;
Memory resource address received from >>TranslatedResourceList<<.

physAddress.LowPart += 0x100000L;
virtualAddress = (PUCHAR) MmMapIoSpace(physAddress, 256, MmNonCached);

But this does not works as I expect it to work - I could make a simple
mistake - and If this is only way to implement this I'll try it, but:

Is there some other way of receiving those addresses?
I remember, I had similar problem with Stream.sys and I have found
mapped physical onto virtual addresses in PORT_CONFIGURATION structure.
That was very comfortable in Stream.sys.

Pawel


ps
Maybe there are also function simmilar to StreamClassGetPhysicalAddress
in AVStream model?