Page 1 of 1

BIOS device drivers help me understand this clearly.

Posted: Fri May 09, 2008 5:45 pm
by Gavin
Hi I've a fairly straightforward question.

Taken from scott mueller's upgrading & repairing pc's 16th edition.
(Excellent Book btw)


Bios (basic input/output system). This refers to the collection of actual drivers used to act as a basic interface between the operating system and your hardware when the system is booted and running.
When running Dos or windows in safe mode, you are running almost solely on rom bios based drivers because none are loaded from disk
This is my understanding .(let me know where I go wrong)

Concerning safe mode.
When running windows xp in safe mode your running it in 16bit protected mode?
How come i can run firefox in safe mode?

Concerning protected mode(normal)
The bios is discarded once windows xp is fully loaded and device drivers(32bit) take over to interface with the hardware.The bios then on the motherboard cannot be used or isn't used at all untill another reboot .


I hope this question doesn't take up to much time just a simple answer is sufficient.

Thanks a lot .

Posted: Fri May 09, 2008 11:52 pm
by thepowersgang
The explanation given in the book is not quite correct. The bios provides a basic interface to the hardware via interrupt 13h (19) when the machine is in real mode.
When protected mode (32bit) is entered these functions are unavaliable but, the VGA bios functions are still usable via VBE. This is what is meant by windows using the bios while in safe mode.

However, when windows boots into safe mode some drivers are loaded into memory but theses are just the bare minimum to be able to load windows.

Posted: Sun May 11, 2008 7:52 am
by Gavin
Thanks for your explanation .
I'm learning alot everyday hope it's enough sometime to start writting my operating system.

Re: BIOS device drivers help me understand this clearly.

Posted: Fri May 23, 2008 5:54 am
by jal
Gavin wrote:
Scott Mueller wrote:When running DOS or Windows in safe mode, you are running almost solely on rom bios based drivers because none are loaded from disk
This sentence is probably in since the first incarnations of this book, and since he is talking about "DOS and Windows", we can safely assume he is talking about Windows 95. Iirc, Win95 indeed used the BIOS in safe mode, as its protected mode drivers (.VXDs) were not loaded in safe mode. We can also safely assume that in modern operating systems, the real mode BIOS is not used at all after the very early stages of booting.
Concerning safe mode.
When running Windows XP in safe mode your running it in 16bit protected mode?
16 bit protected mode is something else entirely from 16 bit real mode. It is more like 32 bit protected mode. 16 bit protected mode was introduced in the 80286 (the successor to the 8086), and made obsolete by 32 bit protected mode when the 80386 came out. It is not possible to run 16 bit real mode code in 16 bit protected mode, although it is possible to run 16 bit protected mode code in 32 bit protected mode.
How come i can run firefox in safe mode?
What an OS calls "safe mode" depends on what the OS makers consider safe. So which functionality is or is not available in safe mode cannot be predicted without knowing the finer details.
The bios is discarded once Windows XP is fully loaded and device drivers (32 bit) take over to interface with the hardware.
The BIOS is probably discarded a lot sooner, but in general you are right.
The BIOS on the motherboard cannot be used or isn't used at all untill another reboot.
If you are talking about normal BIOS then yes, you are right. Note however that there are things like SMM and and ACPI, which also resides in the BIOS, and are used by the OS or the hardware.


JAL

Posted: Fri May 23, 2008 5:14 pm
by Gavin
Thanks Jal I understand it a bit better .

Posted: Sat May 24, 2008 11:51 am
by CmpXchg
The bios is discarded once Windows XP is fully loaded and device drivers (32 bit) take over to interface with the hardware.
This brings me to a thought. I've always wondered why BIOS services are only available in real mode, why aren't there protected mode routines we could call?

In fact, there are few BIOS services, like VBE3, which you can access from protected mode. I believe there must be some more. Where can I get the full list? It would be a great advantage to have these services on hand, it would improve compatibility with hardware, wouldn't it?

Posted: Sun May 25, 2008 2:18 am
by jal
CmpXchg wrote:This brings me to a thought. I've always wondered why BIOS services are only available in real mode, why aren't there protected mode routines we could call?
Because there's no need for them. Windows and Linux, covering 99.99% of the OSes installed on a modern PC, have their own drivers. Also, it's easier updating a software driver than flashing BIOS. As well, there is no standard 'protected mode', there is 16, 32 and 64 bit protected mode, segmented and non-segmented, paged and non-paged, etc.
It would be a great advantage to have these services on hand, it would improve compatibility with hardware, wouldn't it?
I don't see why you would think that. Drivers for hardware are written by the hardware vendors. Doesn't matter whether the driver is in ROM or RAM. On the other hand, there's EFI, which does put many drivers in ROM.


JAL

Posted: Sun May 25, 2008 4:00 pm
by Gavin
Concerning EFI , can we still use the normal mbr code we use with the bios or will efi change that?

Posted: Sun May 25, 2008 4:32 pm
by neon
The bios is discarded once Windows XP is fully loaded and device drivers (32 bit) take over to interface with the hardware.
Incorrect. The BIOS is discarded after NTLDR loads the kernel mode drivers and switches back to protected mode to execute the kernel.

Posted: Tue May 27, 2008 11:19 am
by CmpXchg
jal wrote:I don't see why you would think that. Drivers for hardware are written by the hardware vendors. Doesn't matter whether the driver is in ROM or RAM. On the other hand, there's EFI, which does put many drivers in ROM.
That's a good point, but let's ask ourselves the following question:

Why aren't there any USB services? We are left to program it for each motherboard. Hardware would create drivers for the mainstream operating systems, like Windows, but what about us hobbists?

Posted: Tue May 27, 2008 1:07 pm
by jal
CmpXchg wrote:Why aren't there any USB services? We are left to program it for each motherboard.
Not at all. There are only three USB controller specifications (two for USB 1, one for USB2), two of which are used on modern motherboards. Visit the Intel site for specifications. Afaik, all chipsets out there conform to these specifications.
Hardware would create drivers for the mainstream operating systems, like Windows, but what about us hobbists?
I think you know the answer to this (rhetorical?) question yourself.


JAL

Posted: Tue May 27, 2008 1:46 pm
by CmpXchg
jal wrote:Afaik, all chipsets out there conform to these specifications.
You mean, the lowlevel access code will be exactly same (for respective specification)?
jal wrote:I think you know the answer to this (rhetorical?) question yourself.
:lol: Sure

Posted: Wed May 28, 2008 1:23 am
by jal
CmpXchg wrote:
jal wrote:Afaik, all chipsets out there conform to these specifications.
You mean, the lowlevel access code will be exactly same (for respective specification)?
Yes, that is what I understand. It's a standard, just like e.g. ATA or PCI.


JAL