Unified Extensible Firmware Interface

From Hidden Wiki
(Redirected from UEFI)
Jump to navigation Jump to search

Template:Lead too short Template:Use dmy dates

File:Efi-simple.svg
EFI's position in the software stack

The Unified Extensible Firmware Interface (UEFI) is a specification that defines a software interface between an operating system and platform firmware. UEFI replaces the Basic Input/Output System (BIOS) firmware interface originally present in all IBM PC-compatible personal computers,[1][2] with most UEFI firmware implementations providing legacy support for BIOS services. UEFI can support remote diagnostics and repair of computers, even with no operating system installed.[3]

Intel developed the original Extensible Firmware Interface (EFI) specification. Some of the EFI's practices and data formats mirror those from Microsoft Windows.[4][5] In 2005, UEFI deprecated EFI 1.10 (the final release of EFI). The Unified EFI Forum is the industry body that manages the UEFI specification.

History

The original motivation for EFI came during early development of the first Intel–HP Itanium systems in the mid-1990s. BIOS limitations (such as 16-bit processor mode, 1 MB addressable space and PC AT hardware) had become too restrictive for the larger server platforms Itanium was targeting.[6] The effort to address these concerns began in 1998 and was initially called Intel Boot Initiative.[7] It was later renamed to Extensible Firmware Interface (EFI).[8][9]

In July 2005, Intel ceased its development of the EFI specification at version 1.10, and contributed it to the Unified EFI Forum, which has developed the specification as the Unified Extensible Firmware Interface (UEFI). The original EFI specification remains owned by Intel, which exclusively provides licenses for EFI-based products, but the UEFI specification is owned by the UEFI Forum.[6][10]

Version 2.1 of the UEFI specification was released on 7 January 2007. It added cryptography, network authentication and the User Interface Architecture (Human Interface Infrastructure in UEFI). The latest UEFI specification, version 2.7, was approved in May 2017.[11]

Advantages

The interface defined by the EFI specification includes data tables that contain platform information, and boot and runtime services that are available to the OS loader and OS. UEFI firmware provides several technical advantages over a traditional BIOS system:[12]

Compatibility

Template:AnchorProcessor compatibility

As of version 2.5, processor bindings exist for Itanium, x86, x86-64, ARM (AArch32) and ARM64 (AArch64).[14] Only little-endian processors can be supported.[15] Unofficial UEFI support is under development for POWERPC64 by implementing TianoCore on top of OPAL,[16] the OpenPOWER abstraction layer, running in little-endian mode.[17] Similar projects exist for MIPS[18] and RISC-V.[19] As of UEFI 2.7, RISC-V processor bindings have been officially established for 32-, 64- and 128-bit modes.[20]

Standard PC BIOS is limited to a 16-bit processor mode and 1 MB of addressable memory space, resulting from the design based on the IBM 5150 that used a 16-bit Intel 8088 processor.[6][21] In comparison, the processor mode in a UEFI environment can be either 32-bit (x86-32, AArch32) or 64-bit (x86-64, Itanium, and AArch64).[6][22] 64-bit UEFI firmware implementations support long mode, which allows applications in the preboot execution environment to use 64-bit addressing to get direct access to all of the machine's memory.[23]

UEFI requires the firmware and operating system loader (or kernel) to be size-matched; for example, a 64-bit UEFI firmware implementation can load only a 64-bit operating system (OS) boot loader or kernel. After the system transitions from "Boot Services" to "Runtime Services", the operating system kernel takes over. At this point, the kernel can change processor modes if it desires, but this bars usage of the runtime services (unless the kernel switches back again).[24]Template:Rp As of version 3.15, the Linux kernel supports 64-bit kernels to be booted on 32-bit UEFI firmware implementations running on x86-64 CPUs, with UEFI handover support from a UEFI boot loader as the requirement.[25] UEFI handover protocol deduplicates the UEFI initialization code between the kernel and UEFI boot loaders, leaving the initialization to be performed only by the Linux kernel's UEFI boot stub.[26][27]

Template:AnchorDisk device compatibility

Template:See also

In addition to the standard PC disk partition scheme that uses a master boot record (MBR), UEFI also works with a new partitioning scheme called GUID Partition Table (GPT), which is free from many of the limitations of MBR. In particular, the MBR limits on the number and size of disk partitions (up to four primary partitions per disk, and up to 2 TiB Template:Nobreak per disk) are relaxed.[28] More specifically, GPT allows for a maximum disk and partition size of 8 ZiB Template:Nobreak.[28][29]

TrueOS

Template:See also

Linux

