I don’t believe LU extensions are part of the uncached extension in SCSIPORT. Storport may have added that.
-p
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of David Craig
Sent: Friday, June 19, 2009 1:53 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] SrbExtension Alignment
I assume it also includes the SpecificLUExtension also? Don’t know if I need one, but I think it is nice StorPort makes it so easy in many ways. I will probably have to do a reverse port of a driver from StorPort to ScsiMiniport once I get it working. Generally opposite of what most people have to do since I started with StorPort. I sure wish the WDK documentation for StorPort would stop referring to the ScsiMiniport documentation. That is a disincentive to writing StorPort drivers along with the slow as molasses document viewer. Yes, I also have the CHM and use it some of the time.
“Peter Wieland” > wrote in message news:xxxxx@ntdev…
SCSIPORT allocates one big piece of common buffer and creates the device’s uncached extension and the SRB extensions out of that single block of memory. So it can all be done with a single comparison.
-p
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@attotech.com
Sent: Friday, June 19, 2009 12:59 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] SrbExtension Alignment
Well, what if the physical address is not in the adapter’s Uncached Extension but in the Srb Extension?
Looking at the disassembly of the ScsiPort version I only see a comparison to one range. So unless that SrbExtensions are also allocated out of that one range, the call passing in a physical address within the SrbExtension will fail.
Peter Wieland
Sent by: xxxxx@lists.osr.com
06/19/2009 03:39 PM
Please respond to
“Windows System Software Devs Interest List”
To
“Windows System Software Devs Interest List”
cc
Subject
RE: [ntdev] SrbExtension Alignment
IIRC ScsiPortGetVirtualAddress looked to see if the physical address was within the uncached extension range and if so computed the virtual address to return based on that. It should be entirely reliable since it’s simple arithmetic at that point.
-p
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@attotech.com
Sent: Friday, June 19, 2009 5:40 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] SrbExtension Alignment
Why are you calling ScsiPortGetVirtualAddress? Just add to the virtual address whatever offset you added to the physical address to get the aligned address.
From a ScsiPort disassembly, I’m not sure I would trust ScsiPortGetVirtualAddress to work for addresses in the range of the SrbExtenaion. The StorPort function, on the other hand, calls (undocumented) MmGetVirtualFromPhysical.
xxxxx@wipro.com
Sent by: xxxxx@lists.osr.com
06/19/2009 02:22 AM
Please respond to
“Windows System Software Devs Interest List”
To
“Windows System Software Devs Interest List”
cc
Subject
[ntdev] SrbExtension Alignment
Hello,
I am developing a SCSIport miniport driver and I am using the SrbExtension buffer as a command table for the HBA, but the HBA spec has a restriction that this buffer’s physical address should be aligned on a 128 byte cache line.
I couldn’t find any place where I can tell the port to provide me a buffer with a required physical alignment.
So I tried giving more size to the SrbExtensionSize member of both HW_INITIALIZATION_DATA and PORT_CONFIGURATION_INFORMATION before calling the ScsiPortGetUncachedExtension(). I was planning to move ahead in the buffer to find an offset with the required physical alignment.
But strangely, when I use the ScsiPortGetPhysicalAddress to get the physical address of the SrbExtension, I am getting a non-aligned addr (expected) and a large length value. Then when I call ScsiPortGetVirtualAddress to convert the offsetted aligned physical addr to virtual addr, its returning NULL.
Am I missing something simple or does this requires some redesign from my side? How do we normally specify alignment restrictions for SrbExtension?
Thanks,
Sreekumar
—
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
— 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
—
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
— 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
—
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