You are absolutely right. I was answering MATS question regarding what
it would take to do it.
MKE.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Wednesday, January 26, 2005 3:52 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Please help me on device configuration
Of course you can write your own driver to take ownership of the ata
ports, but then once you do that, you must implement the entire ataport
driver and its functionality b/c you own these resources outright. What
you propose is a model to implement an entire controller driver in a
limited environment. This is a bit like killing a fly with boulder.
Possible, but not entirely worth your time for such a limited goal.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Eschmann, Michael
K
Sent: Wednesday, January 26, 2005 3:46 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Please help me on device configuration
So I agree with Phil’s response of requesting MS to fix their ATA pass
through ioctl, but if you are really interested in your own driver I
would suggest developing a SCSI Miniport as this is a documented
interface for the production NT-based OS’s. First off, note that this
is not trivial, and will suck all avaialble time for many man-months.
But here is my take, given I’ve done this I hope my experience is
typical of others that have done this.
The install is the least of your problems. You can take an INF for
various port-level drivers and replicate most of what they have. Using
the device manager, you can do a “Have Disk” update of the ATA
controller. Make sure you have a “ExcludeFromSelect” in the
[ControlFlags] block for your device so it won’t try to override your
driver with the native OS driver. The device identification string must
minimally include the vendor id, device id and class code identifiers.
StartType must be “SERVICE_BOOT_START” and LoadOrderGroup must be “SCSI
Miniport”. The DDK inf descriptions are adequate, but you will need to
spend plenty of time to familiarize yourself with it.
The driver you develop gets linked to scsi port library, which there is
a library for this in the ddk to link to. I started with the NT4 DDK
sample, but you have to add all the DMA engine code and any special
support for your device. Scsi Miniport’s don’t have all the PNP and PM
support of a full-port driver, but by the sound of your task you
probably don’t need any of this. Developing this sort of driver takes
time if you don’t have something to start with, and I mean “way more”
than a week or two! Your mileage may vary depending on s/w experience.
The only device out there with any available documentation on how the
hardware works is the Intel Parallel and Serial ATA engines, and you can
find the ICH Programmers Reference Manual for each at the following
URL’s: http://www.intel.com/design/chipsets/manuals/298600.htm
http://www.intel.com/technology/serialata/ahci.htm.
So, yes, you can write your own driver to take ownership of the ATA
ports, if you have the internal fortitude to attack the problem. Maybe
Peter Wieland will pipe-up on this topic.
No matter what avenue you choose, good luck to you.
MKE.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mats PETERSSON
Sent: Wednesday, January 26, 2005 6:54 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Please help me on device configuration
If this is for testing your own devices, rather than selling to
customers
for testing the customers hard driver, I think the following solution is
suitable.
It sounds like what you need here is a specific test-driver, that is
replacing the driver for that particula IDE interface.
This will of course only work if you have more than one IDE controller
(more than two IDE ports) in the same machine.
So, you need to write a driver that supports your own IOCTL calls. It’s
not
necessarily needed to support the standard operations of a hard disk, as
you’re not intending to use this hard disk for proper file systems, I
presume.
You can program IOCTL calls to do whatever you like to do, so there’s no
reason why you should have any limitation on what function you want
performed. Of course, it will give a much easier future updating service
if
all you have in the driver is pretty simple functionality, and all the
compex stuff (like reading back and comparing a written buffer) is done
in
the user-mode application.
I’m not sure how you install such a driver (i.e. how you convince
Windows
that your driver should replace the current IDE driver with your
driver),
but I’m pretty sure there is someone on this list that can give advice
on
this.
If you’re planning on doing a product for the purpose of “customers
testing
their hard-disk”, then I have no direct suggestions.
–
Mats
xxxxx@lists.osr.com wrote on 01/26/2005 08:40:46 AM:
Hi,
Thanks for your answer.
Here is the complete history of our problem:
We are trying to send vendor specific and standard ATA commands to a
storage device for testing. Our application used
DeviceIoControl(Passthrough IOCTL) in sending these commands but
some functions does not work specially write commands. Because of
this we decided to create a filter driver that will make sure that
these commands will be sent to the device. What we did is we
connected this filter driver to edisk.sys. And then if everything
went correct during initialization the commands will be sent using
WRITE_PORT… But unfortunately it does not… So now we are trying
to solve this problem… This is the first time we coded a device
driver… and it is completely different from user mode programming…
Thanks again,
Khryss
Peter Wieland wrote:
> you won’t be able to do this.
>
> The port driver owns the controller and (rightly) expects to have
> exclusive access to it. You can’t synchronize with the port
> driver’s register access (and i don’t want to start a big discussion
> about how a good OS would let you do this, or about odd hacks to get
> around it) you cannot access the ATA registers yourself.
>
> If you explain what you’re trying to accomplish by doing this
> someone here may be able to suggest an alternative.
>
> -p
>
> From: xxxxx@lists.osr.com [mailto:
> xxxxx@lists.osr.com] On Behalf Of Christopher Flordeliza
> Sent: Monday, January 24, 2005 7:43 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Please help me on device configuration
> Hi all,
>
> Please help me on this problem: I created a win2k filter driver
> attached to the upper part of disk.sys. During reception of
> IRP_MN_START_DEVICE I set the status of my IRP to STATUS_SUCCESS
> then send it to the lower stack. My problem is, during successful
> return, when I try to get the resource descriptor address I always
> get NULL. I do not know why NULL is always returned. I checked the
> address of IRP’s parameter field before and after the sending to the
> next stack, and both are NULL. BTW, I am trying to get the Interrupt
> and Port resources from the PNP manager.
>
> We need to filter some ATA commands sent to a disk and then send it
> directly to the storage device using the resources sent by PNP
> manager without passing the lower layer of the stack.
>
> Thanks in advance
> Khryss
> Yahoo! Messenger - Communicate instantly…“Ping” your friends today!
> Download Messenger Now — Questions? First check the Kernel Driver
FAQ
at
> http://www.osronline.com/article.cfm?id=256 You are currently
> subscribed to ntdev as: xxxxx@windows.microsoft.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com
> —
> Questions? First check the Kernel Driver FAQ at http://www.
> osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag
argument:
‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
> Yahoo! Messenger - Communicate instantly…“Ping” your friends today!
> Download Messenger Now — Questions? First check the Kernel Driver
FAQ
at
> http://www.osronline.com/article.cfm?id=256 You are currently
> subscribed to ntdev as: xxxxx@3dlabs.com To unsubscribe
> send a blank email to xxxxx@lists.osr.com
> ForwardSourceID:NT0000B9EA
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@intel.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com