aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-06-02 19:17:03 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-06-02 19:17:03 -0400
commit63004afa718b1506fe9a286075b3b2d8c6ca2b9b (patch)
tree2ca957b939f36c7b6a8d85e162fec9d5a4bcca99 /Documentation
parentf309532bf3e1cc1b787403d84e3039812a7dbe50 (diff)
parent40b46a7d2938589a5abab132a7824fd17ae18f62 (diff)
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull straggler x86 fixes from Peter Anvin: "Three groups of patches: - EFI boot stub documentation and the ability to print error messages; - Removal for PTRACE_ARCH_PRCTL for x32 (obsolete interface which should never have been ported, and the port is broken and potentially dangerous.) - ftrace stack corruption fixes. I'm not super-happy about the technical implementation, but it is probably the least invasive in the short term. In the future I would like a single method for nesting the debug stack, however." * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86, x32, ptrace: Remove PTRACE_ARCH_PRCTL for x32 x86, efi: Add EFI boot stub documentation x86, efi; Add EFI boot stub console support x86, efi: Only close open files in error path ftrace/x86: Do not change stacks in DEBUG when calling lockdep x86: Allow nesting of the debug stack IDT setting x86: Reset the debug_stack update counter ftrace: Use breakpoint method to update ftrace caller ftrace: Synchronize variable setting with breakpoints
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/x86/efi-stub.txt65
1 files changed, 65 insertions, 0 deletions
diff --git a/Documentation/x86/efi-stub.txt b/Documentation/x86/efi-stub.txt
new file mode 100644
index 000000000000..44e6bb6ead10
--- /dev/null
+++ b/Documentation/x86/efi-stub.txt
@@ -0,0 +1,65 @@
1 The EFI Boot Stub
2 ---------------------------
3
4On the x86 platform, a bzImage can masquerade as a PE/COFF image,
5thereby convincing EFI firmware loaders to load it as an EFI
6executable. The code that modifies the bzImage header, along with the
7EFI-specific entry point that the firmware loader jumps to are
8collectively known as the "EFI boot stub", and live in
9arch/x86/boot/header.S and arch/x86/boot/compressed/eboot.c,
10respectively.
11
12By using the EFI boot stub it's possible to boot a Linux kernel
13without the use of a conventional EFI boot loader, such as grub or
14elilo. Since the EFI boot stub performs the jobs of a boot loader, in
15a certain sense it *IS* the boot loader.
16
17The EFI boot stub is enabled with the CONFIG_EFI_STUB kernel option.
18
19
20**** How to install bzImage.efi
21
22The bzImage located in arch/x86/boot/bzImage must be copied to the EFI
23System Partiion (ESP) and renamed with the extension ".efi". Without
24the extension the EFI firmware loader will refuse to execute it. It's
25not possible to execute bzImage.efi from the usual Linux file systems
26because EFI firmware doesn't have support for them.
27
28
29**** Passing kernel parameters from the EFI shell
30
31Arguments to the kernel can be passed after bzImage.efi, e.g.
32
33 fs0:> bzImage.efi console=ttyS0 root=/dev/sda4
34
35
36**** The "initrd=" option
37
38Like most boot loaders, the EFI stub allows the user to specify
39multiple initrd files using the "initrd=" option. This is the only EFI
40stub-specific command line parameter, everything else is passed to the
41kernel when it boots.
42
43The path to the initrd file must be an absolute path from the
44beginning of the ESP, relative path names do not work. Also, the path
45is an EFI-style path and directory elements must be separated with
46backslashes (\). For example, given the following directory layout,
47
48fs0:>
49 Kernels\
50 bzImage.efi
51 initrd-large.img
52
53 Ramdisks\
54 initrd-small.img
55 initrd-medium.img
56
57to boot with the initrd-large.img file if the current working
58directory is fs0:\Kernels, the following command must be used,
59
60 fs0:\Kernels> bzImage.efi initrd=\Kernels\initrd-large.img
61
62Notice how bzImage.efi can be specified with a relative path. That's
63because the image we're executing is interpreted by the EFI shell,
64which understands relative paths, whereas the rest of the command line
65is passed to bzImage.efi.