How to know if a machine uses EFI or BIOS?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Kunalnitin
Posts: 7
Joined: Thu Jul 28, 2011 6:10 am

How to know if a machine uses EFI or BIOS?

Post by Kunalnitin »

This is a very basic question. I tried to Google for it but couldn't get a proper answer.
1. Is there any boot-time message from which I can tell if the machine is using EFI or old good BIOS?
2. Is there a way to know from make/brand of machine if the machine uses EFI or BIOS so that I can buy correct stuff?
User avatar
mark3094
Member
Member
Posts: 164
Joined: Mon Feb 14, 2011 10:32 pm
Location: Australia
Contact:

Re: How to know if a machine uses EFI or BIOS?

Post by mark3094 »

I'm not sure if this will help to answer your question, but have a look here:

http://www.uefi.org/about/

In particular:
Q: Does UEFI completely replace a PC BIOS?
A: No. While UEFI uses a different interface for "boot services" and "runtime services", some platform firmware must perform the functions BIOS uses for system configuration (a.k.a. "Power On Self Test" or "POST") and Setup. UEFI does not specify how POST & Setup are implemented.
I think this is saying that there will still be a BIOS (perhaps emulated), so in answer to your second question, I don't think you will need to make buying decisions around whether a particular machine has a BIOS

You may also want to check out this thread:
http://forum.osdev.org/viewtopic.php?f=1&t=23901
Kunalnitin
Posts: 7
Joined: Thu Jul 28, 2011 6:10 am

Re: How to know if a machine uses EFI or BIOS?

Post by Kunalnitin »

Hey Mark,

Thanks for your reply. I do agree with your thought as I also think that BIOS can NOT be completely removed from the future systems. Even those systems which have EFI today use many BIOS services by emulating them.

