About import PCI Express Memory into disk on PC

Dear aIl,

??? Currently , I have one PCI Express Gen2 device ( BAR1 is allocated with memory 32 bit- 1MB ) .
??? I’d like to make a driver for converting 1MB into one disk which is displayed on My Computer ( Can format, read, write ) .

So that, I can read/write file easily for checking if the device can work well.

Do you know how to do this ?

# I read one sample of WDK about RAM disk written by using WDF but
I wonder if it’s similar for my case .
# Please, help to instruct me about this issue .

Best Regards
HanNguyen

The RAM disk driver doesn’t expect to use memory on a PCIe add-in adapter.
If you are looking for a project learn windows device drivers you may want
start with the PCI9x5x sample in the WDK. This would give you a better
introduction to hardware and how to gain access to the hardware resources
from a Windows driver.

The ML605 is a very capable PCIe adapter that can be that could be used for
networking, USB, Serial ports, Bus Mastering, storage, or some other custom
hardware task, each of these hardware categories have their own reference
drivers that you would start development with.

If you are convinced your first project must be a storage driver, then you
would be better to start with the Mini Storport Driver, however this
requires translating SCSI commands to commands that access your PCIe memory.
Be prepared to learn the subset of SCSI commands required to bring up a
drive.

Phil

“Nhat Han” wrote in message news:xxxxx@ntdev…
Dear aIl,

Currently , I have one PCI Express Gen2 device ( BAR1 is allocated
with memory 32 bit- 1MB ) .
I’d like to make a driver for converting 1MB into one disk which is
displayed on My Computer ( Can format, read, write ) .

So that, I can read/write file easily for checking if the device can work
well.

Do you know how to do this ?

# I read one sample of WDK about RAM disk written by using WDF but
I wonder if it’s similar for my case .
# Please, help to instruct me about this issue .

Best Regards
HanNguyen

Nhat Han wrote:

Currently , I have one PCI Express Gen2 device ( BAR1 is
allocated with memory 32 bit- 1MB ) .
I’d like to make a driver for converting 1MB into one disk
which is displayed on My Computer ( Can format, read, write ) .

So that, I can read/write file easily for checking if the device can
work well.

That’s not the right way to do that. Disk drivers are complicated. No
one would ever use the word “easily” to describe this task.

If you want to exercise the memory on your board, then the right way is
to write a small driver that does exactly that. Just write some memory
tests.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Dear Phil & Tim Robert,

> [From Phil] If you are convinced your first project must be a storage driver, then you
would be better to start with the Mini Storport Driver, however this
requires translating SCSI commands to commands that access your PCIe memory.
Be prepared to learn? the subset of SCSI commands required to bring up a
drive.

I got it . I also heard about Mini Storport. However, I don’t have any guidance document
or sample code to start my project .
If you have experience in this type of project, please kindly show me some
documents and guidance .

I’m new to windows driver development and it’s hard to look up everything by myself .

>[From Tim Roberts] If you want to exercise the memory on your board, then the right way is to write a small driver that does exactly that.? Just write some memory tests.

I got the requirements to make such driver . So , I must investigate how to do it .
Please, kindly help me if you experienced this .

Thank you very much !

Best Regards
HanNguyen
Phil

— On Fri, 6/17/11, Tim Roberts wrote:

From: Tim Roberts
Subject: Re: [ntdev] About import PCI Express Memory into disk on PC
To: “Windows System Software Devs Interest List”
Date: Friday, June 17, 2011, 11:34 PM

Nhat Han wrote:
>
>? ? ? ? ? Currently , I have one PCI Express Gen2 device ( BAR1 is
> allocated with memory 32 bit- 1MB ) .
>? ? ? ? I’d like to make a driver for converting 1MB into one disk
> which is displayed on My Computer ( Can format, read, write ) .
>
> So that, I can read/write file easily for checking if the device can
> work well.
>

That’s not the right way to do that.? Disk drivers are complicated.? No
one would ever use the word “easily” to describe this task.

If you want to exercise the memory on your board, then the right way is
to write a small driver that does exactly that.? Just write some memory
tests.


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

go back and change your requirements. i am guessing the requirement came from someone with a unix background where everything is files. not so in windows. exposing device memory as a disk is a bad bad idea

