1

Understanding basics of UEFI seems bit daunting to me!! I have read articles here & there but not getting a clear hang of it.

I see a term NVRAM entries being referred. What exactly is this NVRAM? Is it the same old CMOS setup data or something totally different when it comes to UEFI and where is it stored, is there a separate placeholder on mobo itself apart from CMOS or it’s part of the EFI partition?

I read that UEFI seem to have 32 or 64 bit architecture and it should match the OS architecture i.e. only 64 bit UEFI can load 64 bit OS? If this is true, is this a relevant parameter while choosing newer mobs that have UEFI than older BIOS? Thanks.

patkim
  • 5,455

2 Answers2

3

Non-Volatile Random Access Memory (NVRAM) is as its name suggests -- a type of memory that's non-volatile -- that is, its contents won't disappear when the power is cut.

The "CMOS" of "CMOS setup utility" referred to complementary metal–oxide–semiconductor technology. This was similar to NVRAM in many ways, but as I understand it, CMOS required a small trickle of power from a battery to retain its contents. AFAIK, few or no PCs built in the last decade or two used true CMOS memory (they've used NVRAM for a long time), but the name stuck from earlier computers. I admit I'm a little foggy on this point, though.

In any event, on EFI systems, NVRAM is more important than it is on BIOS-based computers, because EFI provides mechanisms to use NVRAM to store a wider array of variables, some of which can be used to communicate between the firmware and the OS. For instance, modern BIOS systems use NVRAM to store boot order information -- hard disks before or after optical disks, order of specific disks, etc. Under EFI, this is expanded: Boot loaders are ordinary files on the EFI System Partition (ESP), so boot order information is more complex and can contain arbitrary data (filenames, for instance, can be anything legal on the filesystem). Furthermore, OSes can modify the boot order via tools like efibootmgr in Linux, bcdedit in Windows, or bless in OS X. Such tools work by writing to NVRAM in a way that's mediated by the EFI. This is just an example; NVRAM can hold any arbitrary data desired, up to the limits of the NVRAM capacity.

EFI is designed for like-architecture booting, so a 32-bit EFI can boot a 32-bit OS and a 64-bit EFI can boot a 64-bit OS. There are ways to boot cross-architecture (a 32-bit EFI booting a 64-bit OS or vice-versa), but these methods tend to be awkward and limiting. The vast majority of 64-bit (x86-64) computers ship with 64-bit EFIs, so running a 64-bit OS on them is desirable. There are a handful of exceptions (64-bit computers with 32-bit EFIs). The first generation of 64-bit Intel-based Macs come to mind for this. There are also a few modern tablets with 64-bit CPUs but 32-bit EFIs. It's easiest to run 32-bit OSes on such machines. I don't know of any server, desktop, or laptop computer with a 64-bit CPU and a 32-bit EFI, aside from those early Macs.

Most EFIs include a Compatibility Support Module (CSM) that enables booting using the older BIOS/CSM/legacy mode. If 64-bit computer with a 32-bit EFI has a CSM, it can boot a 64-bit OS in BIOS mode relatively easily. The one tablet I've got with a 32-bit EFI lacks a CSM, and I've heard similar tales about other tablets with 32-bit EFIs, so this may not be of much use for most of them. (Those early Macs have CSMs, though.)

Rod Smith
  • 21,765
  • Thanks for the detailed info Rod. You have clarified a lot.

    What I am bit puzzled about (possibly as UEFI is quite complex) is that where is the physical NVRAM storage. Is it a separate memory chip on mobo itself apart from CMOS memory or does it hold this data on EFI partition itself in some form of files etc.

    – patkim Jun 01 '15 at 15:28
  • NVRAM is a chip on the motherboard. As I understand it, CMOS has not been used on PCs for years, if ever; the name is a holdover from older types of non-volatile storage. BIOS-based computers have been using NVRAM, not CMOS, for years. (I may be wrong about this, though; this detail is one on which I'm not 100% clear.) – Rod Smith Jun 01 '15 at 15:55
  • +1 Great answer as usual from a real subject matter expert. It does highlight though how messed up the situation still is in mid 2015 (re. various 32/64-bit EFI and 32/64-bit OS combos), and in my experience many EFI implementations are outright buggy and look as if they've been coded by interns. Pretty sure many might fail security audits as well. – Karan Jun 02 '15 at 05:03
  • Is this behavior (Like-architecture booting in native UEFI mode) documented somewhere in UEFI Specs? Would be great to know the section reference just out of curiosity. I have seen the specs and it's practically beyond my scope to comprehend otherwise! – patkim Jun 16 '15 at 14:08
  • I'm sure it's in the specs, but I don't know where. You might want to take that question to the EDK2 developers' mailing list. There are people there who know the specs inside and out. – Rod Smith Jun 17 '15 at 13:17
0

you can read more about NVRAM here : http://en.wikipedia.org/wiki/Non-volatile_random-access_memory

No. UEFI is just a new (and more secure) boot sequence compared to BIOS. UEFI CAN ONLY be loaded on 64 bit OS. If you have mobo that support UEFI boot mode, then it should support BIOS boot mode too. Most Gigabyte motherboard now has an option to switch between UEFI boot and BIOS boot.

Kevin
  • 1
  • Welcome, and thanks for trying to help with this question. Super User's purpose is to build a knowledgebase rather than a collection of links to answers elsewhere. Also, external links can break, in which case, that portion of your answer would be useless. Please include the essential information in your answer and use links for attribution and further reading. – fixer1234 Jun 01 '15 at 05:47
  • "UEFI CAN ONLY be loaded on 64 bit OS" - Can you back this assertion up with references? Windows might place such a restriction but 32-bit EFI bootloader seems to be very much possible for Linux. – Karan Jun 02 '15 at 04:50