Template:See also Support for GPT in Linux is enabled by turning on the option CONFIG_EFI_PARTITION (EFI GUID Partition Support) during kernel configuration.[30] This option allows Linux to recognize and use GPT disks after the system firmware passes control over the system to Linux.

For reverse compatibility, Linux can use GPT disks in BIOS-based systems for both data storage and booting, as both GRUB 2 and Linux are GPT-aware. Such a setup is usually referred to as BIOS-GPT.[31] As GPT incorporates the protective MBR, a BIOS-based computer can boot from a GPT disk using a GPT-aware boot loader stored in the protective MBR's bootstrap code area.[29] In the case of GRUB, such a configuration requires a BIOS boot partition for GRUB to embed its second-stage code due to absence of the post-MBR gap in GPT partitioned disks (which is taken over by the GPT's Primary Header and Primary Partition Table). Commonly 1 MiB in size, this partition's Globally Unique Identifier (GUID) in GPT scheme is 21686148-6449-6E6F-744E-656564454649 and is used by GRUB only in BIOS-GPT setups. From GRUB's perspective, no such partition type exists in case of MBR partitioning. This partition is not required if the system is UEFI-based because no embedding of the second-stage code is needed in that case.[13][29][31]

UEFI systems can access GPT disks and boot directly from them, which allows Linux to use UEFI boot methods. Booting Linux from GPT disks on UEFI systems involves creation of an EFI system partition (ESP), which contains UEFI applications such as bootloaders, operating system kernels, and utility software.[32][33][34] Such a setup is usually referred to as UEFI-GPT, while ESP is recommended to be at least 512 MiB in size and formatted with a FAT32 filesystem for maximum compatibility.[29][31][35]

For backward compatibility, most UEFI implementations also support booting from MBR-partitioned disks, through the Compatibility Support Module (CSM) that provides legacy BIOS compatibility.[36] In that case, booting Linux on UEFI systems is the same as on legacy BIOS-based systems.

Microsoft Windows

The 64-bit versions of Windows Vista SP1 and later can boot from disks with a partition size larger than 2 TB.

Features

Template:AnchorServices

EFI defines two types of services: boot services and runtime services. Boot services are available only while the firmware owns the platform (i.e., before the ExitBootServices call), and they include text and graphical consoles on various devices, and bus, block and file services. Runtime services are still accessible while the operating system is running; they include services such as date, time and NVRAM access.

In addition, the Graphics Output Protocol (GOP) provides limited runtime services support; see also Graphics features section below. The operating system is permitted to directly write to the framebuffer provided by GOP during runtime mode. However, the ability to change video modes is lost after transitioning to runtime services mode until the OS graphics driver is loaded.

Variable services
UEFI variables provide a way to store data, in particular non-volatile data, that is shared between platform firmware and operating systems or UEFI applications. Variable namespaces are identified by GUIDs, and variables are key/value pairs. For example, variables can be used to keep crash messages in NVRAM after a crash for the operating system to retrieve after a reboot.[37]
Time services
UEFI provides device-independent time services. Time services include support for timezone and daylight saving fields, which allow the hardware real-time clock to be set to local time or UTC.[38] On machines using a PC-AT real-time clock, by default the hardware clock still has to be set to local time for compatibility with BIOS-based Windows,[5] unless using recent versions and an entry in the Windows registry is set to indicate the use of UTC.

Template:AnchorApplications

File:Efi flowchart extended.svg
Interaction between the EFI boot manager and EFI drivers

Beyond loading an OS, UEFI can run UEFI applications, which reside as files on the EFI System Partition. They can be executed from the UEFI command shell, by the firmware's boot manager, or by other UEFI applications. UEFI applications can be developed and installed independently of the system manufacturer.

A type of UEFI application is an OS loader such as GRUB, rEFInd, Gummiboot, and Windows Boot Manager; which loads an OS file into memory and executes it. Also, an OS loader can provide a user interface to allow the selection of another UEFI application to run. Utilities like the UEFI shell are also UEFI applications.

Protocols

EFI defines protocols as a set of software interfaces used for communication between two binary modules. All EFI drivers must provide services to others via protocols.

Template:AnchorDevice drivers

In addition to standard processor architecture-specific device drivers, EFI provides for a processor-independent device driver stored in memory as EFI byte code or EBC. System firmware has an interpreter for EBC images. In that sense, EBC is analogous to Open Firmware, the hardware-independent firmware used in PowerPC-based Apple Macintosh and Sun Microsystems SPARC computers, among others.

Some architecture-specific (non-EFI Byte Code) EFI drivers for some device types can have interfaces for use by the OS. This allows the OS to rely on EFI for drivers to perform basic graphics and network functions before, and if, operating-system-specific drivers are loaded.

Graphics features