d


From: xxxxx@lists.osr.com [xxxxx@lists.osr.com] on behalf of Nhat Han [xxxxx@yahoo.com]
Sent: Friday, June 17, 2011 10:03 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] About import PCI Express Memory into disk on PC

Dear Phil & Tim Robert,

> [From Phil] If you are convinced your first project must be a storage driver, then you
would be better to start with the Mini Storport Driver, however this
requires translating SCSI commands to commands that access your PCIe memory.
Be prepared to learn the subset of SCSI commands required to bring up a
drive.

I got it . I also heard about Mini Storport. However, I don’t have any guidance document
or sample code to start my project .
If you have experience in this type of project, please kindly show me some
documents and guidance .

I’m new to windows driver development and it’s hard to look up everything by myself .

>[From Tim Roberts] If you want to exercise the memory on your board, then the right way is to write a small driver that does exactly that. Just write some memory tests.

I got the requirements to make such driver . So , I must investigate how to do it .
Please, kindly help me if you experienced this .

Thank you very much !

Best Regards
HanNguyen
Phil

— On Fri, 6/17/11, Tim Roberts wrote:

From: Tim Roberts
Subject: Re: [ntdev] About import PCI Express Memory into disk on PC
To: “Windows System Software Devs Interest List”
Date: Friday, June 17, 2011, 11:34 PM

Nhat Han wrote:
>
> Currently , I have one PCI Express Gen2 device ( BAR1 is
> allocated with memory 32 bit- 1MB ) .
> I’d like to make a driver for converting 1MB into one disk
> which is displayed on My Computer ( Can format, read, write ) .
>
> So that, I can read/write file easily for checking if the device can
> work well.
>

That’s not the right way to do that. Disk drivers are complicated. No
one would ever use the word “easily” to describe this task.

If you want to exercise the memory on your board, then the right way is
to write a small driver that does exactly that. Just write some memory
tests.


Tim Roberts, xxxxx@probo.comhttps:
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

— 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</https:>

Nhat Han wrote:

I got it . I also heard about Mini Storport. However, I don’t have any
guidance document or sample code to start my project .
If you have experience in this type of project, please kindly show me
some documents and guidance .
I’m new to windows driver development and it’s hard to look up
everything by myself .

Of course it’s hard. Drivers are not easy to write. If you are new to
Windows driver development AND inexperienced with disk systems, then you
are 8 or 10 months away from having a working StorPort driver to
accomplish this task. A simple memory test driver could be completed in
3 or 4 weeks, even with the KMDF learning curve. An experienced driver
writer could have something running in half that time.

>>[From Tim Roberts*]* If you want to exercise the memory on your
board, then the right way is to write a small driver that does exactly
that. Just write some memory tests.

I got the requirements to make such driver . So , I must investigate
how to do it . Please, kindly help me if you experienced this .

Doron is exactly right. Your requirements are flawed, and as an
engineer it is your responsibility to point this out, rather than
blindly follow misguided instructions.

Here is a bad requirement:

  1. Memory on the device should be exposed as a disk drive so memory can
    be exercised

Here is a good requirement:

  1. Access to and operation of device memory must be thoroughly tested.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Not to say if it’s the idea is good or bad… but a basic memory-back
storport or scsi miniport is very very very easy.

One has moderate experience in windows driver and knows basic scsi commands
(inquiry, read10 write10, read capacity and such) should need no more than 2
days to get it working (able to format, read and write, suspend, resume…)
by typing every line of code by bare fingers.

If you were just try to exercise the target access on your pci devices, you
can just do it from windbg by using the bang dd and bang ed commands.

Good luck,
Calvin

On Fri, Jun 17, 2011 at 10:34 AM, Tim Roberts wrote:

> Nhat Han wrote:
> >
> > I got it . I also heard about Mini Storport. However, I don’t have any
> > guidance document or sample code to start my project .
> > If you have experience in this type of project, please kindly show me
> > some documents and guidance .
> > I’m new to windows driver development and it’s hard to look up
> > everything by myself .
> >
>
> Of course it’s hard. Drivers are not easy to write. If you are new to
> Windows driver development AND inexperienced with disk systems, then you
> are 8 or 10 months away from having a working StorPort driver to
> accomplish this task. A simple memory test driver could be completed in
> 3 or 4 weeks, even with the KMDF learning curve. An experienced driver
> writer could have something running in half that time.
>
> > >>[From Tim Roberts*]* If you want to exercise the memory on your
> > board, then the right way is to write a small driver that does exactly
> > that. Just write some memory tests.
> >
> > I got the requirements to make such driver . So , I must investigate
> > how to do it . Please, kindly help me if you experienced this .
> >
>
> Doron is exactly right. Your requirements are flawed, and as an
> engineer it is your responsibility to point this out, rather than
> blindly follow misguided instructions.
>
> Here is a bad requirement:
> 1. Memory on the device should be exposed as a disk drive so memory can
> be exercised
>
> Here is a good requirement:
> 1. Access to and operation of device memory must be thoroughly tested.
>
> –
> 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
>

Dear Tim Robert, Doran, Calvin Guan,

I got your answer with some different ideas :

[1] Not continue to implement [Tim Robert & Doron]
? - Reason :
??? * Access to and operation of device memory must be thoroughly tested
??? * Exposing device memory as a disk is a bad bad idea [Doron]

[2] Continue to implement [Calvin Guan]
? # Reason :
??? * We can implement within 2 days in case of understanding (SCSI commands)

I’d like to make clear my requirement . I didn’t intend to verify my memory device
by only implementation of disk on PC. But here’s the story :

[1] For verification of my memory device, I separated into 2 parts :
??? 1.1.? Test by using multiple READ/WRITE commands ( can access configuration space, any memory space )

??? 1.2?? Implement disk on PC

So, my memory device is already tested carefully in 1.1 . But I need to implement
1.2 because it’s easy to show the DEMO to customer . So, I don’t think that I must change my idea or ask my customer to change the request .

? ? ? ? ? ?? I have some experience about working with USB and I also know SCSI commands ( INQUIRY, READ10, WRITE10 ) . However , this is a story :

? [Host PC]--------------> [USB 2.0 device]

In USB2.0 device, it implements functions and flows of receiving commands( INQUIRY, READ10, WRITE10 …) from Host and returning the data . This is controlled by ATAPI ( I remember ) . This means : When USB device receive CBW ( 13Bytes) , it must decode to know what commands it receives and the states that it’s inside .

??? With my current project about PCIe, I need that Host PC is active in controlling device and device only receive READ/WRITE commands .It doesn’t understand READ10 or WRITE10 but Host PC has driver for controlling such issues .

//------------------
I know that? the sample of WDK “RAM disk driver” also does something like that ,
but I don’t know what to modify from that sample for my requirement.

If possible, would you please instruct me some steps to do ?

Thank you very much !

Best Regards
HanNguyen

— On Sat, 6/18/11, Calvin Guan (news) wrote:

From: Calvin Guan (news)
Subject: Re: [ntdev] About import PCI Express Memory into disk on PC
To: “Windows System Software Devs Interest List”
Date: Saturday, June 18, 2011, 12:56 AM

Not to say if it’s the idea is good or bad… but a basic memory-back storport or scsi miniport is very very very easy.?One has moderate experience in windows driver and knows basic scsi commands (inquiry, read10 write10, read capacity?and such) should need no more than 2 days to get it working (able to format, read and write, suspend, resume…) by typing every line of?code by bare fingers.
?If you were just try to exercise the target access on your pci devices, you can just do it from windbg by using the bang dd and bang ed commands.
?Good luck,
Calvin?
On Fri, Jun 17, 2011 at 10:34 AM, Tim Roberts wrote:

Nhat Han wrote:

>

> I got it . I also heard about Mini Storport. However, I don’t have any

> guidance document or sample code to start my project .

> If you have experience in this type of project, please kindly show me

> some documents and guidance .

> ?I’m new to windows driver development and it’s hard to look up

> everything by myself .

>

Of course it’s hard. ?Drivers are not easy to write. ?If you are new to

Windows driver development AND inexperienced with disk systems, then you

are 8 or 10 months away from having a working StorPort driver to

accomplish this task. ?A simple memory test driver could be completed in

3 or 4 weeks, even with the KMDF learning curve. ?An experienced driver

writer could have something running in half that time.

