Porting SCSI Miniport to AMD64

Hi all,

I have a problem with porting a virtual scsi miniport device driver from x86 to x64 (Windows XP). My FindAdapter is called once and then neither StartIo nor one more call of FindAdapter do not occur.

I searched archives and found some threads that describe the same symptoms but I think they relate to another problem - presence of Isa bus in the system. I think this is not the issue in my case because the driver works on all 32-bit machines and platforms I have: Windows XP, Vista, both real and VMWare-based.

I make tests with Windows XP 64-bit installed in VMWare, so I think the set of devices should be the same to the set of devices found in Windowx XP 32-bit installed in VMWare. The driver works for the 32-bit based but does not work for the 64-bit based XP.

Probably there are some changes or specifics in the miniport architecture for 64-bit platforms?


Regards,
Roman Kudinov
CycloneSoft

It is probably the same or related issue. The only solution I found
was to implement a virtual bus driver to enumerate a PDO for the HBA,
and implement an upper filter driver for the FDO of that devnode that
faked up some resources for the FDO used by scsiport. Without
resources scsiport will not get the party started.

On Dec 14, 2007 2:23 AM, wrote:
> Hi all,
>
> I have a problem with porting a virtual scsi miniport device driver from x86 to x64 (Windows XP). My FindAdapter is called once and then neither StartIo nor one more call of FindAdapter do not occur.
>
> I searched archives and found some threads that describe the same symptoms but I think they relate to another problem - presence of Isa bus in the system. I think this is not the issue in my case because the driver works on all 32-bit machines and platforms I have: Windows XP, Vista, both real and VMWare-based.
>
> I make tests with Windows XP 64-bit installed in VMWare, so I think the set of devices should be the same to the set of devices found in Windowx XP 32-bit installed in VMWare. The driver works for the 32-bit based but does not work for the 64-bit based XP.
>
> Probably there are some changes or specifics in the miniport architecture for 64-bit platforms?
>
>
> –
> Regards,
> Roman Kudinov
> CycloneSoft
>
> —
> 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

Registry values can be wrong.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

wrote in message news:xxxxx@ntdev…
> Hi all,
>
> I have a problem with porting a virtual scsi miniport device driver from x86
to x64 (Windows XP). My FindAdapter is called once and then neither StartIo nor
one more call of FindAdapter do not occur.
>
> I searched archives and found some threads that describe the same symptoms
but I think they relate to another problem - presence of Isa bus in the system.
I think this is not the issue in my case because the driver works on all 32-bit
machines and platforms I have: Windows XP, Vista, both real and VMWare-based.
>
> I make tests with Windows XP 64-bit installed in VMWare, so I think the set
of devices should be the same to the set of devices found in Windowx XP 32-bit
installed in VMWare. The driver works for the 32-bit based but does not work
for the 64-bit based XP.
>
> Probably there are some changes or specifics in the miniport architecture for
64-bit platforms?
>
>
> –
> Regards,
> Roman Kudinov
> CycloneSoft
>

There is a usenet thread about virtual wave device issues on 64-bit that may have clues as to how virtual under 64-bit Windows is different than 32-bit. But it is technically possible to write a pure virtual SCSI miniport that loads on 64-bit Windows without claiming hardware resources such as the www.perisoft.net/miniport demo.

Thank you for your replies and links.

Mark, could you point me the direction where to look about virtual bus drivers?

Eriksson, when you say “usenet” what you mean, could you give me a link to this resource?

Below is the usenet thread regarding 64-bit virtual issues, but I am not sure if this is the particular issue you are facing or not.

Also to clarify: writing a virtual bus driver and faking resources is not required. The source code mentioned in my earlier post is a standalone 64-bit miniport that doesn’t claim resources.

http://groups.google.com/group/microsoft.public.development.device.drivers/browse_frm/thread/9832e4ae54fff12f/489b250413b4bf97?hl=en#489b250413b4bf97

That thread appears to be discussing a virtual device for a USB bus, not a
scsi miniport driver interfacing with the scsiport driver. Scsiport and
storport have their own rules. The most recent release of storport actually
supports virtual miniports. Scsiport does not, and never will. If one wants
to implement a virtual scsi miniport, scsiport has to be tricked into
thinking that there is an actual hardware device for the HBA.

On Dec 17, 2007 5:58 AM, wrote:

> Below is the usenet thread regarding 64-bit virtual issues, but I am not
> sure if this is the particular issue you are facing or not.
>
> Also to clarify: writing a virtual bus driver and faking resources is not
> required. The source code mentioned in my earlier post is a standalone
> 64-bit miniport that doesn’t claim resources.
>
>
> http://groups.google.com/group/microsoft.public.development.device.drivers/browse_frm/thread/9832e4ae54fff12f/489b250413b4bf97?hl=en#489b250413b4bf97
>
>
> —
> 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

> That thread appears to be discussing a virtual device for a USB bus,

not a scsi miniport driver interfacing with the scsiport driver.

The problem with virtual wave devices running in 64-bits is 100% relevant to virtual SCSI miniports. But since there are other issues running virtual SCSI miniports in 64-bit space, I can’t be sure if this is the particular one the OP is facing. It seems from your comments you came up with a solution that worked around a problem specific to 64-bit without fully understanding what the underlying problem was.

The most recent release of storport actually supports virtual miniports.

Is this a typo? If not, link please.

If one wants to implement a virtual scsi miniport, scsiport has to be
tricked into thinking that there is an actual hardware device for the HBA.

That is an approach, but by no means a requirement. We use the miniport sample noted in my first reply and it claims no hardware resources and needs no helper binaries.

On Dec 17, 2007 9:28 PM, wrote:

>
> > The most recent release of storport actually supports virtual miniports.
>
> Is this a typo? If not, link please.

http://support.microsoft.com/kb/943295


Mark Roddy

I succeeded to run the demo from Perisoft on my 64-bit PC, so hardware compatibility is not the issue in my case. It seems that the only way is to trace the kernel to see what is wrong with the settings I output in FindAdapter.

Eriksson: it seems from your post that you are 100% sure that the problem is DMA-related as described in the USB audio thread?

Hi Roman,
Are you done with the FindAdapter issue. I am also facing a similar kind of problem.

Finally I have solved the issue, though I am not sure what I did exactly, it just started to work one day :slight_smile:
Most likely I had the problem with the INF file.