xxxxx@googlemail.com wrote:
My goal is to try and write/modify a USB mass storage device code so that I can get at the physical memory.
It’s not memory. You cannot think of a USB mass storage device as
memory. The USB Mass Storage Class specification requires that such
devices behave like disk drives. The lowest-level protocol to the
device is the SCSI disk command set: read sector, write sector, etc.
You must stop thinking of them as memory.
From my understanding , a device driver interacts with the OS, which gives the device driver the logical location on the disk (of a file when requested).
It is far more complicated than that. Applications make open, read, and
write requests to the operating system. The system passes those to a
file system driver (like NTFS), which knows nothing about the underlying
device. The file system driver reads and writes the file system tables
on the disk, and uses those to find the sector numbers for a particular
file. It makes requests of the disk driver, which turns those sector
requests into hardware commands and passes them to the bus driver. The
bus driver sends those commands on to the USB device.
What I want to try and do is get under this (I assume using a lower level filter driver) and change it so that it gives me the physical location instead.
Physical location of what?
Normally it is the HAL that does this, but my ultimate goal is to try and get the USB device driver to bring me back the physical location.
As Don said, there’s no HAL here. The file system driver is the one
that comes up with the sector numbers to read and write. The USB Mass
Storage driver turns those into SCSI commands and sends them to the
device, which returns the sectors up the stack.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.