> >>[From Tim Roberts*]* If you want to exercise the memory on your

> board, then the right way is to write a small driver that does exactly

> that. ?Just write some memory tests.

>

> I got the requirements to make such driver . So , I must investigate

> how to do it . Please, kindly help me if you experienced this .

>

Doron is exactly right. ?Your requirements are flawed, and as an

engineer it is your responsibility to point this out, rather than

blindly follow misguided instructions.

Here is a bad requirement:

1. Memory on the device should be exposed as a disk drive so memory can

be exercised

Here is a good requirement:

1. Access to and operation of device memory must be thoroughly tested.



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


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

If you really want to go this route, you don’t write a ram disk driver.
Instead, you write a HBA miniport driver (storport or scsiport) with a LUN
that is backed by your memory exposed to the PCI bar.

  1. download the latest DDK from Microsoft, you need it to compile the
    driver.
  2. read the storport doc on line at:
    http://msdn.microsoft.com/en-us/library/ff567543(v=VS.85).aspx
  3. Pay attention to how to fill up various structures in DriverEntry and
    HwFindAdapter routines, how to extract CDBs from SRBs etc.
  4. For SRB_EXECUTE_SCSI, at minimum, you need to support INQUIRY, TUR,
    STOP_START_UNIT, READ, WRITE, VERIFY, READ_CAPACITY.
  5. you maybe able to find a working sample miniport from OSR. I have not
    seen the sample but I heard it’s pretty good. You can also start from a DDK
    storport miniport sample, gradually get rid of all code that’s irrelevant to
    you. That would save laborious typing unless you are a typist by trade:)

good luck,
Calvin

On Fri, Jun 17, 2011 at 6:28 PM, Nhat Han wrote:

> Dear Tim Robert, Doran, Calvin Guan,
>
> I got your answer with some different ideas :
> -----------------------------------------------------------------
> [1] Not continue to implement [Tim Robert & Doron]
> - Reason :
> * Access to and operation of device memory must be thoroughly
> tested
> * Exposing device memory as a disk is a bad bad idea [Doron]
>
> [2] Continue to implement [Calvin Guan]
> # Reason :
> * We can implement within 2 days in case of understanding (SCSI
> commands)
> -----------------------------------------------------------------
>
> I’d like to make clear my requirement . I didn’t intend to verify my memory
> device
> by only implementation of disk on PC. But here’s the story :
>
> [1] For verification of my memory device, I separated into 2 parts :
> 1.1. Test by using multiple READ/WRITE commands ( can access
> configuration space, any memory space )
>
> 1.2 Implement disk on PC
>
> So, my memory device is already tested carefully in 1.1 . But I need to
> implement
> 1.2 because it’s easy to show the DEMO to customer . So, I don’t think that
> I must change my idea or ask my customer to change the request .
>
>
> I have some experience about working with USB and I also know
> SCSI commands ( INQUIRY, READ10, WRITE10 ) . However , this is a story :
>
> [Host PC]--------------> [USB 2.0 device]
>
> In USB2.0 device, it implements functions and flows of receiving commands(
> INQUIRY, READ10, WRITE10 …) from Host and returning the data . This is
> controlled by ATAPI ( I remember ) . This means : When USB device receive
> CBW ( 13Bytes) , it must decode to know what commands it receives and the
> states that it’s inside .
>
> With my current project about PCIe, I need that Host PC is active in
> controlling device and device only receive READ/WRITE commands .It doesn’t
> understand READ10 or WRITE10 but Host PC has driver for controlling such
> issues .
>
> //------------------
> I know that the sample of WDK “RAM disk driver” also does something like
> that ,
> but I don’t know what to modify from that sample for my requirement.
>
> If possible, would you please instruct me some steps to do ?
>
>
>
> Thank you very much !
>
>
> Best Regards
> HanNguyen
>
>
>
>
>
>
> — On Sat, 6/18/11, Calvin Guan (news) wrote:
>
>
> From: Calvin Guan (news)
>
> Subject: Re: [ntdev] About import PCI Express Memory into disk on PC
> To: “Windows System Software Devs Interest List”
> Date: Saturday, June 18, 2011, 12:56 AM
>
> Not to say if it’s the idea is good or bad… but a basic memory-back
> storport or scsi miniport is very very very easy.
>
> One has moderate experience in windows driver and knows basic scsi commands
> (inquiry, read10 write10, read capacity and such) should need no more than 2
> days to get it working (able to format, read and write, suspend, resume…)
> by typing every line of code by bare fingers.
>
> If you were just try to exercise the target access on your pci devices, you
> can just do it from windbg by using the bang dd and bang ed commands.
>
>
> Good luck,
> Calvin
>
> On Fri, Jun 17, 2011 at 10:34 AM, Tim Roberts
> > wrote:
>
> Nhat Han wrote:
> >
> > I got it . I also heard about Mini Storport. However, I don’t have any
> > guidance document or sample code to start my project .
> > If you have experience in this type of project, please kindly show me
> > some documents and guidance .
> > I’m new to windows driver development and it’s hard to look up
> > everything by myself .
> >
>
> Of course it’s hard. Drivers are not easy to write. If you are new to
> Windows driver development AND inexperienced with disk systems, then you
> are 8 or 10 months away from having a working StorPort driver to
> accomplish this task. A simple memory test driver could be completed in
> 3 or 4 weeks, even with the KMDF learning curve. An experienced driver
> writer could have something running in half that time.
>
> > >>[From Tim Roberts
]
If you want to exercise the memory on your
> > board, then the right way is to write a small driver that does exactly
> > that. Just write some memory tests.
> >
> > I got the requirements to make such driver . So , I must investigate
> > how to do it . Please, kindly help me if you experienced this .
> >
>
> Doron is exactly right. Your requirements are flawed, and as an
> engineer it is your responsibility to point this out, rather than
> blindly follow misguided instructions.
>
> Here is a bad requirement:
> 1. Memory on the device should be exposed as a disk drive so memory can
> be exercised
>
> Here is a good requirement:
> 1. Access to and operation of device memory must be thoroughly tested.
>
> –
> Tim Roberts, xxxxx@probo.com http:
> 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
>
>
> — 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</http:>

