This source should contain anything related to
the physical properties of a CD/DVD drive like
mechanical capabilities, formats supported as well as
handling of the underlying images.
SCSI devices don't need that because it's usually stored
internally and returned during REQUEST SENSE command.
On the contrary, ATAPI devices always report sense key
in the upper bits of the error register.
ATAPI devices should NOT implement ATA IDENTIFY DRIVE
command (ECh) to avoid their false identification as ATA
drives. They should implement ATAPI IDENTIFY DEVICE
command (A1h) instead.
This reverts commit da7c8a4579.
- Make the method call less confusing.
- Use cur_host instead of passing cmd_struct.
- Pass a boolean to differentiate LOAD_QUAD and STORE_QUAD.
- Use xfer_size instead of req_count for res_count.
- Don't LOAD_QUAD to read-only DBDMA command.
Happened to notice that we were not marking the framebuffer as dirty
when doing this update. Liekly not an issue in practice since there are
usually other updates, but might as well be correct.
Implement the accelerated same-format source-copy operation (used by the
Mac OS X Public Beta when dragging windows).
Supports raw 8, 15, 16, and 32 bpp copies. Rejects unsupported mixes,
format conversions, partial write masks, color comparison, and source
trajectory modes.
Implement push_data in AtaBaseDevice using the device transfer buffer and
post-transfer callback.
Advance the read data pointer across DMA pulls so a transfer can span
multiple DBDMA descriptors, and clear the DMA state when transfers finish.
Mac OS X Public Beta commonly drives one ATA DMA transfer through
multiple DBDMA descriptors, so a single ATA pull can be smaller or larger
than the current descriptor request without indicating an error.
Reduce the logging level to avoid logspam during boot.
We were treating resCount as a "result" count, but it's actually a "residual"
count that reports how many bytes from a descriptor were not transferred
when processing a command. We now correctly handle partial descriptors.
This ended up being necessary for the 10.0 public beta bringup too (the
`AppleUltra66ATA::stopDma` implementation in xnu-103 computes the number
of bytes transferred by subtracting `resCount` from `reqCount`).
If queue_len is a flag to determine when data is queued, then it
probably should be set last so that the other fields are valid when
another thread decides to act on the queued data.