The EFI specification defined a UGA (Universal Graphic Adapter) protocol as a way to support device-independent graphics. UEFI did not include UGA and replaced it with GOP (Graphics Output Protocol), with the explicit goal of removing VGA hardware dependencies. The two are similar.[39]

UEFI 2.1 defined a "Human Interface Infrastructure" (HII) to manage user input, localized strings, fonts, and forms (in the HTML sense). These enable original equipment manufacturers (OEMs) or independent BIOS vendors (IBVs) to design graphical interfaces for pre-boot configuration; UEFI itself does not define a user interface.

Most early UEFI firmware implementations were console-based, but as early as 2007 some implementations featured a graphical user interface.

EFI System partition

Template:Main article

An EFI System partition, often abbreviated to ESP, is a data storage device partition that is used in computers adhering to the UEFI specification. Accessed by the UEFI firmware when a computer is powered up, it stores UEFI applications and the files these applications need to run, including operating system kernels. Supported partition table schemes include MBR and GPT, as well as El Torito volumes on optical disks.[24]Template:Rp For use on ESPs, UEFI defines a specific version of the FAT file system, which is maintained as part of the UEFI specification and independently from the original FAT specification, encompassing a variant of the FAT32 file system on ESPs, and FAT16 and FAT12 file systems on removable media.[24]Template:Rp[40][41] The ESP also provides space for a boot sector as part of the backward BIOS compatibility.[36]

Booting

Template:AnchorUEFI booting

Unlike BIOS, UEFI does not rely on a boot sector, defining instead a boot manager as part of the UEFI specification. When a computer is powered on, the boot manager checks the boot configuration and based on its settings, loads into memory and then executes the specified OS loader or operating system kernel. The boot configuration is defined by variables stored in NVRAM, including variables that indicate the file system paths to OS loaders and OS kernels.

OS loaders can be automatically detected by UEFI, which enables easy booting from removable devices such as USB flash drives. This automated detection relies on standardized file paths to the OS loader, with the path varying depending on the computer architecture. The format of the file path is defined as Template:Mono; for example, the file path to the OS loader on an x86-64 system is Template:Mono,[24] and Template:Mono on ARM64 architecture.

Booting UEFI systems from GPT-partitioned disks is commonly called UEFI-GPT booting. Despite the fact that the UEFI specification requires MBR partition tables to be fully supported,[24] some UEFI firmware implementations immediately switch to the BIOS-based CSM booting depending on the type of boot disk's partition table, effectively preventing UEFI booting to be performed from EFI System partitions on MBR-partitioned disks.[36] Such a boot scheme is commonly called UEFI-MBR.

It is also common for a boot manager to have a textual user interface so the user can select the desired OS (or system utility) from a list of available boot options.

Template:AnchorCSM booting

To ensure backward compatibility, most UEFI firmware implementations on PC-class machines also support booting in legacy BIOS mode from MBR-partitioned disks, through the Compatibility Support Module (CSM) that provides legacy BIOS compatibility. In this scenario, booting is performed in the same way as on legacy BIOS-based systems, by ignoring the partition table and relying on the content of a boot sector.[36]

BIOS-style booting from MBR-partitioned disks is commonly called BIOS-MBR, regardless of it being performed on UEFI or legacy BIOS-based systems. Furthermore, booting legacy BIOS-based systems from GPT disks is also possible, and such a boot scheme is commonly called BIOS-GPT.

The Compatibility Support Module allows legacy operating systems and some option ROMs that do not support UEFI to still be used.[42] It also provides required legacy System Management Mode (SMM) functionality, called CompatibilitySmm, as an addition to features provided by the UEFI SMM. This is optional and highly chipset- and platform-specific. An example of such a legacy SMM functionality is providing USB legacy support for keyboard and mouse, by emulating their classic PS/2 counterparts.[42]

In November 2017, Intel announced that it planned to phase out support for CSM by 2020.[43]

Network booting

The UEFI specification includes support for booting over network via the Preboot eXecution Environment (PXE). PXE booting use network protocols include Internet Protocol (IPv4 and IPv6), User Datagram Protocol (UDP), Dynamic Host Configuration Protocol (DHCP) and Trivial File Transfer Protocol (TFTP).[24][44]

OS images can be remotely stored on storage area networks (SANs), with Internet Small Computer System Interface (iSCSI) and Fibre Channel over Ethernet (FCoE) as supported protocols for accessing the SANs.[24][45][46]

Version 2.5 of the UEFI specification adds support for accessing boot images over the HTTP protocol.[47]

Template:AnchorSecure boot

Template:See also

