OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 2:38 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Reading a LBA 28-bit sector with the int 13h extensions
PostPosted: Tue Nov 01, 2022 1:46 pm 
Offline

Joined: Thu Mar 31, 2022 1:39 pm
Posts: 4
I need to read a sector using LBA 28-bit in the BIOS and i've read (here: https://wiki.osdev.org/Disk_access_using_the_BIOS_(INT_13h)#LBA_in_Extended_Mode) that you can do that thanks to the "int 13h Extensions" with the function 0x42 but i need to set up a "Disk Address Packet Structure" but the article assumes that the address is 48-bit.
Is there a way to use the 28-bit counterpart?
Thanks in advance


Top
 Profile  
 
 Post subject: Re: Reading a LBA 28-bit sector with the int 13h extensions
PostPosted: Tue Nov 01, 2022 2:18 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
The article is wrong. The LBA in the disk address packet is always 64 bits, not 48 bits.

You don't need to specify 28-bit LBA. The BIOS is smart enough to figure that out on its own.


Top
 Profile  
 
 Post subject: Re: Reading a LBA 28-bit sector with the int 13h extensions
PostPosted: Tue Nov 01, 2022 2:39 pm 
Offline

Joined: Thu Mar 31, 2022 1:39 pm
Posts: 4
Octocontrabass wrote:
The article is wrong. The LBA in the disk address packet is always 64 bits, not 48 bits.

You don't need to specify 28-bit LBA. The BIOS is smart enough to figure that out on its own.

so, if i understand correctly, i have to use only the lower 32-bits in the DAP obliterating the last entry: the upper 16-bits


Top
 Profile  
 
 Post subject: Re: Reading a LBA 28-bit sector with the int 13h extensions
PostPosted: Tue Nov 01, 2022 4:08 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
Yep, if you want 28-bit LBA use only the lower 28 bits and set the remaining 36 bits to zero.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot] and 58 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group