Issuing READ_DMA_EXT doesn't work even though IDENTIFY_DEVICE works on SATA drive

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
yucarp
Member
Member
Posts: 39
Joined: Fri Dec 05, 2025 5:19 pm
Libera.chat IRC: yucarp

Re: Issuing READ_DMA_EXT doesn't work even though IDENTIFY_DEVICE works on SATA drive

Post by yucarp »

I checked a lot and it wasn't empty. I tried to read the sector 1030 and here is the contents of the sector 1030:

Code: Select all

00080c00  49 66 20 79 6f 75 20 63  61 6e 20 73 65 65 20 74  |If you can see t|
00080c10  68 69 73 20 74 68 65 6e  20 6d 75 6c 74 69 70 6c  |his then multipl|
00080c20  65 20 64 69 72 65 63 74  6f 72 69 65 73 20 77 6f  |e directories wo|
00080c30  72 6b 0a 00 00 00 00 00  00 00 00 00 00 00 00 00  |rk..............|
00080c40  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
Octocontrabass
Member
Member
Posts: 6249
Joined: Mon Mar 25, 2013 7:01 pm

Re: Issuing READ_DMA_EXT doesn't work even though IDENTIFY_DEVICE works on SATA drive

Post by Octocontrabass »

So reading other sectors works, but reading this one doesn't?

Have you checked the contents of your H2D register FIS? (Also, have you checked the struct? It's too big.)
yucarp
Member
Member
Posts: 39
Joined: Fri Dec 05, 2025 5:19 pm
Libera.chat IRC: yucarp

Re: Issuing READ_DMA_EXT doesn't work even though IDENTIFY_DEVICE works on SATA drive

Post by yucarp »

I updated the struct. Now it should be the right size. As for the H2D register's content, it seems fine. (0x407 >> 8 = 0x4) and (0x407 & 0xFF = 0x7) However, the D2H register seems to increase the value by one. LBA0 should be 0x7 but it's 0x8 instead. If you ask why I increment the count by one, it seems that sector counts start by 1 instead of 0
Octocontrabass
Member
Member
Posts: 6249
Joined: Mon Mar 25, 2013 7:01 pm

Re: Issuing READ_DMA_EXT doesn't work even though IDENTIFY_DEVICE works on SATA drive

Post by Octocontrabass »

yucarp wrote: Sat May 02, 2026 2:25 pmIf you ask why I increment the count by one, it seems that sector counts start by 1 instead of 0
Are you telling the drive to use CHS addressing instead of LBA addressing?
yucarp
Member
Member
Posts: 39
Joined: Fri Dec 05, 2025 5:19 pm
Libera.chat IRC: yucarp

Re: Issuing READ_DMA_EXT doesn't work even though IDENTIFY_DEVICE works on SATA drive

Post by yucarp »

Oh... #-o I wondered why it started at 1 instead of zero. Sorry for taking your time...
Post Reply