The UEFI 2.3.1 Errata C specification (or higher) defines a protocol known as secure boot, which can secure the boot process by preventing the loading of drivers or OS loaders that are not signed with an acceptable digital signature. The mechanical details of how precisely these drivers are to be signed are not specified.[48] When secure boot is enabled, it is initially placed in "setup" mode, which allows a public key known as the "Platform key" (PK) to be written to the firmware. Once the key is written, secure boot enters "User" mode, where only drivers and loaders signed with the platform key can be loaded by the firmware. Additional "Key Exchange Keys" (KEK) can be added to a database stored in memory to allow other certificates to be used, but they must still have a connection to the private portion of the Platform key.[49] Secure boot can also be placed in "Custom" mode, where additional public keys can be added to the system that do not match the private key.[50]

Secure boot is supported by Windows 8 and 8.1, Windows Server 2012, and 2012 R2, and Windows 10, VMware vSphere 6.5[51] and a number of Linux distributions including Fedora (since version 18), openSUSE (since version 12.3), RHEL (since RHEL 7), CentOS (since CentOS 7[52]) and Ubuntu (since version 12.04.2).[53] Template:As of, FreeBSD support is in a planning stage.[54]

Template:AnchorUEFI shell

UEFI provides a shell environment, which can be used to execute other UEFI applications, including UEFI boot loaders.[34] Apart from that, commands available in the UEFI shell can be used for obtaining various other information about the system or the firmware, including getting the memory map (memmap), modifying boot manager variables (bcfg), running partitioning programs (diskpart), loading UEFI drivers, and editing text files (edit).[55][56][57]

Source code for a UEFI shell can be downloaded from the Intel's TianoCore UDK2010 / EDK2 SourceForge project.[58] Shell v2 works best in UEFI 2.3+ systems and is recommended over the shell v1 in those systems. Shell v1 should work in all UEFI systems.[55][59][60]

Methods used for launching UEFI shell depend on the manufacturer and model of the system motherboard. Some of them already provide a direct option in firmware setup for launching, e.g. compiled x86-64 version of the shell needs to be made available as <EFI_SYSTEM_PARTITION>/SHELLX64.EFI. Some other systems have an already embedded UEFI shell which can be launched by appropriate key press combinations.[61][62] For other systems, the solution is either creating an appropriate USB flash drive or adding manually (bcfg) a boot option associated with the compiled version of shell.[57][61][63][64]

Commands

The following list of commands is supported by the EFI shell.[56]

Template:Div col

Template:Div col end

Extensions

Extensions to EFI can be loaded from virtually any non-volatile storage device attached to the computer. For example, an original equipment manufacturer (OEM) can distribute systems with an EFI partition on the hard drive, which would add additional functions to the standard EFI firmware stored on the motherboard's ROM.

Implementation and adoption

Template:AnchorIntel EFI

Intel's implementation of EFI is the Intel Platform Innovation Framework, codenamed Tiano. Tiano runs on Intel's XScale, Itanium and IA-32 processors, and is proprietary software, although a portion of the code has been released under the BSD license or Eclipse Public License (EPL) as TianoCore. TianoCore can be used as a payload for coreboot.[65]

Phoenix Technologies' implementations of UEFI include its SecureCore and SecureCore Tiano products.[66] American Megatrends offers its own UEFI firmware implementation known as Aptio,[67] while Insyde Software offers InsydeH2O, its own implementation of Tiano.[68]

Das U-Boot

An implementation of the UEFI API was introduced into the Universal Boot Loader (Das U-Boot) in 2017 [69]. On the ARMv8 architecture Linux distributions use the U-Boot UEFI implementation in conjunction with GNU GRUB for booting (e.g. SUSE Linux [70]), the same holds true for OpenBSD [71]. For booting from iSCSI iPXE can be used as a UEFI application loaded by U-Boot[72].

Platforms using EFI/UEFI

Intel's first Itanium workstations and servers, released in 2000, implemented EFI 1.02.

Hewlett-Packard's first Itanium 2 systems, released in 2002, implemented EFI 1.10; they were able to boot Windows, Linux, FreeBSD and HP-UX; OpenVMS added UEFI capability in June, 2003.

In January 2006, Apple Inc. shipped its first Intel-based Macintosh computers. These systems used EFI instead of Open Firmware, which had been used on its previous PowerPC-based systems.[73] On 5 April 2006, Apple first released Boot Camp, which produces a Windows drivers disk and a non-destructive partitioning tool to allow the installation of Windows XP or Vista without requiring a reinstallation of Mac OS X. A firmware update was also released that added BIOS compatibility to its EFI implementation. Subsequent Macintosh models shipped with the newer firmware.[74]

