Page 1 of 1

Reg Bios Runtime calls

Posted: Tue Feb 02, 2010 2:04 pm
by padmarao
HI,

After the Operating System is loaded, at runtime is the OS is calling any BIOS calls and how it commuicates to BIOS ?

if anybody has idea about above question please answer


Regards
padmaRao

Re: Reg Bios Runtime calls

Posted: Sat Mar 27, 2010 10:02 pm
by melody
On protected mode OS's like Windows. mac, linux, etc it is not possible because it is erased during boot time and because your programs run on ring 3. But you can make bios calls within dos (not dos prompt in windows) dos on bare hardware.

Re: Reg Bios Runtime calls

Posted: Wed Mar 31, 2010 6:23 pm
by maman
The only possibility is through "ACPI routine calls". But, that doesn't mean the OS is communicating with the BIOS. It's only with the ACPI implementation in the BIOS. Another possibility is with the BIOS32 "PCI directory services". I'm not sure about the latter, it's probably already abandoned. But, I did see some traces for the BIOS32 "PCI directory services" in AMI BIOS binary :twisted:

Re: Reg Bios Runtime calls

Posted: Sat Apr 24, 2010 11:07 am
by sharky
For a classic BIOS and a good 32bit/64bit operating system, no direct calls to the BIOS will happen outside operating system startup. The BIOS can intercept some hardware accesses with SMM (to emulate hardware etc.), but the OS will not notice that (SMM mode is invisible to the operating system). Besides that, there is ACPI and ACPI can trigger SMM, but if you're looking for a real runtime interface that is intentionally called by a good protected mode OS, you won't find any (well, 32bit VBE maybe, but that is a grey area and should not happen if you have proper graphics drivers).

However, if you want old-style technology (BIOS calls) which has been abandoned in the late 90s, I suggest you use EFI. EFI has all those OS->BIOS call interfaces for protected mode which were abolished by OS vendors for good reason. EFI proponents claim that these interfaces are a good idea (haha) and that BIOS/EFI code is preferable to native drivers in the OS (WTF are they smoking) and that we all should abandon native OS drivers and use EFI drivers instead because EFI drivers have higher quality (rofl, people come here to have their BIOS/EFI fixed because the quality is so crappy) and are faster (all OS I know have orders of magnitude faster drivers than EFI). EFI is a bad joke, but people love it because it is "modern".
EFI does have a few advantages for malware writers, though. It is much easier to write EFI malware than it is to write BIOS malware because EFI malware can use a whole OS (yes, EFI is an OS in disguise) and even connect to the internet easily. As someone who works in the IT security industry, I love EFI because it gives me job security. As a tech lover, I hate it.

Re: Reg Bios Runtime calls

Posted: Wed Oct 13, 2010 4:51 pm
by vid
Classic BIOS (more proper term is "legacy BIOS") might be called for graphics support, in case your OS doesn't have a graphic card installed (this is implemented in the "vgasave" driver). In case of UEFI, it is called for example by "bcdedit.exe" to set NVRAM variables that control BIOS boot options / settings.

Communication mechanisms vary in different cases, you need to be more specific to get exact answer.