I'm trying to use StorPortGetSystemAddress to get a VA I can use to meet the alignment and transfer length requirements for my device. My Storport miniport is setting MapBuffers to STOR_MAP_NON_READ_WRITE_BUFFERS in the HW_INITIALIZATION_DATA.
I thought I would be able to use StorPortGetSystemAddress to retrieve a VA for both Read/Write and non-Read/Write requests. However, the VA I'm getting from StorPortGetSystemAddress has me confused. I expected to either get back the same VA contained in DataBuffer, or to get back a different VA which pointed to the same physical memory.
StorPortGetSystemAddress returns 0xfffffa80`07564560
Srb->Databuffer is 0xfffffa60`06ec5560
!pte 0xfffffa80`07564560 (StorPortGetPhysicalAddress)
PXE @ FFFFF6FB7DBEDFA8 PPE at FFFFF6FB7DBF5000 PDE at FFFFF6FB7EA001D0 PTE at FFFFF6FD4003AB20
contains 0000000105600863 contains 0000000105601863 contains 00000001DE6009E3 contains 0000000000000000
pfn 105600 ---DA--KWEV pfn 105601 ---DA--KWEV pfn 1de600 -GLDA--KWEV LARGE PAGE pfn 1de764
!pte 0xfffffa60`06ec5560 (DataBuffer)
PXE @ FFFFF6FB7DBEDFA0 PPE at FFFFF6FB7DBF4C00 PDE at FFFFF6FB7E9801B8 PTE at FFFFF6FD30037628
contains 0000000105784863 contains 0000000105783863 contains 00000000B335C863 contains 00000000B30D5963
pfn 105784 ---DA--KWEV pfn 105783 ---DA--KWEV pfn b335c ---DA--KWEV pfn b30d5 -G-DA--KWEV
What exactly is StorPortGetPhysicalAddresses VA pointing to? Can I not use this API if the memory is already mapped?