ATA(short for AT Attachment), also known as IDE, is commonly used as a synonym for PATA(parallel ATA). Its successor is SATA(serial ATA), which is currently in use as a standard. Because ATA/IDE was originally developed for and limited to hard drives, an extended protocol called ATAPI (ATA Packet Interface) has been introduced which wraps SCSI commands in ATA packets to connect to a variety of other devices like CD/DVD-Drives.
Questions tagged [ata]
52 questions
1
vote
1 answer
Questions about ATA
Now I wanted to implement ATA PIO and ATA DMA (PCI bus mastering) drivers. I read the OSdev wiki pages for them and after a whole day of messing around with it I finally understood a lot about ATA drives but the articles got me asking questions…

Richard--
- 44
- 8
1
vote
1 answer
xv6 boot loader: Reading sectors off disk using CHS
I've been trying to wrap my head around the C part of the xv6 boot loader (the question is below the code)
void
bootmain(void)
{
struct elfhdr *elf;
struct proghdr *ph, *eph;
void (*entry)(void);
uchar* pa;
elf = (struct elfhdr*)0x10000; …

Ivan Ivanov
- 2,042
- 1
- 19
- 28
1
vote
1 answer
Linux scsi ata cmd write or read sometimes work and sometimes didn't work when transfer length is over 1345
My code is as follows:
unsigned char cmd[16];
cmd[0] = WRITE_16;
//lba is start address
cmd[2] = (lba >> 54) & 0xFF;
cmd[3] = (lba >> 48) & 0xFF;
cmd[4] = (lba >> 40) & 0xFF;
cmd[5] = (lba >> 32) & 0xFF;
cmd[6] = (lba >> 24) & 0xFF;
cmd[7] = (lba >>…

Easyhyum
- 307
- 1
- 3
- 5
1
vote
1 answer
ATA PASS THROUGH DIRECT on SAS BUS in Windows XP
I want to send a "ATA Pass through Direct" command to a drive that is on the SAS(SATA attached SCSI) bus. The drive is SATA drive, in Windows XP(x86) envirnoment. I hoped there was a STP(SATA Tunneled Protocol) layer that would translate the ATA…

Firefox
- 11
- 4
1
vote
1 answer
ATA Trusted commands in Linux
Colleagues,
I'm implementing support for ATA trusted commands
0x5C, TRUSTED RECEIVE,
0x5D, TRUSTED RECEIVE DMA,
0x5E, TRUSTED SEND
0x5F, TRUSTED SEND DMA,
for Linux (two hosts, Fedora 12 and 14) to support self-encrypting drives. I took a code…

Dmitry Obukhov
- 31
- 1
- 6
1
vote
0 answers
What may cause a limit on SG_IO ioctl maximum sector count of a transfer?
I need to pass a direct ATA request to a hard drive (0x25, READ DMA EXT), to disobey max sector count (long story), and to bypass all possible OS caches, buffers, reorderings et al.
HDIO_DRIVE_TASKFILE IOCTL is no longer available due to libata.
I…

Pawel Kraszewski
- 225
- 1
- 8
1
vote
0 answers
Cannot write to SATA disks on AHCI controller in kernel mode program
I'm writing an experimental kernel-mode program to test some things. I want to do IO to and from a SATA disk attached to an AHCI controller. I have a C driver that previously worked on another similar project that ran on another PC I no longer have.…

Daniel Seagraves
- 181
- 4
1
vote
1 answer
How is IOCTL_ATA_PASS_THROUGH used?
I've been working on creating a program to send (preferrably arbitrary) ATA commands, and so far, the only option I've found in Windows is IOCTL_ATA_PASS_THROUGH and a related struct, ATA_PASS_THROUGH_EX using C++.
Unfortunately, I've been finding…

Smurfton
- 189
- 10
1
vote
0 answers
Write28 dosent always write to the hard drive/disk
I have a problem with this Write28() function i have , which writes to ATA Driver(HDD Driver) , in 28 Bit PIO Mode. Well , first you can see in my kernel.c++ here i call it:
ret_chr_arr file_contents=filealgo.File_to_char(sampleFile);
…

amanuel2
- 4,508
- 4
- 36
- 67
1
vote
1 answer
Sending ATA security unlock 0xF2 in Windows
I am trying to apply the recommendations from:
Sending ATA commands directly to device in Windows?
My goal is to send ATA 0xF2 (security unlock-0xF2) to the just connected via USB (usb to SATA) SSD, which was locked previously with known password.…

leonp
- 487
- 5
- 22
1
vote
0 answers
What may slow down an ATA read-verify command sent to HDD on linux?
I am writing a C program to scan hard drives using ATA read-verify(0x40) command on Linux, like what MHDD's scan does on DOS.
I issue the command using HDIO_DRIVE_TASK, and measure ioctl's block time using CLOCK_MONOTONIC.
I run the program as root,…

David Gao
- 11
- 2
1
vote
1 answer
How many physical channels SATA controller has?
Imagine a system with one SATA controller. If controller operates in IDE mode it will show up in device manager like this:
Windows XP:
IDE controller's name
Primary IDE Channel
Secondary IDE Channel
Windows >= Vista:
IDE controller's name
ATA…

igntec
- 1,006
- 10
- 24
1
vote
2 answers
Executing ATA commands on HDD from user space application using libata
I would like to send ATA command (ultimately, any supported ATA command) to my HDD (it is a SATA drive) from user space application using libata (this is possible, right?).
What I would be happy for the beginning is to preform ATA command Identify…

Przemyslaw Makowski
- 21
- 1
- 5
1
vote
0 answers
Using WRITE SECTOR(S) EXT ATA command with SCSI ATA PASS-THROUGH(16)
Welcome.
I have a problem while executing SCSI command ATA PASS-THROUGH(16) for WRITE SECTOR(S) EXT - 34h, PIO Data-Out (for WRITE DMA EXT - 35h, DMA identical result). I use kernel 2.6.39. I have one HDD(SATA) that is controlled by SCSI. I want to…

Przemyslaw Makowski
- 21
- 1
- 5
1
vote
1 answer
ATA commands to USB drive
Windows 7
C Programming
Visual C++ 2008 (in a VMWare)
I'd like to send some ATA commands (IDENTIFY DEVICE, READ NATIVE MAX ADDRESS, SET MAX ADDRESS) with DeviceIOControl to a USB hard drive. Therefore I have some questions.
As I understood, USBSTOR…

toetoe
- 37
- 1
- 5