Heinrich Schuchardt | 0445978 | 2018-07-29 13:45:47 +0200 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
Heinrich Schuchardt | c0b352e | 2019-07-14 14:05:37 +0200 | [diff] [blame] | 3 | UEFI subsystem |
| 4 | ============== |
| 5 | |
| 6 | Lauching UEFI images |
| 7 | -------------------- |
| 8 | |
| 9 | Bootefi command |
| 10 | ~~~~~~~~~~~~~~~ |
| 11 | |
| 12 | The bootefi command is used to start UEFI applications or to install UEFI |
| 13 | drivers. It takes two parameters |
| 14 | |
| 15 | bootefi <image address> [fdt address] |
| 16 | |
| 17 | * image address - the memory address of the UEFI binary |
| 18 | * fdt address - the memory address of the flattened device tree |
| 19 | |
| 20 | The environment variable 'bootargs' is passed as load options in the UEFI system |
| 21 | table. The Linux kernel EFI stub uses the load options as command line |
| 22 | arguments. |
| 23 | |
| 24 | .. kernel-doc:: cmd/bootefi.c |
| 25 | :internal: |
| 26 | |
| 27 | Boot manager |
| 28 | ~~~~~~~~~~~~ |
| 29 | |
| 30 | The UEFI specification foresees to define boot entries and boot sequence via UEFI |
| 31 | variables. Booting according to these variables is possible via |
| 32 | |
| 33 | bootefi bootmgr [fdt address] |
| 34 | |
| 35 | * fdt address - the memory address of the flattened device tree |
| 36 | |
| 37 | The relevant variables are: |
| 38 | |
| 39 | * Boot0000-BootFFFF define boot entries |
| 40 | * BootNext specifies next boot option to be booted |
| 41 | * BootOrder specifies in which sequence the boot options shall be tried if |
| 42 | BootNext is not defined or booting via BootNext fails |
| 43 | |
| 44 | .. kernel-doc:: lib/efi_loader/efi_bootmgr.c |
| 45 | :internal: |
| 46 | |
| 47 | Efidebug command |
| 48 | ~~~~~~~~~~~~~~~~ |
| 49 | |
| 50 | The efidebug command is used to set and display boot options as well as to |
| 51 | display information about internal data of the UEFI subsystem (devices, |
| 52 | drivers, handles, loaded images, and the memory map). |
| 53 | |
| 54 | .. kernel-doc:: cmd/efidebug.c |
| 55 | :internal: |
| 56 | |
| 57 | Initialization of the UEFI sub-system |
| 58 | ------------------------------------- |
| 59 | |
| 60 | .. kernel-doc:: lib/efi_loader/efi_setup.c |
| 61 | :internal: |
Heinrich Schuchardt | 0445978 | 2018-07-29 13:45:47 +0200 | [diff] [blame] | 62 | |
| 63 | Boot services |
| 64 | ------------- |
| 65 | |
| 66 | .. kernel-doc:: lib/efi_loader/efi_boottime.c |
| 67 | :internal: |
| 68 | |
Heinrich Schuchardt | 1db561e | 2019-02-16 15:22:13 +0100 | [diff] [blame] | 69 | Image relocation |
| 70 | ~~~~~~~~~~~~~~~~ |
| 71 | |
| 72 | .. kernel-doc:: lib/efi_loader/efi_image_loader.c |
| 73 | :internal: |
| 74 | |
Heinrich Schuchardt | c0b352e | 2019-07-14 14:05:37 +0200 | [diff] [blame] | 75 | Memory services |
| 76 | ~~~~~~~~~~~~~~~ |
| 77 | |
| 78 | .. kernel-doc:: lib/efi_loader/efi_memory.c |
| 79 | :internal: |
| 80 | |
Heinrich Schuchardt | 540faca | 2020-04-10 17:51:56 +0200 | [diff] [blame] | 81 | SetWatchdogTimer service |
| 82 | ~~~~~~~~~~~~~~~~~~~~~~~~ |
| 83 | |
| 84 | .. kernel-doc:: lib/efi_loader/efi_watchdog.c |
| 85 | :internal: |
| 86 | |
Heinrich Schuchardt | 0445978 | 2018-07-29 13:45:47 +0200 | [diff] [blame] | 87 | Runtime services |
| 88 | ---------------- |
| 89 | |
| 90 | .. kernel-doc:: lib/efi_loader/efi_runtime.c |
| 91 | :internal: |
Heinrich Schuchardt | c0b352e | 2019-07-14 14:05:37 +0200 | [diff] [blame] | 92 | |
| 93 | Variable services |
| 94 | ~~~~~~~~~~~~~~~~~ |
| 95 | |
Heinrich Schuchardt | f2d2b3a | 2020-06-22 18:10:27 +0200 | [diff] [blame] | 96 | .. kernel-doc:: include/efi_variable.h |
| 97 | :internal: |
Heinrich Schuchardt | c0b352e | 2019-07-14 14:05:37 +0200 | [diff] [blame] | 98 | .. kernel-doc:: lib/efi_loader/efi_variable.c |
| 99 | :internal: |
| 100 | |
| 101 | UEFI drivers |
| 102 | ------------ |
| 103 | |
| 104 | UEFI driver uclass |
| 105 | ~~~~~~~~~~~~~~~~~~ |
| 106 | .. kernel-doc:: lib/efi_driver/efi_uclass.c |
| 107 | :internal: |
| 108 | |
| 109 | Block device driver |
| 110 | ~~~~~~~~~~~~~~~~~~~ |
| 111 | |
| 112 | .. kernel-doc:: lib/efi_driver/efi_block_device.c |
| 113 | :internal: |
Heinrich Schuchardt | fe1a81c | 2019-09-05 20:37:13 +0200 | [diff] [blame] | 114 | |
| 115 | Protocols |
| 116 | --------- |
| 117 | |
| 118 | Block IO protocol |
| 119 | ~~~~~~~~~~~~~~~~~ |
| 120 | |
| 121 | .. kernel-doc:: lib/efi_loader/efi_disk.c |
| 122 | :internal: |
| 123 | |
| 124 | File protocol |
| 125 | ~~~~~~~~~~~~~ |
| 126 | |
| 127 | .. kernel-doc:: lib/efi_loader/efi_file.c |
| 128 | :internal: |
| 129 | |
| 130 | Graphical output protocol |
| 131 | ~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 132 | |
| 133 | .. kernel-doc:: lib/efi_loader/efi_gop.c |
| 134 | :internal: |
| 135 | |
Heinrich Schuchardt | 71a7de4 | 2020-02-22 07:47:20 +0100 | [diff] [blame] | 136 | Load file 2 protocol |
| 137 | ~~~~~~~~~~~~~~~~~~~~ |
| 138 | |
| 139 | The load file 2 protocol can be used by the Linux kernel to load the initial |
| 140 | RAM disk. U-Boot can be configured to provide an implementation. |
| 141 | |
| 142 | .. kernel-doc:: lib/efi_loader/efi_load_initrd.c |
| 143 | :internal: |
| 144 | |
Heinrich Schuchardt | fe1a81c | 2019-09-05 20:37:13 +0200 | [diff] [blame] | 145 | Network protocols |
| 146 | ~~~~~~~~~~~~~~~~~ |
| 147 | |
| 148 | .. kernel-doc:: lib/efi_loader/efi_net.c |
| 149 | :internal: |
| 150 | |
Heinrich Schuchardt | d417b94 | 2020-01-09 20:49:44 +0100 | [diff] [blame] | 151 | Random number generator protocol |
| 152 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 153 | |
| 154 | .. kernel-doc:: lib/efi_loader/efi_rng.c |
| 155 | :internal: |
| 156 | |
Heinrich Schuchardt | fe1a81c | 2019-09-05 20:37:13 +0200 | [diff] [blame] | 157 | Text IO protocols |
| 158 | ~~~~~~~~~~~~~~~~~ |
| 159 | |
| 160 | .. kernel-doc:: lib/efi_loader/efi_console.c |
| 161 | :internal: |
Heinrich Schuchardt | 7695655 | 2020-04-10 17:39:23 +0200 | [diff] [blame] | 162 | |
| 163 | Unicode Collation protocol |
| 164 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 165 | |
| 166 | .. kernel-doc:: lib/efi_loader/efi_unicode_collation.c |
| 167 | :internal: |
Heinrich Schuchardt | 7fec249 | 2020-05-09 07:33:43 +0200 | [diff] [blame] | 168 | |
| 169 | Unit testing |
| 170 | ------------ |
| 171 | |
| 172 | The following library functions are provided to support writing UEFI unit tests. |
| 173 | The should not be used elsewhere. |
| 174 | |
| 175 | .. kernel-doc:: include/efi_selftest.h |
| 176 | :internal: |