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