During 2005, more than one million Intel systems shipped with Intel's implementation of UEFI.[75] New mobile, desktop and server products, using Intel's implementation of UEFI, started shipping in 2006. For instance, boards that use the Intel 945 chipset series use Intel's UEFI firmware implementation.

Since 2005, EFI has also been implemented on non-PC architectures, such as embedded systems based on XScale cores.[75]

The EDK (EFI Developer Kit) includes an NT32 target, which allows EFI firmware and EFI applications to run within a Windows application. But no direct hardware access is allowed by EDK NT32. This means only a subset of EFI application and drivers can be executed at the EDK NT32 target.

In 2008, more x86-64 systems adopted UEFI some of them using the rEFInd GUI boot menu. While many of these systems still allow booting only the BIOS-based OSes via the Compatibility Support Module (CSM) (thus not appearing to the user to be UEFI-based), other systems started to allow booting UEFI-based OSes. For example, IBM x3450 server, MSI motherboards with ClickBIOS, all HP EliteBook Notebook and Tablet PCs, newer HP Compaq Notebook PCs (e.g., 6730b, 6735b, etc.).

In 2009, IBM shipped System x machines (x3550 M2, x3650 M2, iDataPlex dx360 M2) and BladeCenter HS22 with UEFI capability. Dell shipped PowerEdge T610, R610, R710, M610 and M710 servers with UEFI capability. More commercially available systems are mentioned in a UEFI whitepaper.[76]

In 2011, major vendors (such as ASRock, Asus, Gigabyte, and MSI) launched several consumer-oriented motherboards using the Intel 6-series LGA 1155 chipset and AMD 9 Series AM3+ chipsets with UEFI.[77]

With the release of Windows 8 in October 2012, Microsoft's certification requirements now require that computers include firmware that implements the UEFI specification. Furthermore, if the computer supports the "Connected Standby" feature of Windows 8 (which allows devices to have power management comparable to smartphones, with an almost instantaneous return from standby mode), then the firmware is not permitted to contain a Compatibility Support Module (CSM). As such, systems that support Connected Standby are incapable of booting Legacy BIOS operating systems.[78][79]

In October 2017, Intel announced that it would remove BIOS support from all its products by 2020, in favor of UEFI Class 3.[80]

Operating systems

An operating system that can be booted from a (U)EFI is called a (U)EFI-aware operating system, defined by (U)EFI specification. Here the term booted from a (U)EFI means directly booting the system using a (U)EFI operating system loader stored on any storage device. The default location for the operating system loader is <EFI_SYSTEM_PARTITION>/BOOT/BOOT<MACHINE_TYPE_SHORT_NAME>.EFI, where short name of the machine type can be IA32, X64, IA64, ARM or AA64.[24] Some operating systems vendors may have their own boot loaders. They may also change the default boot location.

  • The Linux kernel has been able to use EFI at boot time since early 2000,[81] using the elilo EFI boot loader or, more recently, EFI versions of GRUB.[82] Grub+Linux also supports booting from a GUID partition table without UEFI.[13] The distribution Ubuntu added support for UEFI secure boot as of version 12.10.[83] Further, the Linux kernel can be compiled with the option to run as an EFI bootloader on its own through the EFI bootstub feature.
  • HP-UX has used (U)EFI as its boot mechanism on IA-64 systems since 2002.
  • HP OpenVMS has used (U)EFI on IA-64 since its initial evaluation release in December 2003, and for production releases since January 2005.[84]
  • Apple uses EFI for its line of Intel-based Macs. Mac OS X v10.4 Tiger and Mac OS X v10.5 Leopard implement EFI v1.10 in 32-bit mode even on newer 64-bit CPUs, but full support arrived with OS X v10.8 Mountain Lion.[85]
  • The Itanium versions of Windows 2000 (Advanced Server Limited Edition and Datacenter Server Limited Edition) implemented EFI 1.10 in 2002. MS Windows Server 2003 for IA-64, MS Windows XP 64-bit Edition and Windows 2000 Advanced Server Limited Edition, all of which are for the Intel Itanium family of processors, implement EFI, a requirement of the platform through the DIG64 specification.[86]
  • Microsoft introduced UEFI for x86-64 Windows operating systems with Windows Server 2008 R2 and Windows 7. The 64-bit versions of Windows 7 are compatible with EFI.Template:Citation needed 32-bit UEFI was originally not supported since vendors did not have any interest in producing native 32-bit UEFI firmware because of the mainstream status of 64-bit computing.[87] Windows 8 includes further optimizations for UEFI systems, including a faster startup, 32-bit UEFI support, and secure boot support.[88][89]
  • On 5 March 2013, the FreeBSD Foundation awarded a grant to a developer seeking to add UEFI support to the FreeBSD kernel and bootloader.[90] The changes were initially stored in a discrete branch of the FreeBSD source code, but were merged into the mainline source on 4 April 2014 (revision 264095); the changes include support in the installer as well.[91]
  • Oracle Solaris 11.1 and later support UEFI boot for x86 systems with UEFI firmware version 2.1 or later. GRUB 2 is used as the boot loader on x86.[92]
  • OpenBSD 5.9[93] introduced UEFI boot support for 64-bit x86 systems using its own custom loader, OpenBSD 6.0 extended that support to include ARMv7.[94]

