OSDev.org

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

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Int 13h returns controller failure on some hardware?
PostPosted: Tue Apr 06, 2021 7:54 am 
Offline
Member
Member

Joined: Tue Jul 14, 2020 4:01 am
Posts: 70
So, my own os's bootloader is suddenly saying controller failure, when it was proved to be working earlier. I initially suspected that it's the drive's problem, but after several tries with different drives, the result is the same. I did not modify the bootloader in anyway in that time period.


Top
 Profile  
 
 Post subject: Re: Int 13h returns controller failure on some hardware?
PostPosted: Tue Apr 06, 2021 8:36 am 
Offline
Member
Member

Joined: Fri Aug 26, 2016 1:41 pm
Posts: 671
Hard to say without seeing the code. You should retry 3 times on failure. You shouldn't read/write across a cylinder boundary (assuming you are on a controller that support multitrack reads/writes), you should not read/write a series of sectors across a 64KiB DMA boundary in memory (Don't read/write data across the physical addresses 0x10000, 0x20000, 0x30000).

Are you using Int 13h AH=2h for reads or Int 21h/AH=42h? Are you accessing the correct drive number?


Top
 Profile  
 
 Post subject: Re: Int 13h returns controller failure on some hardware?
PostPosted: Tue Apr 06, 2021 8:53 am 
Offline
Member
Member

Joined: Tue Jul 14, 2020 4:01 am
Posts: 70
I'm using 42h, and dl has been preserved.


Top
 Profile  
 
 Post subject: Re: Int 13h returns controller failure on some hardware?
PostPosted: Tue Apr 06, 2021 9:04 am 
Offline
Member
Member

Joined: Fri Aug 26, 2016 1:41 pm
Posts: 671
Do you have a git repository or something similar where we can look at the code? There is likely something amiss in your code or it is making assumptions that it shouldn't be making. There are suggestions that with some BIOSes that ES must match the segment in a DAP packet (although I haven't seen that on recent hardware, or on hardware I have used in the past). Are you sure the drive you are accessing supports Int 13h MS extensions (ie AH=42h) on the BIOS you are using?

Virtual environments are far more forgiving than real systems and often assumptions made made not apply to real environments.


Top
 Profile  
 
 Post subject: Re: Int 13h returns controller failure on some hardware?
PostPosted: Tue Apr 06, 2021 9:09 am 
Offline
Member
Member

Joined: Fri Aug 26, 2016 1:41 pm
Posts: 671
I assume that you are booting as hard drive or hard drive emulated media (and not floppy drive or floppy drive emulated media) on real hardware since you are apparently able to use extended BIOS extensions. If you were booting as floppy emulated media especially on USB media I could think of another issue.


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 69 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