Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | .. Copyright (c) 2018 Heinrich Schuchardt |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 3 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 4 | UEFI on U-Boot |
| 5 | ============== |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 6 | |
| 7 | The Unified Extensible Firmware Interface Specification (UEFI) [1] has become |
| 8 | the default for booting on AArch64 and x86 systems. It provides a stable API for |
| 9 | the interaction of drivers and applications with the firmware. The API comprises |
| 10 | access to block storage, network, and console to name a few. The Linux kernel |
| 11 | and boot loaders like GRUB or the FreeBSD loader can be executed. |
| 12 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 13 | Development target |
| 14 | ------------------ |
Heinrich Schuchardt | a28d073 | 2019-03-28 08:09:16 +0100 | [diff] [blame] | 15 | |
Heinrich Schuchardt | 9ec8f5e | 2019-04-10 08:04:38 +0200 | [diff] [blame] | 16 | The implementation of UEFI in U-Boot strives to reach the requirements described |
| 17 | in the "Embedded Base Boot Requirements (EBBR) Specification - Release v1.0" |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 18 | [2]. The "Server Base Boot Requirements System Software on ARM Platforms" [3] |
Heinrich Schuchardt | 9ec8f5e | 2019-04-10 08:04:38 +0200 | [diff] [blame] | 19 | describes a superset of the EBBR specification and may be used as further |
| 20 | reference. |
Heinrich Schuchardt | a28d073 | 2019-03-28 08:09:16 +0100 | [diff] [blame] | 21 | |
| 22 | A full blown UEFI implementation would contradict the U-Boot design principle |
| 23 | "keep it small". |
| 24 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 25 | Building U-Boot for UEFI |
| 26 | ------------------------ |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 27 | |
Heinrich Schuchardt | 1028840 | 2018-12-30 12:54:36 +0100 | [diff] [blame] | 28 | The UEFI standard supports only little-endian systems. The UEFI support can be |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 29 | activated for ARM and x86 by specifying:: |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 30 | |
| 31 | CONFIG_CMD_BOOTEFI=y |
| 32 | CONFIG_EFI_LOADER=y |
| 33 | |
| 34 | in the .config file. |
| 35 | |
| 36 | Support for attaching virtual block devices, e.g. iSCSI drives connected by the |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 37 | loaded UEFI application [4], requires:: |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 38 | |
| 39 | CONFIG_BLK=y |
| 40 | CONFIG_PARTITIONS=y |
| 41 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 42 | Executing a UEFI binary |
| 43 | ~~~~~~~~~~~~~~~~~~~~~~~ |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 44 | |
| 45 | The bootefi command is used to start UEFI applications or to install UEFI |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 46 | drivers. It takes two parameters:: |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 47 | |
| 48 | bootefi <image address> [fdt address] |
| 49 | |
| 50 | * image address - the memory address of the UEFI binary |
| 51 | * fdt address - the memory address of the flattened device tree |
| 52 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 53 | Below you find the output of an example session starting GRUB:: |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 54 | |
| 55 | => load mmc 0:2 ${fdt_addr_r} boot/dtb |
| 56 | 29830 bytes read in 14 ms (2 MiB/s) |
| 57 | => load mmc 0:1 ${kernel_addr_r} efi/debian/grubaa64.efi |
| 58 | reading efi/debian/grubaa64.efi |
| 59 | 120832 bytes read in 7 ms (16.5 MiB/s) |
| 60 | => bootefi ${kernel_addr_r} ${fdt_addr_r} |
| 61 | |
| 62 | The environment variable 'bootargs' is passed as load options in the UEFI system |
| 63 | table. The Linux kernel EFI stub uses the load options as command line |
| 64 | arguments. |
| 65 | |
Cristian Ciocaltea | 62bb890 | 2019-12-24 18:05:41 +0200 | [diff] [blame] | 66 | Launching a UEFI binary from a FIT image |
| 67 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 68 | |
| 69 | A signed FIT image can be used to securely boot a UEFI image via the |
| 70 | bootm command. This feature is available if U-Boot is configured with:: |
| 71 | |
| 72 | CONFIG_BOOTM_EFI=y |
| 73 | |
| 74 | A sample configuration is provided as file doc/uImage.FIT/uefi.its. |
| 75 | |
| 76 | Below you find the output of an example session starting GRUB:: |
| 77 | |
| 78 | => load mmc 0:1 ${kernel_addr_r} image.fit |
| 79 | 4620426 bytes read in 83 ms (53.1 MiB/s) |
| 80 | => bootm ${kernel_addr_r}#config-grub-nofdt |
| 81 | ## Loading kernel from FIT Image at 40400000 ... |
| 82 | Using 'config-grub-nofdt' configuration |
| 83 | Verifying Hash Integrity ... sha256,rsa2048:dev+ OK |
| 84 | Trying 'efi-grub' kernel subimage |
| 85 | Description: GRUB EFI Firmware |
| 86 | Created: 2019-11-20 8:18:16 UTC |
| 87 | Type: Kernel Image (no loading done) |
| 88 | Compression: uncompressed |
| 89 | Data Start: 0x404000d0 |
| 90 | Data Size: 450560 Bytes = 440 KiB |
| 91 | Hash algo: sha256 |
| 92 | Hash value: 4dbee00021112df618f58b3f7cf5e1595533d543094064b9ce991e8b054a9eec |
| 93 | Verifying Hash Integrity ... sha256+ OK |
| 94 | XIP Kernel Image (no loading done) |
| 95 | ## Transferring control to EFI (at address 404000d0) ... |
| 96 | Welcome to GRUB! |
| 97 | |
| 98 | See doc/uImage.FIT/howto.txt for an introduction to FIT images. |
| 99 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 100 | Executing the boot manager |
| 101 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 102 | |
Heinrich Schuchardt | 1028840 | 2018-12-30 12:54:36 +0100 | [diff] [blame] | 103 | The UEFI specification foresees to define boot entries and boot sequence via UEFI |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 104 | variables. Booting according to these variables is possible via:: |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 105 | |
| 106 | bootefi bootmgr [fdt address] |
| 107 | |
| 108 | As of U-Boot v2018.03 UEFI variables are not persisted and cannot be set at |
| 109 | runtime. |
| 110 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 111 | Executing the built in hello world application |
| 112 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 113 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 114 | A hello world UEFI application can be built with:: |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 115 | |
| 116 | CONFIG_CMD_BOOTEFI_HELLO_COMPILE=y |
| 117 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 118 | It can be embedded into the U-Boot binary with:: |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 119 | |
| 120 | CONFIG_CMD_BOOTEFI_HELLO=y |
| 121 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 122 | The bootefi command is used to start the embedded hello world application:: |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 123 | |
| 124 | bootefi hello [fdt address] |
| 125 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 126 | Below you find the output of an example session:: |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 127 | |
| 128 | => bootefi hello ${fdtcontroladdr} |
| 129 | ## Starting EFI application at 01000000 ... |
| 130 | WARNING: using memory device/image path, this may confuse some payloads! |
| 131 | Hello, world! |
| 132 | Running on UEFI 2.7 |
| 133 | Have SMBIOS table |
| 134 | Have device tree |
| 135 | Load options: root=/dev/sdb3 init=/sbin/init rootwait ro |
| 136 | ## Application terminated, r = 0 |
| 137 | |
| 138 | The environment variable fdtcontroladdr points to U-Boot's internal device tree |
| 139 | (if available). |
| 140 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 141 | Executing the built-in self-test |
| 142 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 143 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 144 | An UEFI self-test suite can be embedded in U-Boot by building with:: |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 145 | |
| 146 | CONFIG_CMD_BOOTEFI_SELFTEST=y |
| 147 | |
| 148 | For testing the UEFI implementation the bootefi command can be used to start the |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 149 | self-test:: |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 150 | |
| 151 | bootefi selftest [fdt address] |
| 152 | |
| 153 | The environment variable 'efi_selftest' can be used to select a single test. If |
| 154 | it is not provided all tests are executed except those marked as 'on request'. |
| 155 | If the environment variable is set to 'list' a list of all tests is shown. |
| 156 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 157 | Below you can find the output of an example session:: |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 158 | |
| 159 | => setenv efi_selftest simple network protocol |
| 160 | => bootefi selftest |
| 161 | Testing EFI API implementation |
| 162 | Selected test: 'simple network protocol' |
| 163 | Setting up 'simple network protocol' |
| 164 | Setting up 'simple network protocol' succeeded |
| 165 | Executing 'simple network protocol' |
| 166 | DHCP Discover |
| 167 | DHCP reply received from 192.168.76.2 (52:55:c0:a8:4c:02) |
| 168 | as broadcast message. |
| 169 | Executing 'simple network protocol' succeeded |
| 170 | Tearing down 'simple network protocol' |
| 171 | Tearing down 'simple network protocol' succeeded |
| 172 | Boot services terminated |
| 173 | Summary: 0 failures |
| 174 | Preparing for reset. Press any key. |
| 175 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 176 | The UEFI life cycle |
| 177 | ------------------- |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 178 | |
| 179 | After the U-Boot platform has been initialized the UEFI API provides two kinds |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 180 | of services: |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 181 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 182 | * boot services |
| 183 | * runtime services |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 184 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 185 | The API can be extended by loading UEFI drivers which come in two variants: |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 186 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 187 | * boot drivers |
| 188 | * runtime drivers |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 189 | |
| 190 | UEFI drivers are installed with U-Boot's bootefi command. With the same command |
| 191 | UEFI applications can be executed. |
| 192 | |
| 193 | Loaded images of UEFI drivers stay in memory after returning to U-Boot while |
| 194 | loaded images of applications are removed from memory. |
| 195 | |
| 196 | An UEFI application (e.g. an operating system) that wants to take full control |
| 197 | of the system calls ExitBootServices. After a UEFI application calls |
| 198 | ExitBootServices |
| 199 | |
| 200 | * boot services are not available anymore |
| 201 | * timer events are stopped |
| 202 | * the memory used by U-Boot except for runtime services is released |
| 203 | * the memory used by boot time drivers is released |
| 204 | |
| 205 | So this is a point of no return. Afterwards the UEFI application can only return |
| 206 | to U-Boot by rebooting. |
| 207 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 208 | The UEFI object model |
| 209 | --------------------- |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 210 | |
| 211 | UEFI offers a flexible and expandable object model. The objects in the UEFI API |
| 212 | are devices, drivers, and loaded images. These objects are referenced by |
| 213 | handles. |
| 214 | |
| 215 | The interfaces implemented by the objects are referred to as protocols. These |
| 216 | are identified by GUIDs. They can be installed and uninstalled by calling the |
| 217 | appropriate boot services. |
| 218 | |
| 219 | Handles are created by the InstallProtocolInterface or the |
| 220 | InstallMultipleProtocolinterfaces service if NULL is passed as handle. |
| 221 | |
| 222 | Handles are deleted when the last protocol has been removed with the |
| 223 | UninstallProtocolInterface or the UninstallMultipleProtocolInterfaces service. |
| 224 | |
| 225 | Devices offer the EFI_DEVICE_PATH_PROTOCOL. A device path is the concatenation |
| 226 | of device nodes. By their device paths all devices of a system are arranged in a |
| 227 | tree. |
| 228 | |
| 229 | Drivers offer the EFI_DRIVER_BINDING_PROTOCOL. This protocol is used to connect |
| 230 | a driver to devices (which are referenced as controllers in this context). |
| 231 | |
| 232 | Loaded images offer the EFI_LOADED_IMAGE_PROTOCOL. This protocol provides meta |
| 233 | information about the image and a pointer to the unload callback function. |
| 234 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 235 | The UEFI events |
| 236 | --------------- |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 237 | |
| 238 | In the UEFI terminology an event is a data object referencing a notification |
| 239 | function which is queued for calling when the event is signaled. The following |
| 240 | types of events exist: |
| 241 | |
| 242 | * periodic and single shot timer events |
| 243 | * exit boot services events, triggered by calling the ExitBootServices() service |
| 244 | * virtual address change events |
| 245 | * memory map change events |
| 246 | * read to boot events |
| 247 | * reset system events |
| 248 | * system table events |
| 249 | * events that are only triggered programmatically |
| 250 | |
| 251 | Events can be created with the CreateEvent service and deleted with CloseEvent |
| 252 | service. |
| 253 | |
| 254 | Events can be assigned to an event group. If any of the events in a group is |
| 255 | signaled, all other events in the group are also set to the signaled state. |
| 256 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 257 | The UEFI driver model |
| 258 | --------------------- |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 259 | |
| 260 | A driver is specific for a single protocol installed on a device. To install a |
| 261 | driver on a device the ConnectController service is called. In this context |
| 262 | controller refers to the device for which the driver is installed. |
| 263 | |
| 264 | The relevant drivers are identified using the EFI_DRIVER_BINDING_PROTOCOL. This |
| 265 | protocol has has three functions: |
| 266 | |
| 267 | * supported - determines if the driver is compatible with the device |
| 268 | * start - installs the driver by opening the relevant protocol with |
| 269 | attribute EFI_OPEN_PROTOCOL_BY_DRIVER |
| 270 | * stop - uninstalls the driver |
| 271 | |
| 272 | The driver may create child controllers (child devices). E.g. a driver for block |
| 273 | IO devices will create the device handles for the partitions. The child |
| 274 | controllers will open the supported protocol with the attribute |
| 275 | EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. |
| 276 | |
| 277 | A driver can be detached from a device using the DisconnectController service. |
| 278 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 279 | U-Boot devices mapped as UEFI devices |
| 280 | ------------------------------------- |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 281 | |
| 282 | Some of the U-Boot devices are mapped as UEFI devices |
| 283 | |
| 284 | * block IO devices |
| 285 | * console |
| 286 | * graphical output |
| 287 | * network adapter |
| 288 | |
| 289 | As of U-Boot 2018.03 the logic for doing this is hard coded. |
| 290 | |
| 291 | The development target is to integrate the setup of these UEFI devices with the |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 292 | U-Boot driver model [5]. So when a U-Boot device is discovered a handle should |
| 293 | be created and the device path protocol and the relevant IO protocol should be |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 294 | installed. The UEFI driver then would be attached by calling ConnectController. |
| 295 | When a U-Boot device is removed DisconnectController should be called. |
| 296 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 297 | UEFI devices mapped as U-Boot devices |
| 298 | ------------------------------------- |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 299 | |
| 300 | UEFI drivers binaries and applications may create new (virtual) devices, install |
| 301 | a protocol and call the ConnectController service. Now the matching UEFI driver |
| 302 | is determined by iterating over the implementations of the |
| 303 | EFI_DRIVER_BINDING_PROTOCOL. |
| 304 | |
| 305 | It is the task of the UEFI driver to create a corresponding U-Boot device and to |
| 306 | proxy calls for this U-Boot device to the controller. |
| 307 | |
| 308 | In U-Boot 2018.03 this has only been implemented for block IO devices. |
| 309 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 310 | UEFI uclass |
| 311 | ~~~~~~~~~~~ |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 312 | |
| 313 | An UEFI uclass driver (lib/efi_driver/efi_uclass.c) has been created that |
| 314 | takes care of initializing the UEFI drivers and providing the |
| 315 | EFI_DRIVER_BINDING_PROTOCOL implementation for the UEFI drivers. |
| 316 | |
| 317 | A linker created list is used to keep track of the UEFI drivers. To create an |
| 318 | entry in the list the UEFI driver uses the U_BOOT_DRIVER macro specifying |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 319 | UCLASS_EFI as the ID of its uclass, e.g:: |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 320 | |
| 321 | /* Identify as UEFI driver */ |
| 322 | U_BOOT_DRIVER(efi_block) = { |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 323 | .name = "EFI block driver", |
| 324 | .id = UCLASS_EFI, |
| 325 | .ops = &driver_ops, |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 326 | }; |
| 327 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 328 | The available operations are defined via the structure struct efi_driver_ops:: |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 329 | |
| 330 | struct efi_driver_ops { |
| 331 | const efi_guid_t *protocol; |
| 332 | const efi_guid_t *child_protocol; |
| 333 | int (*bind)(efi_handle_t handle, void *interface); |
| 334 | }; |
| 335 | |
| 336 | When the supported() function of the EFI_DRIVER_BINDING_PROTOCOL is called the |
| 337 | uclass checks if the protocol GUID matches the protocol GUID of the UEFI driver. |
| 338 | In the start() function the bind() function of the UEFI driver is called after |
| 339 | checking the GUID. |
| 340 | The stop() function of the EFI_DRIVER_BINDING_PROTOCOL disconnects the child |
| 341 | controllers created by the UEFI driver and the UEFI driver. (In U-Boot v2013.03 |
| 342 | this is not yet completely implemented.) |
| 343 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 344 | UEFI block IO driver |
| 345 | ~~~~~~~~~~~~~~~~~~~~ |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 346 | |
| 347 | The UEFI block IO driver supports devices exposing the EFI_BLOCK_IO_PROTOCOL. |
| 348 | |
| 349 | When connected it creates a new U-Boot block IO device with interface type |
| 350 | IF_TYPE_EFI, adds child controllers mapping the partitions, and installs the |
| 351 | EFI_SIMPLE_FILE_SYSTEM_PROTOCOL on these. This can be used together with the |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 352 | software iPXE to boot from iSCSI network drives [4]. |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 353 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 354 | This driver is only available if U-Boot is configured with:: |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 355 | |
| 356 | CONFIG_BLK=y |
| 357 | CONFIG_PARTITIONS=y |
| 358 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 359 | Links |
| 360 | ----- |
Heinrich Schuchardt | 5fa03de | 2018-03-02 19:58:50 +0100 | [diff] [blame] | 361 | |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 362 | * [1] http://uefi.org/specifications - UEFI specifications |
| 363 | * [2] https://github.com/ARM-software/ebbr/releases/download/v1.0/ebbr-v1.0.pdf - |
Heinrich Schuchardt | 9ec8f5e | 2019-04-10 08:04:38 +0200 | [diff] [blame] | 364 | Embedded Base Boot Requirements (EBBR) Specification - Release v1.0 |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 365 | * [3] https://developer.arm.com/docs/den0044/latest/server-base-boot-requirements-system-software-on-arm-platforms-version-11 - |
Heinrich Schuchardt | a28d073 | 2019-03-28 08:09:16 +0100 | [diff] [blame] | 366 | Server Base Boot Requirements System Software on ARM Platforms - Version 1.1 |
Heinrich Schuchardt | fd0b53f | 2019-07-26 06:46:08 +0200 | [diff] [blame] | 367 | * [4] :doc:`iscsi` |
| 368 | * [5] :doc:`../driver-model/index` |