Use of UEFI with virtualization

  • HP Integrity Virtual Machines provides UEFI boot on HP Integrity Servers. It also provides a virtualized UEFI environment for the guest UEFI-aware OSes.
  • Intel hosts an Open Virtual Machine Firmware project on SourceForge.[95]
  • VMware Fusion 3 software for Mac OS X can boot Mac OS X Server virtual machines using UEFI.
  • VMware Workstation prior to version 11 unofficially supports UEFI, but is manually enabled by editing the .vmx file.[96] VMware Workstation version 11 and above supports UEFI, independently of whether the physical host system is UEFI-based. VMware Workstation 14 (and accordingly, Fusion 10) adds support for the Secure Boot feature of UEFI.[97][98]
  • The vSphere ESXi 5.0 hypervisor officially support UEFI. Version 6.5 adds support for secure boot.[99][100]
  • VirtualBox has implemented UEFI since 3.1,[101] but limited to Unix/Linux operating systems and some versions of Windows (does not work with Windows Vista x64 and Windows 7 x64).[102][103]
  • QEMU/KVM can be used with the Open Virtual Machine Firmware (OVMF) provided by TianoCore.[104]
  • The VMware ESXi version 5 hypervisor, part of VMware vSphere, supports virtualized UEFI as an alternative to BIOS inside a virtual machine.
  • The second generation of the Microsoft Hyper-V virtual machine supports virtualized UEFI.[105]

Template:AnchorApplications development

EDK2 Application Development Kit (EADK) makes it possible to use standard C library functions in UEFI applications. EADK can be freely downloaded from the Intel's TianoCore UDK2010 / EDK2 SourceForge project. As an example, a port of the Python interpreter is made available as a UEFI application by using the EADK.[106]

A minimalistic "hello, world" C program written using EADK looks similar to its usual C counterpart:

<source lang="c">

  1. include <Uefi.h>
  2. include <Library/UefiLib.h>
  3. include <Library/ShellCEntryLib.h>

EFI_STATUS EFIAPI ShellAppMain(IN UINTN Argc, IN CHAR16 **Argv) {

   Print(L"hello, world\n");
   return EFI_SUCCESS;

} </source>

Criticism

Numerous digital rights activists have protested against UEFI. Ronald G. Minnich, a co-author of coreboot, and Cory Doctorow, a digital rights activist, have criticized EFI as an attempt to remove the ability of the user to truly control the computer.[107][108] It does not solve any of the BIOS's long-standing problems of requiring two different drivers—one for the firmware and one for the operating system—for most hardware.[109]

Open-source project TianoCore also provides UEFI interfaces.[110] TianoCore lacks the specialized drivers that initialize chipset functions, which are instead provided by coreboot, of which TianoCore is one of many payload options. The development of coreboot requires cooperation from chipset manufacturers to provide the specifications needed to develop initialization drivers.

Template:AnchorSecure boot

Template:See also

In 2011, Microsoft announced that computers certified to run its Windows 8 operating system had to ship with secure boot enabled using a Microsoft private key. Following the announcement, the company was accused by critics and free software/open source advocates (including the Free Software Foundation) of trying to use the secure boot functionality of UEFI to hinder or outright prevent the installation of alternative operating systems such as Linux. Microsoft denied that the secure boot requirement was intended to serve as a form of lock-in, and clarified its requirements by stating that Intel-based systems certified for Windows 8 must allow secure boot to enter custom mode or be disabled, but not on systems using the ARM architecture.[50][111] Windows 10 allows OEMs to decide whether or not secure boot can be managed by users of their x86 systems.[112]

Other developers raised concerns about the legal and practical issues of implementing support for secure boot on Linux systems in general. Former Red Hat developer Matthew Garrett noted that conditions in the GNU General Public License version 3 may prevent the use of the GNU Grand Unified Bootloader without a distribution's developer disclosing the private key (however, the Free Software Foundation has since clarified its position, assuring that the responsibility to make keys available was held by the hardware manufacturer),[83] and that it would also be difficult for advanced users to build custom kernels that could function with secure boot enabled without self-signing them.[111] Other developers suggested that signed builds of Linux with another key could be provided, but noted that it would be difficult to persuade OEMs to ship their computers with the required key alongside the Microsoft key.[2]

