^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) ================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) The Unified Extensible Firmware Interface (UEFI)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) ================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) UEFI, the Unified Extensible Firmware Interface, is a specification
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) governing the behaviours of compatible firmware interfaces. It is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) maintained by the UEFI Forum - http://www.uefi.org/.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) UEFI is an evolution of its predecessor 'EFI', so the terms EFI and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) UEFI are used somewhat interchangeably in this document and associated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) source code. As a rule, anything new uses 'UEFI', whereas 'EFI' refers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) to legacy code or specifications.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) UEFI support in Linux
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) =====================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) Booting on a platform with firmware compliant with the UEFI specification
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) makes it possible for the kernel to support additional features:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) - UEFI Runtime Services
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) - Retrieving various configuration information through the standardised
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) interface of UEFI configuration tables. (ACPI, SMBIOS, ...)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) For actually enabling [U]EFI support, enable:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) - CONFIG_EFI=y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) - CONFIG_EFIVAR_FS=y or m
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) The implementation depends on receiving information about the UEFI environment
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) in a Flattened Device Tree (FDT) - so is only available with CONFIG_OF.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) UEFI stub
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) =========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) The "stub" is a feature that extends the Image/zImage into a valid UEFI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) PE/COFF executable, including a loader application that makes it possible to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) load the kernel directly from the UEFI shell, boot menu, or one of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) lightweight bootloaders like Gummiboot or rEFInd.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) The kernel image built with stub support remains a valid kernel image for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) booting in non-UEFI environments.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) UEFI kernel support on ARM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) ==========================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) UEFI kernel support on the ARM architectures (arm and arm64) is only available
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) when boot is performed through the stub.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) When booting in UEFI mode, the stub deletes any memory nodes from a provided DT.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) Instead, the kernel reads the UEFI memory map.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) The stub populates the FDT /chosen node with (and the kernel scans for) the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) following parameters:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) ========================== ====== ===========================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) Name Size Description
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) ========================== ====== ===========================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) linux,uefi-system-table 64-bit Physical address of the UEFI System Table.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) linux,uefi-mmap-start 64-bit Physical address of the UEFI memory map,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) populated by the UEFI GetMemoryMap() call.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) linux,uefi-mmap-size 32-bit Size in bytes of the UEFI memory map
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) pointed to in previous entry.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) linux,uefi-mmap-desc-size 32-bit Size in bytes of each entry in the UEFI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) memory map.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) linux,uefi-mmap-desc-ver 32-bit Version of the mmap descriptor format.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) ========================== ====== ===========================================