1*ff61f079SJonathan Corbet.. SPDX-License-Identifier: GPL-2.0
2*ff61f079SJonathan Corbet
3*ff61f079SJonathan Corbet=====================================
4*ff61f079SJonathan CorbetGeneral note on [U]EFI x86_64 support
5*ff61f079SJonathan Corbet=====================================
6*ff61f079SJonathan Corbet
7*ff61f079SJonathan CorbetThe nomenclature EFI and UEFI are used interchangeably in this document.
8*ff61f079SJonathan Corbet
9*ff61f079SJonathan CorbetAlthough the tools below are _not_ needed for building the kernel,
10*ff61f079SJonathan Corbetthe needed bootloader support and associated tools for x86_64 platforms
11*ff61f079SJonathan Corbetwith EFI firmware and specifications are listed below.
12*ff61f079SJonathan Corbet
13*ff61f079SJonathan Corbet1. UEFI specification:  http://www.uefi.org
14*ff61f079SJonathan Corbet
15*ff61f079SJonathan Corbet2. Booting Linux kernel on UEFI x86_64 platform requires bootloader
16*ff61f079SJonathan Corbet   support. Elilo with x86_64 support can be used.
17*ff61f079SJonathan Corbet
18*ff61f079SJonathan Corbet3. x86_64 platform with EFI/UEFI firmware.
19*ff61f079SJonathan Corbet
20*ff61f079SJonathan CorbetMechanics
21*ff61f079SJonathan Corbet---------
22*ff61f079SJonathan Corbet
23*ff61f079SJonathan Corbet- Build the kernel with the following configuration::
24*ff61f079SJonathan Corbet
25*ff61f079SJonathan Corbet	CONFIG_FB_EFI=y
26*ff61f079SJonathan Corbet	CONFIG_FRAMEBUFFER_CONSOLE=y
27*ff61f079SJonathan Corbet
28*ff61f079SJonathan Corbet  If EFI runtime services are expected, the following configuration should
29*ff61f079SJonathan Corbet  be selected::
30*ff61f079SJonathan Corbet
31*ff61f079SJonathan Corbet	CONFIG_EFI=y
32*ff61f079SJonathan Corbet	CONFIG_EFIVAR_FS=y or m		# optional
33*ff61f079SJonathan Corbet
34*ff61f079SJonathan Corbet- Create a VFAT partition on the disk
35*ff61f079SJonathan Corbet- Copy the following to the VFAT partition:
36*ff61f079SJonathan Corbet
37*ff61f079SJonathan Corbet	elilo bootloader with x86_64 support, elilo configuration file,
38*ff61f079SJonathan Corbet	kernel image built in first step and corresponding
39*ff61f079SJonathan Corbet	initrd. Instructions on building elilo and its dependencies
40*ff61f079SJonathan Corbet	can be found in the elilo sourceforge project.
41*ff61f079SJonathan Corbet
42*ff61f079SJonathan Corbet- Boot to EFI shell and invoke elilo choosing the kernel image built
43*ff61f079SJonathan Corbet  in first step.
44*ff61f079SJonathan Corbet- If some or all EFI runtime services don't work, you can try following
45*ff61f079SJonathan Corbet  kernel command line parameters to turn off some or all EFI runtime
46*ff61f079SJonathan Corbet  services.
47*ff61f079SJonathan Corbet
48*ff61f079SJonathan Corbet	noefi
49*ff61f079SJonathan Corbet		turn off all EFI runtime services
50*ff61f079SJonathan Corbet	reboot_type=k
51*ff61f079SJonathan Corbet		turn off EFI reboot runtime service
52*ff61f079SJonathan Corbet
53*ff61f079SJonathan Corbet- If the EFI memory map has additional entries not in the E820 map,
54*ff61f079SJonathan Corbet  you can include those entries in the kernels memory map of available
55*ff61f079SJonathan Corbet  physical RAM by using the following kernel command line parameter.
56*ff61f079SJonathan Corbet
57*ff61f079SJonathan Corbet	add_efi_memmap
58*ff61f079SJonathan Corbet		include EFI memory map of available physical RAM
59