Opened 15 years ago

Closed 15 years ago

Last modified 13 years ago

#33 closed enhancement (fixed)

ATA driver

Reported by: Martin Decky Owned by: Jiri Svoboda
Priority: major Milestone:
Component: helenos/unspecified Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:

Description

Implement ATA driver.

Change History (7)

comment:1 by Martin Decky, 15 years ago

Owner: set to Martin Decky
Status: newaccepted

comment:2 by Jiri Svoboda, 15 years ago

Component: unspecified
Owner: changed from Martin Decky to Jiri Svoboda
Status: acceptedassigned

A prototype driver has been implemented. However, it needs to be tested with real hardware, at the very least.

comment:3 by Jiri Svoboda, 15 years ago

After #head,7 the ATA driver seems to be working with real hardware. I tried it with my ancient WDC 11200 hard disk (1281.9 MB, 2484 cyl / 16 heads / 63 spt virtual geometry). Since the driver uses CHS mode, it is a question how it would interact with large drives. It might work theoretically, as the cylinder number is written to a 16-bit register, so it might theoretically allow 30 GB disks to work (if your disk is larger, it will almost surely not be fully accessible).

If you want to try this, only ever try it with a volatile hard disk, never with your production disk!

comment:4 by Jiri Svoboda, 15 years ago

As of #head,32 the ATA driver should support 28-bit and 48-bit LBA, allowing devices of up to 120 PB with 512-byte blocks — enough for any currently existing hard disk, right? :-)

Currently the most serious limitation is probably speed. The driver does not use interrupts, only polling and it uses async_usleep() to time its polling timeout.

comment:5 by Jiri Svoboda, 15 years ago

On 32-bit platforms, the block indices will unfortunately be cropped to 32 bits when passing through the IPC interface and then to 31 bits, being stored in off_t. Thus the largest device size that has a chance to work is 1 TB. This should be fixed. Also, need to perform tests that the various coordinate transformations (CHS, LBA-28, LBA-48) work as intended.

comment:6 by Jiri Svoboda, 15 years ago

Resolution: fixed
Status: assignedclosed

Since #head,48 the block layer has been fixed to use 64-bit block sizes. Now full 48 bits of ATA addressing space are available. Of course, MBR partitioning scheme uses 32-bit addresses, which only allows for disks up to 2 TB, larger cannot be labeled with MBR. Also keep in mind that FAT16 partitions have a rather limited size.

It would be nice for the driver to support interrupts and DMA and have better handling of timeouts, but still it works (on real hardware, too), so I am closing this task.

comment:7 by Jakub Jermář, 13 years ago

Type: taskenhancement
Note: See TracTickets for help on using tickets.