OSDev.org

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

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: How to access ALL the mass storage devices through BIOS?
PostPosted: Wed Jan 16, 2019 6:29 am 
Offline

Joined: Wed Jul 27, 2016 5:37 am
Posts: 9
Hi!
E.g. with INT 13, AH=0x42, I can read a mass storage device. The "drive number" of the boot device is provides through DL to the bootstrap code.
But is there a way I can list all the other mass storage devices attached (HDDs, SDDs, USB drives), identify them and get their drive numbers?
It seems like a standard question, but I looked for it, and maybe I was just too stupid to find the answer?
Thank you for your help.


Top
 Profile  
 
 Post subject: Re: How to access ALL the mass storage devices through BIOS?
PostPosted: Wed Jan 16, 2019 6:49 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
You can't access all storage devices through the BIOS. You can only access the storage devices the BIOS knows how to access.

You can find out how many of those there are by reading the byte at address 0x475 (in the BDA). Drives are numbered sequentially, starting at 0x80.

After that, you can use whichever INT 0x13 calls you want to identify the drives.


Top
 Profile  
 
 Post subject: Re: How to access ALL the mass storage devices through BIOS?
PostPosted: Wed Jan 16, 2019 7:41 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9301
Location: On the balcony, where I can actually keep 1½m distance
Octocontrabass wrote:
You can only access the storage devices the BIOS knows how to access.
... and then only whatever it is willing to present to you. Expect having just your boot drive and one (other) harddisk.

_________________
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: Amazonbot [bot], DotBot [Bot] and 31 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