Dear Calvin Guan,

??? I’ll investigate more about HBA mini port driver and
may be I’ll need your support next time.

>[From Calvin Guan] 5) you maybe able to find a working sample miniport from OSR

I can’t find it on OSR now .
If you know the link , please share with me .

Thank you very much for your guidelines.

Best Regards
HanNguyen

— On Sat, 6/18/11, Calvin Guan (news) wrote:

From: Calvin Guan (news)
Subject: Re: [ntdev] About import PCI Express Memory into disk on PC
To: “Windows System Software Devs Interest List”
Date: Saturday, June 18, 2011, 10:21 AM

If you really want to go this route, you don’t write a ram disk driver. Instead, you write a HBA miniport driver (storport or scsiport) with a LUN that is backed by your memory exposed to the PCI bar.

1) download the latest DDK from Microsoft, you need it to compile the driver.

2) read the storport doc on line at: http://msdn.microsoft.com/en-us/library/ff567543(v=VS.85).aspx
3) Pay attention to how to fill up various structures in DriverEntry and HwFindAdapter routines, how to extract CDBs from SRBs etc.

4) For SRB_EXECUTE_SCSI, at minimum, you need to support INQUIRY, TUR, STOP_START_UNIT, READ, WRITE, VERIFY, READ_CAPACITY.
5) you maybe able to find a working sample miniport from OSR. I have not seen the sample but I heard it’s pretty good. You can also start from a DDK storport miniport sample, gradually get rid of all code that’s irrelevant to you. That would save laborious typing unless you are a typist by trade:)

good luck,
Calvin

On Fri, Jun 17, 2011 at 6:28 PM, Nhat Han wrote:

Dear Tim Robert, Doran, Calvin Guan,

I got your answer with some different ideas :
-----------------------------------------------------------------

[1] Not continue to implement [Tim Robert & Doron]
? - Reason :
??? * Access to and operation of device memory must be thoroughly tested
??? * Exposing device memory as a disk is a bad bad idea [Doron]

[2] Continue to implement [Calvin Guan]
? # Reason :
??? * We can implement within 2 days in case of understanding (SCSI commands)
-----------------------------------------------------------------

I’d like to make clear my requirement . I didn’t intend to verify my memory device
by only implementation of disk on PC. But here’s the story
:

