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