14bf111c3SEd Maste.\" Copyright (c) 2014 The FreeBSD Foundation 24bf111c3SEd Maste.\" 34bf111c3SEd Maste.\" Redistribution and use in source and binary forms, with or without 44bf111c3SEd Maste.\" modification, are permitted provided that the following conditions 54bf111c3SEd Maste.\" are met: 64bf111c3SEd Maste.\" 1. Redistributions of source code must retain the above copyright 74bf111c3SEd Maste.\" notice, this list of conditions and the following disclaimer. 84bf111c3SEd Maste.\" 2. Redistributions in binary form must reproduce the above copyright 94bf111c3SEd Maste.\" notice, this list of conditions and the following disclaimer in the 104bf111c3SEd Maste.\" documentation and/or other materials provided with the distribution. 114bf111c3SEd Maste.\" 124bf111c3SEd Maste.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 134bf111c3SEd Maste.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 144bf111c3SEd Maste.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 154bf111c3SEd Maste.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 164bf111c3SEd Maste.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 174bf111c3SEd Maste.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 184bf111c3SEd Maste.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 194bf111c3SEd Maste.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 204bf111c3SEd Maste.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 214bf111c3SEd Maste.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 224bf111c3SEd Maste.\" SUCH DAMAGE. 234bf111c3SEd Maste.\" 24f49d6f58STom Hukins.Dd August 31, 2023 254bf111c3SEd Maste.Dt UEFI 8 264bf111c3SEd Maste.Os 274bf111c3SEd Maste.Sh NAME 284bf111c3SEd Maste.Nm UEFI 294bf111c3SEd Maste.Nd Unified Extensible Firmware Interface bootstrapping procedures 304bf111c3SEd Maste.Sh DESCRIPTION 314bf111c3SEd MasteThe 324bf111c3SEd Maste.Nm 334bf111c3SEd MasteUnified Extensible Firmware Interface provides boot- and run-time services 34a0dcb24dSEd Masteto operating systems. 354bf111c3SEd Maste.Nm 364bf111c3SEd Masteis a replacement for the legacy BIOS on the i386 and amd64 CPU architectures, 37c46e4722SWarner Loshand is also used on arm, arm64 and riscv architectures. 384bf111c3SEd Maste.Pp 39e30f16baSEd MasteThe UEFI specification is the successor to the Extensible Firmware Interface 40e30f16baSEd Maste(EFI) specification. 41c46e4722SWarner LoshThe terms UEFI and EFI are often used interchangeably. 42e30f16baSEd Maste.Pp 434bf111c3SEd MasteThe 444bf111c3SEd Maste.Nm 454bf111c3SEd Masteboot process loads system bootstrap code located in an EFI System Partition 464bf111c3SEd Maste(ESP). 47a0dcb24dSEd MasteThe ESP is a GPT or MBR partition with a specific identifier that contains an 481a720cbeSAlexander Ziaee.Xr msdosfs 4 494bf111c3SEd MasteFAT file system with a specified file hierarchy. 5020f0dabbSMateusz Piotrowski.Bl -column -offset indent "Partition Scheme" "ESP Identifier" 514bf111c3SEd Maste.It Sy "Partition Scheme" Ta Sy "ESP Identifier" 524bf111c3SEd Maste.It GPT Ta C12A7328-F81F-11D2-BA4B-00A0C93EC93B 534bf111c3SEd Maste.It MBR Ta 0xEF 544bf111c3SEd Maste.El 554bf111c3SEd Maste.Pp 564bf111c3SEd MasteThe 574bf111c3SEd Maste.Nm 584bf111c3SEd Masteboot process proceeds as follows: 594bf111c3SEd Maste.Bl -enum -offset indent -compact 604bf111c3SEd Maste.It 614bf111c3SEd Maste.Nm 624bf111c3SEd Mastefirmware runs at power up and searches for an OS loader in the EFI system 634bf111c3SEd Mastepartition. 64c46e4722SWarner LoshThe path to the loader may be set by an EFI environment variable managed by 65c46e4722SWarner Losh.Xr efibootmgr 8 . 665bb40331SEd MasteIf not set, an architecture-specific default is used. 675bb40331SEd Maste.Bl -column -offset indent "Architecture" "Default Path" 685bb40331SEd Maste.It Sy Architecture Ta Sy Default Path 695bb40331SEd Maste.It amd64 Ta Pa /EFI/BOOT/BOOTX64.EFI 70502ce04cSEdward Tomasz Napierala.It arm Ta Pa /EFI/BOOT/BOOTARM.EFI 715bb40331SEd Maste.It arm64 Ta Pa /EFI/BOOT/BOOTAA64.EFI 7212912d0eSMateusz Piotrowski.It i386 Ta Pa /EFI/BOOT/BOOTIA32.EFI 7312912d0eSMateusz Piotrowski.It riscv Ta Pa /EFI/BOOT/BOOTRISCV64.EFI 745bb40331SEd Maste.El 755bb40331SEd Maste.Pp 764bf111c3SEd MasteThe default 774bf111c3SEd Maste.Nm 784bf111c3SEd Masteboot configuration for 794bf111c3SEd Maste.Fx 804bf111c3SEd Masteinstalls 81db8b5613SRebecca Cran.Pa loader.efi 825bb40331SEd Mastein the default path. 834bf111c3SEd Maste.It 84db8b5613SRebecca Cran.Pa loader.efi 8571de598cSEd Mastereads boot configuration from 8671de598cSEd Maste.Pa /boot.config 8771de598cSEd Masteor 8871de598cSEd Maste.Pa /boot/config . 8971de598cSEd Maste.It 90db8b5613SRebecca Cran.Pa loader.efi 914bf111c3SEd Masteloads and boots the kernel, as described in 92f49d6f58STom Hukins.Xr loader.efi 8 . 934bf111c3SEd Maste.El 944bf111c3SEd Maste.Pp 954bf111c3SEd MasteThe 964bf111c3SEd Maste.Xr vt 4 974bf111c3SEd Mastesystem console is automatically selected when booting via 984bf111c3SEd Maste.Nm . 994bf111c3SEd Maste.Sh FILES 1004bf111c3SEd Maste.Bl -tag -width /boot/loader -compact 1014bf111c3SEd Maste.Nm 1024bf111c3SEd Mastebootstrap 1034bf111c3SEd Maste.It Pa /boot/loader.efi 1044bf111c3SEd MasteFinal stage bootstrap 1054bf111c3SEd Maste.It Pa /boot/kernel/kernel 10620f0dabbSMateusz PiotrowskiDefault kernel 1074bf111c3SEd Maste.It Pa /boot/kernel.old/kernel 10820f0dabbSMateusz PiotrowskiTypical non-default kernel (optional) 1094bf111c3SEd Maste.El 1104bf111c3SEd Maste.Sh SEE ALSO 111*6e1fc011SGraham Percival.Xr msdosfs 4 , 1124bf111c3SEd Maste.Xr vt 4 , 11371de598cSEd Maste.Xr boot.config 5 , 1144bf111c3SEd Maste.Xr boot 8 , 1159f747dc6SEd Maste.Xr efibootmgr 8 , 1169f747dc6SEd Maste.Xr efidp 8 , 1179f747dc6SEd Maste.Xr efivar 8 , 118d66023a0SEdward Tomasz Napierala.Xr gpart 8 , 119f49d6f58STom Hukins.Xr loader.efi 8 , 120d66023a0SEdward Tomasz Napierala.Xr uefisign 8 1214bf111c3SEd Maste.Sh HISTORY 122e20102cdSEd MasteEFI boot support for the ia64 architecture first appeared in 123e20102cdSEd Maste.Fx 5.0 . 1244bf111c3SEd Maste.Nm 125e20102cdSEd Masteboot support for amd64 first appeared in 1268c09ecb2SWarner Losh.Fx 10.1 ; 127f11e9f32SWarner Loshfor arm64 in 1288c09ecb2SWarner Losh.Fx 11.0 ; 129a2054786SAndrew Turnerfor armv7 in 130963cf6cbSJessica Clarke.Fx 12.0 ; 131963cf6cbSJessica Clarkeand for riscv in 132963cf6cbSJessica Clarke.Fx 13.0 . 133c46e4722SWarner Losh.Sh BUGS 134c46e4722SWarner LoshThere is no support for 32-bit i386 booting via UEFI. 135