Several major Linux distributions have developed different implementations for secure boot. Garrett himself developed a minimal bootloader known as a shim, which is a precompiled, signed bootloader that allows the user to individually trust keys provided by distributors.[113] Ubuntu 12.10 uses an older version of shimTemplate:Which? pre-configured for use with Canonical's own key that verifies only the bootloader and allows unsigned kernels to be loaded; developers believed that the practice of signing only the bootloader is more feasible, since a trusted kernel is effective at securing only the user space, and not the pre-boot state for which secure boot is designed to add protection. That also allows users to build their own kernels and use custom kernel modules as well, without the need to reconfigure the system.[83][114][115] Canonical also maintains its own private key to sign installations of Ubuntu pre-loaded on certified OEM computers that run the operating system, and also plans to enforce a secure boot requirement as wellTemplate:Emdashrequiring both a Canonical key and a Microsoft key (for compatibility reasons) to be included in their firmware. Fedora also uses shim,Template:Which? but requires that both the kernel and its modules be signed as well.[114]

It has been disputed whether the kernel and its modules must be signed as well; while the UEFI specifications do not require it, Microsoft has asserted that their contractual requirements do, and that it reserves the right to revoke any certificates used to sign code that can be used to compromise the security of the system.[115] In February 2013, another Red Hat developer attempted to submit a patch to the Linux kernel that would allow it to parse Microsoft's authenticode signing using a master X.509 key embedded in PE files signed by Microsoft. However, the proposal was criticized by Linux creator Linus Torvalds, who attacked Red Hat for supporting Microsoft's control over the secure boot infrastructure.[116]

On 26 March 2013, the Spanish free software development group Hispalinux filed a formal complaint with the European Commission, contending that Microsoft's secure boot requirements on OEM systems were "obstructive" and anti-competitive.[117]

At the Black Hat conference in August 2013, a group of security researchers presented a series of exploits in specific vendor implementations of UEFI that could be used to exploit secure boot.[118]

In August 2016 it was reported that two security researchers had found the "golden key" security key Microsoft uses in signing operating systems.[119] Technically, no key was exposed, however, an exploitable binary signed by the key was. This allows any software to run as though it was genuinely signed by Microsoft and exposes the possibility of rootkit and bootkit attacks. This also makes patching the fault impossible, since any patch can be replaced (downgraded) by the (signed) exploitable binary. Microsoft responded in a statement that the vulnerability only exists in ARM architecture and Windows RT devices, and has released two patches, however, the patches do not (and cannot) remove the vulnerability, which would require key replacements in end user firmware to fix.Template:Cn

Firmware problems

The increased prominence of UEFI firmware in devices has also led to a number of technical problems blamed on their respective implementations.[120]

Following the release of Windows 8 in late 2012, it was discovered that certain Lenovo computer models with secure boot had firmware that was hardcoded to allow only executables named "Windows Boot Manager" or "Red Hat Enterprise Linux" to load, regardless of any other setting.[121] Other problems were encountered by several Toshiba laptop models with secure boot that were missing certain certificates required for its proper operation.[120]

In January 2013, a bug surrounding the UEFI implementation on some Samsung laptops was publicized, which caused them to be bricked after installing a Linux distribution in UEFI mode. While potential conflicts with a kernel module designed to access system features on Samsung laptops were initially blamed (also prompting kernel maintainers to disable the module on UEFI systems as a safety measure), Matthew Garrett discovered that the bug was actually triggered by storing too many UEFI variables to memory, and that the bug could also be triggered under Windows under certain conditions. In conclusion, he determined that the offending kernel module had caused kernel message dumps to be written to the firmware, thus triggering the bug.[37][122][123]

See also

Template:Portal

Template:Div col

Template:Div col end

Notes

Template:Notelist

References

