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
19
votes
3 answers
Sending ATA commands directly to device in Windows?
I’m trying to send ATA commands to a physical disk in Windows, and get the response from the device.
Note: In this case I want to send the IDENTIFY DEVICE (0xEC)
command. The device will respond with
a 512-byte block of data. (In
particular…

Ian Boyd
- 246,734
- 253
- 869
- 1,219
5
votes
1 answer
What is the proper way to acknowledge an ATA/IDE interrupt?
I am currently working on a hobby OS, specifically the ATA driver. I am having some issues with PIO data-in commands with interrupts. I am trying to execute the READ MULTIPLE command to read multiple sectors from the drive, block by block, with an…

Mr. Shickadance
- 5,283
- 9
- 45
- 61
5
votes
3 answers
ATA Trusted commands-How to set libata allow_tpm
I want to send trusted send/trusted receive to my hard drive. I found this page:
ATA Trusted commands in Linux.
(Thanks you ephemient and Dmitry Obukhov).
For now, my trouble is how to set libata allow_tpm = 1.
I'm using Ubuntu 13.10. My code is…

tdQuang
- 59
- 1
- 1
- 4
3
votes
2 answers
What are the PATA/IDE status codes, and what do they mean?
I'm writing an OS for fun and I'm trying to write a PATA/IDE driver to access the disk, however it is not working. I have this line unsigned char status = port_byte_in(ATAPort + COMMANDPORT); which returns the value of 88 (decimal). As this might be…

Jachdich
- 782
- 8
- 23
3
votes
0 answers
0xFF when reading ATA state register
I am trying to setup simple PIO access to my hard drive but I've hit a wall on the very first step towards the goal.
First step to working with ATA device is to read it's state register and wait until it's BSY (7th) bit is low. I've got the program…

MarengoHue
- 1,789
- 13
- 34
3
votes
1 answer
Bypassing I/O scheduling and linux kernel page buffering
What I wanna trying to accomplish:
Developing an linux application in C language, that "exclusively" accesses a
PATA/SATA hard disk drive(HDD) to send ATA commands(in fact only those ATA commands that
do not modify any byte on HDD accessed - eg.…

jacks
- 294
- 3
- 15
2
votes
1 answer
What does the function insl do in Os Dev's PCI IDE tutorial?
This is the function that call's insl.
void ide_read_buffer(unsigned char channel, unsigned char reg, unsigned int buffer,
unsigned int quads) {
/* WARNING: This code contains a serious bug. The inline assembly trashes ES…

mike
- 100
- 7
2
votes
1 answer
LBA level disk access
What's the best way to issue disk commands (read k blocks from lba n etc.) to a SATA disk? The choice of OS does not matter. I also need to be able to issue ATA commands. I would rather do this through a tool/application than use ioctls…

hojusaram
- 497
- 1
- 6
- 13
2
votes
0 answers
ATA IDE IDENTIFY
I am trying to develop ide ata driver for my os learning .. i am facing a problem that after sending IDENTIFY CMD the system hang up with no panic ..!
i am using the below code
/* ATA specs say these values must be zero before sending IDENTIFY…

Ahmed F. Mostafa
- 137
- 9
2
votes
1 answer
ATA TRIM Specification?
Anyone know where I'd find an ATA reference that details the protocol for triggering a TRIM? I'm looking to discover what sort of structure/object/data I'd need to send in a raw IOCTL to get an ATA device to trigger a TRIM (assuming appropriate…

Mahmoud Al-Qudsi
- 28,357
- 12
- 85
- 125
2
votes
1 answer
How to read a large disk(like 1 ,2 TB) using ATA commands through DeviceIoControl funtion?
I want to read a large capacity disk using ATA commands sending though DeviceIoControl(). Sending commands using ATA_PASS_THROUGH_EX structure is the main problem. Actually CurrentTaskFile[] arary of UCHAR type is not able to send a sector no…

Sam
- 61
- 1
- 10
2
votes
0 answers
Writing ATA driver LBA28 messed with LBA48
I'm currently trying to get LBA working for my ATA driver, but I have problem.
My identify function returns OK and word 83;bit 10 of returned identification data is set, so my device supports LBA48. But when I try to get total amount of LBA48…

user35443
- 6,309
- 12
- 52
- 75
2
votes
0 answers
Sending IDENTIFY DEVICE COMMAND - ATA PASS THROUGH on raid - SSD
My aim is to detect Solid State Drives in systems with raid configuration. Using smartmontools' following command I observe bit 434 (217) shows value 1 for SSD: smartctl -i -r ataioctl,2 /dev/csmi0,0
Attempting to read the same 512 bytes of data I…

pp99
- 23
- 1
- 7
1
vote
1 answer
Unable to read from status port in ATAPIO mode
I recently got interested in developing my own operating system for fun. While creating the OS and the drivers, I encountered several issues while making the ATA driver. One of the major issues is that if I try to request ATAPIO to read an address…

moonasteroid
- 65
- 1
- 5
1
vote
0 answers
udevadm and ATA Addressing
In udevadm info /dev/sda, why are different ata values provided and which one is the preferred/more accurate address?
...
N: sda
S: disk/by-path/pci-0000:00:1f.2-ata-1.0
...
E:…

Will Roberts
- 79
- 7