legacy BIOS programs were in ROM in the PC. and UEFI is being more used than BIOS.
Where is the UEFI code(compiled binary form) kept?
And are the UEFI drivers provided now by the OS?
I would deeply appreciate it if someone could give me a brief explanation of bootstrap using UEFI.
Thank you!

ADD (2021.7.13)
This is an update after a year with some knowledge I got to know since I posted this question. I understand UEFI firmware is kept in EEPROM(these days they keep it in EEPROM because upgrade is possible in place) or flash memory(I guess they use NAND flash-block device, should be first loaded to RAM, or NOR flash - random access possible, can be directly executed)
When I examine /boot/efi directory which is the ESP(EFI system partition), I see boot and ubuntu directory under /boot/efi/EFI. In both directories, there are some .efi files and using file command I can see those are binary executables for PE32 virtual machine(EFI firmwares use this PE32 machine code which is independent of CPU architecture or ISA). So many firmwares are now also in ESP. I understand there some tables (in ESP I guess) for connecting the firmware service with OS runtime or boottime.

  • Where has you got "use this PE32 machine code which is independent of CPU architecture or ISA"? en.wikipedia.org/wiki/Portable_Executable : PE is the standard executable format in EFI environments.[2]. And following [2]: "The most distinguishing feature of UEFI Images is that the first set of bytes in the UEFI Image file contains an image header that defines the encoding of the executable image....#define EFI_IMAGE_MACHINE_x64 0x8664..." So as I understood code is specific for each ISA. But maybe you have more sensible source and reason. Dec 15, 2021 at 7:43

2 Answers 2


The UEFI firmware is in ROM, just like the BIOS. This is what makes it "firm". The conceptual difference between BIOS and UEFI is that the UEFI firmware more advanced (some would say "bloated") and is capable of reading files from a filesystem, not just disk blocks like BIOS. UEFI also contains an execution environment, i.e. it is capable of loading EFI programs from the EFI System Partition and execute them.

The UEFI firmware can also read and write special non-volatlile variables, which can direct which file is loaded at boot. This file can be a bootloader, or it can be the Linux kernel directly, as the kernel image can be compiled to contain the required structure of a UEFI application.

  • Thank you. After reading the EFI partion info, much of what used to be the firmware seem to be now in the EFI partition(os loader and other runtimes). Of course the "basic" should be still in ROM I understand.
    – Chan Kim
    Jul 30, 2020 at 7:15
  • The UEFI firmware actually contains more functionality than BIOS. With BIOS, the OS loader was typically a tiny program embedded inside the partition boot record or in the gap between the MBR and the beginning of the first partition. With UEFI, it can be a regular file on the EFI System Partition instead... and that also makes it possible to have "other runtimes" instead of a maximum of just one OS loader per partition.
    – telcoM
    Jul 14, 2021 at 7:47

Edit ( Thanks @telcoM for pointing it out )

Technically it is a firmware ( an upgradation of BIOS ) so it should be in non-volatile memory ( ROM here )

Quoting from the Wikipedia Article EFI system partition

The EFI (Extensible Firmware Interface) system partition or ESP is a partition on a data storage device (usually a hard disk drive or solid-state drive) that is used by computers adhering to the Unified Extensible Firmware Interface (UEFI). When a computer is booted, UEFI firmware loads files stored on the ESP to start installed operating systems and various utilities.

I think this will solve your doubts, anyways check the article for sure.

  • thank you. what used to be firmware seem to be now in the EFI partition.
    – Chan Kim
    Jul 30, 2020 at 7:13
  • 1
    The EFI partition is just a place for UEFI-compliant bootloaders; the actual firmware is still in ROM (or Flash memory in modern PCs).
    – telcoM
    Jul 30, 2020 at 9:11
  • @telcoM yes my mistake, firmware should be in the ROM then it will load all the stuff from the EFI partition. Jul 30, 2020 at 13:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.