1 }}
     | references-column-width 
     | references-column-count references-column-count-{{#if:1|30em}} }}
   | {{#if: 
     | references-column-width }} }}" style="{{#if: 30em
   | {{#iferror: {{#ifexpr: 30em > 1 }}
     | Template:Column-width
     | Template:Column-count }}
   | {{#if: 
     | Template:Column-width }} }} list-style-type: {{#switch: 
   | upper-alpha
   | upper-roman
   | lower-alpha
   | lower-greek
   | lower-roman = {{{group}}}
   | #default = decimal}};">
  1. Template:Cite web
  2. 2.0 2.1 Template:Cite news
  3. Template:Cite web
  4. IBM PC Real Time Clock should run in UT. Cl.cam.ac.uk. Retrieved on 2013-10-30.
  5. 5.0 5.1 Template:Cite web
  6. 6.0 6.1 6.2 6.3 Template:Cite news
  7. Template:Citation
  8. Template:Citation
  9. Template:Citation
  10. Template:Citation
  11. Template:Cite web
  12. Template:Cite web
  13. 13.0 13.1 13.2 Template:Cite web
  14. UEFI Specification 2.4, section 2.3
  15. UEFI specification 2.3.1, section 1.8.1.
  16. Template:Cite web
  17. Template:Cite web
  18. Template:Cite web
  19. Template:Cite web
  20. http://www.uefi.org/sites/default/files/resources/UEFI_Spec_2_7.pdf
  21. Template:Cite news
  22. Template:Cite news
  23. Template:Cite news
  24. 24.0 24.1 24.2 24.3 24.4 24.5 24.6 24.7 Template:Cite web
  25. Template:Cite web
  26. Template:Cite web
  27. Template:Cite web
  28. 28.0 28.1 Template:Cite news
  29. 29.0 29.1 29.2 29.3 Template:Cite web
  30. Template:Cite web
  31. 31.0 31.1 31.2 Template:Cite webTemplate:Unreliable source?
  32. Template:Cite web
  33. Template:Cite web
  34. 34.0 34.1 Template:Cite webTemplate:Unreliable source?
  35. Template:Cite webTemplate:Unreliable source?
  36. 36.0 36.1 36.2 36.3 Template:Cite web
  37. 37.0 37.1 Template:Cite web
  38. UEFI specification, section 7.3
  39. Template:Cite web
  40. Template:Cite web
  41. Template:Cite web
  42. 42.0 42.1 Template:Cite web
  43. Template:Cite news
  44. Template:Cite web
  45. Template:Cite web
  46. Template:Cite web
  47. Template:Cite web
  48. Template:Cite web
  49. Template:Cite web
  50. 50.0 50.1 Template:Cite web
  51. Template:Cite news
  52. https://wiki.centos.org/HowTos/UEFI
  53. Template:Cite web
  54. Template:Cite web
  55. 55.0 55.1 Template:Cite webTemplate:Unreliable source?
  56. 56.0 56.1 Template:Cite web
  57. 57.0 57.1 Template:Cite web
  58. Template:Cite web
  59. Template:Cite web
  60. Template:Cite web
  61. 61.0 61.1 Template:Cite webTemplate:Unreliable source?
  62. Template:Cite web
  63. Template:Cite webTemplate:Unreliable source?
  64. Template:Cite webTemplate:Unreliable source?
  65. Template:Cite web
  66. Template:Cite web
  67. Template:Cite web
  68. Template:Cite web
  69. Template:Cite web
  70. Template:Cite web
  71. Template:Cite web
  72. Template:Cite web
  73. Apple Computer. "Universal Binary Programming Guidelines, Second Edition: Extensible Firmware Interface (EFI) Template:Webarchive"
  74. Apple's Transition from Open Firmware to Extensible Firmware Interface, mactech, 2007.
  75. 75.0 75.1 Template:Cite web
  76. Template:Citation
  77. Asus P67 Motherboard Preview.
  78. Template:Cite web
  79. Template:Cite web
  80. Template:Cite web
  81. Announcement of release 3.5pre1 by maintainer Brett Johnson made on 2004-02-27.
  82. Template:Citation
  83. 83.0 83.1 83.2 Template:Cite web
  84. Template:Citation
  85. Template:Citation
  86. Template:Citation
  87. Template:Cite news
  88. Template:Cite web
  89. Template:Cite news
  90. Template:Cite web
  91. Template:Cite web
  92. Template:Cite web
  93. Template:Cite web
  94. Template:Cite web
  95. Template:Citation
  96. Template:Cite web
  97. Template:Cite web
  98. Template:Cite news
  99. Template:Cite web
  100. Template:Cite web
  101. Template:Citation
  102. Template:Citation
  103. Template:Citation
  104. Template:Cite web
  105. Template:Cite web
  106. Template:Cite web
  107. Template:Cite web
  108. Template:Citation
  109. Template:Cite web
  110. Template:Citation
  111. 111.0 111.1 Template:Cite web
  112. Template:Cite web
  113. Template:Cite web
  114. 114.0 114.1 Template:Cite web
  115. 115.0 115.1 Template:Cite web
  116. Template:Cite web
  117. Template:Cite news
  118. Template:Cite web
  119. Template:Cite news
  120. 120.0 120.1 Template:Cite web
  121. Template:Cite web
  122. Template:Cite web
  123. Template:Cite web

Further reading

External links

Template:Commons category