Coming back to my question--actually I am working on a research project where I need machine that has EFI (doesn't matter if it also has BIOS). So I wanted to know a method to identify if a machine has EFI in it or not. I need this for both choosing correct machine in my lab as well as for buying a new one.
User avatar
Jonatan44
Posts: 24
Joined: Fri Sep 11, 2009 1:22 am

Re: How to know if a machine uses EFI or BIOS?

Post by Jonatan44 »

I don't know for sure, maybe SMBIOS will give you the answer.
Most of today UEFI-enabled machine use the hybrid approach witch means first boot from UEFI file (/EFI/BOOT/BOOTX64.EFI or something like that) and then if the UEFI boot file is not there boot from MBR in the old BIOS approach.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: How to know if a machine uses EFI or BIOS?

Post by Brendan »

Hi,
Kunalnitin wrote:2. Is there a way to know from make/brand of machine if the machine uses EFI or BIOS so that I can buy correct stuff?
If you want to make sure a computer does support EFI before buying it, then (apart for Apple's 80x86 systems which all have EFI) it'd be best to do a little research on the motherboard's features. Most motherboard manufacturer's web sites have product information that should mention EFI support (if the product supports EFI), so it shouldn't be too hard to find something that definitely does support EFI.

Note: As far as I know, most/all "higher end" motherboards made by Intel in the last few years do support EFI; and all motherboards (from any manufacturer) that is designed for "Sandy Bridge" CPUs should also support EFI.


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
amitr0
Posts: 7
Joined: Wed Nov 16, 2011 3:54 pm

Re: How to know if a machine uses EFI or BIOS?

Post by amitr0 »

hello,

i have a similar issue as discussed here, just that i need to find from a running os (windows) whether the underlying firmware is EFI or legacy BIOS. how can i do that?

thanks

amitr0
ACcurrent
Member
Member
Posts: 125
Joined: Thu Aug 11, 2011 12:04 am
Location: Watching You

Re: How to know if a machine uses EFI or BIOS?

Post by ACcurrent »

Check out your vender specs. As for OSdev, the EFI looks for the boot loader in a FAT formatted device in a folder named Boot no boot sectors. If you want a good EFI machine get a mac.
Get back to work!
Github
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Re: How to know if a machine uses EFI or BIOS?

Post by neon »

Considering Windows does not yet utilize UEFI on PCs its safe to assume the machine uses the BIOS. If the question is related to Windows 8, you'll just have to wait until its released to see. I'm betting the information could be found in msinfo32.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: How to know if a machine uses EFI or BIOS?

Post by Brendan »

Hi,
neon wrote:Considering Windows does not yet utilize UEFI on PCs its safe to assume the machine uses the BIOS. If the question is related to Windows 8, you'll just have to wait until its released to see. I'm betting the information could be found in msinfo32.
Windows has supported UEFI on 64-bit 80x86 machines since Vista Service Pack 1, which was released in 2008. I don't think Microsoft will ever support UEFI on 32-bit 80x86 though.


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
amitr0
Posts: 7
Joined: Wed Nov 16, 2011 3:54 pm

Re: How to know if a machine uses EFI or BIOS?

Post by amitr0 »

Brendan wrote:Hi,


Windows has supported UEFI on 64-bit 80x86 machines since Vista Service Pack 1, which was released in 2008. I don't think Microsoft will ever support UEFI on 32-bit 80x86 though.


Cheers,

Brendan

Not true, Win8 is coming with 32 bit UEFI support too.

ANyway, that is beside the current topic. So there are no known APIS or hacks to find this out is there?
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: How to know if a machine uses EFI or BIOS?

Post by Brendan »

Hi,
amitr0 wrote:
Brendan wrote:Windows has supported UEFI on 64-bit 80x86 machines since Vista Service Pack 1, which was released in 2008. I don't think Microsoft will ever support UEFI on 32-bit 80x86 though.
Not true, Win8 is coming with 32 bit UEFI support too.
I just tried to find anything to confirm that, and failed.

I also can't see any reason for Microsoft to bother with 32-bit UEFI - all of the newer systems that have UEFI are 64-bit; and if Microsoft did have a reason to care they would've done it back in 2008 (or possibly even in Win7) when it was more important (e.g. when people were more likely to use 32-bit machines).
amitr0 wrote:ANyway, that is beside the current topic. So there are no known APIS or hacks to find this out is there?
The topic was "if people (not software) can determine if a system supports UEFI before purchasing it".

An EFI boot loader uses EFI, and if there's an "EFI emulation" layer sitting on top of traditional BIOS firmware there's no way to tell (and no way for the boot code to force the system back in to "PC BIOS mode" either).

A PC BIOS boot loader uses PC BIOS, and if there's a "BIOS emulation" layer sitting on top of UEFI firmware there's no way to tell (and no way for the boot code to force the system back in to "UEFI mode" either).


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
User avatar
turdus
Member
Member
Posts: 496
Joined: Tue Feb 08, 2011 1:58 pm

Re: How to know if a machine uses EFI or BIOS?

Post by turdus »

Lazy way:
- Go to BIOS setup, if you see "UEFI support yes/no" option, you're good.
- boot the machine without OS, if it complains about "PMBR" not "MBR", you're good too.

Correct way:
- boot a linux livecd, and use acpidump tool. It contains "UEFI boot optimalization table" on EFI-capable machines since 2006, ver 3.0b.

Bullet-proof way:
- create a bootable media with efi-grub. If it boots, the machine is EFI-capable for sure.
amitr0
Posts: 7
Joined: Wed Nov 16, 2011 3:54 pm

Re: How to know if a machine uses EFI or BIOS?

Post by amitr0 »

Here is a good way I found...

http://msdn.microsoft.com/en-us/library ... s.85).aspx

thanks all for the help

AB
User avatar
JAAman
Member
Member
Posts: 879
Joined: Wed Oct 27, 2004 11:00 pm
Location: WA

Re: How to know if a machine uses EFI or BIOS?

Post by JAAman »

thats not going to work:
Firmware variables are not supported on a legacy BIOS-based system. The GetFirmwareEnvironmentVariable function will always fail on a legacy BIOS-based system or if Windows was installed using legacy BIOS on a system that supports both legacy BIOS and UEFI.
therefore, it can only be used to identify whether windows is using EFI not whether the firmware supports EFI

many systems where EFI is supported will not be detected correctly, because windows is using BIOS boot -- almost all motherboards today support EFI, however, it is disabled by default (for maximum out-of-the-box compatibility), therefore windows will be installed using BIOS instead... which means that this function will return BIOS results, even though the system supports EFI
amitr0
Posts: 7
Joined: Wed Nov 16, 2011 3:54 pm

Re: How to know if a machine uses EFI or BIOS?

Post by amitr0 »

JAAman wrote:thats not going to work:


therefore, it can only be used to identify whether windows is using EFI not whether the firmware supports EFI
Works for me, here is my original qn, hence this solution :)
amitr0 wrote: i have a similar issue as discussed here, just that i need to find from a running os (windows) whether the underlying firmware is EFI or legacy BIOS. how can i do that?
Locked