[1] For verification of my memory device, I separated into 2 parts :
??? 1.1.? Test by using multiple READ/WRITE commands ( can access configuration space, any memory space )

??? 1.2?? Implement disk on PC

So, my memory device is already tested carefully in 1.1 . But I need to implement
1.2 because it’s easy to show the DEMO to customer . So, I don’t think that I must change my idea or ask my customer to change the request .

? ? ? ? ? ?? I have some experience about working with USB and I also know SCSI commands ( INQUIRY, READ10, WRITE10 ) . However , this is a story :

? [Host PC]--------------> [USB 2.0 device]

In USB2.0 device, it implements functions and flows of receiving commands( INQUIRY, READ10, WRITE10 …) from Host and returning the data . This is
controlled by ATAPI ( I remember ) . This means : When USB device receive CBW ( 13Bytes) , it must decode to know what commands it receives and the states that it’s inside .

??? With my current project about PCIe, I need that Host PC is active in controlling device and device only receive READ/WRITE commands .It doesn’t understand READ10 or WRITE10 but Host PC has driver for controlling such issues .

//------------------
I know that? the sample of WDK “RAM disk driver” also does something like that ,
but I don’t know what to modify from that sample for my requirement.

If possible, would you please instruct me some steps to do ?

Thank you very much !

Best Regards
HanNguyen

— On Sat, 6/18/11, Calvin Guan (news) wrote:

From: Calvin Guan (news)

Subject: Re: [ntdev] About import PCI Express Memory into disk on PC
To: “Windows System Software Devs Interest List”

Date: Saturday, June 18, 2011, 12:56 AM

Not to say if it’s the idea is good or bad… but a basic memory-back storport or scsi miniport is very very very easy.
?One has moderate experience in windows driver and knows basic scsi commands (inquiry, read10 write10, read capacity?and such) should need no more than 2 days to get it working (able to format, read and write, suspend, resume…) by typing every line of?code by bare fingers.

?If you were just try to exercise the target access on your pci devices, you can just do it from windbg by using the bang dd and bang ed commands.
?Good luck,
Calvin
?
On Fri, Jun 17, 2011 at 10:34 AM, Tim Roberts wrote:

Nhat Han wrote:

>

> I got it . I also heard about Mini Storport. However, I don’t have any

> guidance document or sample code to start my project .

> If you have experience in this type of project, please kindly show me

> some documents and guidance .

> ?I’m new to windows driver development and it’s hard to look up

> everything by myself .

>

Of course it’s hard. ?Drivers are not easy to write. ?If you are new to

Windows driver development AND inexperienced with disk systems, then you

are 8 or 10 months away from having a working StorPort driver to

accomplish this task. ?A simple memory test driver could be completed in

3 or 4 weeks, even with the KMDF learning curve. ?An experienced driver

writer could have something running in half that time.

> >>[From Tim Roberts*]* If you want to exercise the memory on your

> board, then the right way is to write a small driver that does exactly

> that. ?Just write some memory tests.

>

> I got the requirements to make such driver . So , I must investigate

> how to do it . Please, kindly help me if you experienced this .

>

Doron is exactly right. ?Your requirements are flawed, and as an

engineer it is your responsibility to point this out, rather than

blindly follow misguided instructions.

Here is a bad requirement:

1. Memory on the device should be exposed as a disk drive so memory can

be exercised

Here is a good requirement:

1. Access to and operation of device memory must be thoroughly tested.



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


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

> Do you know how to do this ?

STORPORT’s virtual miniport.

This is the solution on post-XP, on XP you will need to do some hacks, since SCSIPORT IIRC cannot work with interrupt-less devices, and there is no STORPORT on XP.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

>(storport or scsiport) with a LUN that is backed by your memory exposed to the PCI bar.

Can SCSIPORT work without interrupts?


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

certainly sir Shatskih.
On Wed, Jun 22, 2011 at 12:10 PM, Maxim S. Shatskih
wrote:

> >(storport or scsiport) with a LUN that is backed by your memory exposed to
> the PCI bar.
>
> Can SCSIPORT work without interrupts?
>
> –
> Maxim S. Shatskih
> Windows DDK MVP
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> —
> 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
>