Reg Bios Runtime calls

Only for programmers and BIOS gurus with technical questions.
Post Reply
padmarao
New visitors - please read the rules.
Posts: 1
Joined: Tue Feb 02, 2010 1:57 pm

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
melody
New visitors - please read the rules.
Posts: 1
Joined: Sat Mar 27, 2010 9:58 pm

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.
maman
Master Flasher
Posts: 173
Joined: Sun Mar 31, 2002 2:08 pm
Location: Taka Bonerate National Park, Indonesia
Contact:

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:
sharky
BIOS Newbie
Posts: 27
Joined: Wed Oct 07, 2009 2:29 pm

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.
vid
New visitors - please read the rules.
Posts: 4
Joined: Wed Oct 13, 2010 4:47 pm

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.
Post Reply