summaryrefslogtreecommitdiffstats
path: root/cmd/bootefi.c
Commit message (Collapse)AuthorAgeFilesLines
* efi_loader: Replace config option for initrd loadingIlias Apalodimas2021-03-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Up to now we install EFI_LOAD_FILE2_PROTOCOL to load an initrd unconditionally. Although we correctly return various EFI exit codes depending on the file status (i.e EFI_NO_MEDIA, EFI_NOT_FOUND etc), the kernel loader, only falls back to the cmdline interpreted initrd if the protocol is not installed. This creates a problem for EFI installers, since they won't be able to load their own initrd and continue the installation. It also makes the feature hard to use, since we can either have a single initrd or we have to recompile u-boot if the filename changes. So let's introduce a different logic that will decouple the initrd path from the config option we currently have. When defining a UEFI BootXXXX we can use the filepathlist and store a file path pointing to our initrd. Specifically the EFI spec describes: "The first element of the array is a device path that describes the device and location of the Image for this load option. Other device paths may optionally exist in the FilePathList, but their usage is OSV specific" When the EFI application is launched through the bootmgr, we'll try to interpret the extra device path. If that points to a file that exists on our disk, we'll now install the load_file2 and the efi-stub will be able to use it. This opens up another path using U-Boot and defines a new boot flow. A user will be able to control the kernel/initrd pairs without explicit cmdline args or GRUB. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* image: Adjust the workings of fit_check_format()Simon Glass2021-02-151-1/+1
| | | | | | | | | | | | | | | | | At present this function does not accept a size for the FIT. This means that it must be read from the FIT itself, introducing potential security risk. Update the function to include a size parameter, which can be invalid, in which case fit_check_format() calculates it. For now no callers pass the size, but this can be updated later. Also adjust the return value to an error code so that all the different types of problems can be distinguished by the user. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Bruce Monroe <bruce.monroe@intel.com> Reported-by: Arie Haenel <arie.haenel@intel.com> Reported-by: Julien Lenoir <julien.lenoir@intel.com>
* common: Drop asm/global_data.h from common headerSimon Glass2021-02-021-0/+1
| | | | | | | | | | | | Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
* efi_loader: switch to non-secure mode laterHeinrich Schuchardt2021-01-291-0/+4
| | | | | | | | | | | | | Some ARMv7 boards using PSCI require to be in secure-mode when booted via 'bootz' or 'bootm'. During distro-boot 'bootefi bootmgr' is called to check if booting via UEFI is possible. With the change we change the switch from secure mode to non-secure mode is moved from the UEFI subsystem setup to just before calling StartImage(). Cc: Jernej Škrabec <jernej.skrabec@gmail.com> Reported by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: make the UEFI boot manager configurableHeinrich Schuchardt2021-01-201-4/+9
| | | | | | | | | Some boards are very tight on the binary size. Booting via UEFI is possible without using the boot manager. Provide a configuration option to make the boot manager available. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: implement EFI_DT_FIXUP_PROTOCOLHeinrich Schuchardt2021-01-131-80/+0
| | | | | | | | | | A boot manager like GRUB can use the protocol to * apply U-Boot's fix-ups to the a device-tree * let U-Boot make memory reservations according to the device-tree * install the device-tree as a configuration table Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: setting boot deviceHeinrich Schuchardt2021-01-131-55/+87
| | | | | | | | | | | | | | | | | | | | Up to now the bootefi command used the last file loaded to determine the boot partition. This has led to errors when the fdt had been loaded from another partition after the EFI binary. Before setting the boot device from a loaded file check if it is a PE-COFF image or a FIT image. For a PE-COFF image remember address and size, boot device and path. For a FIT image remember boot device and path. If the PE-COFF image is overwritten by loading another file, forget it. Do not allow to start an image via bootefi which is not the last loaded PE-COFF image. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: simplify running helloworld.efiHeinrich Schuchardt2021-01-131-11/+1
| | | | | | | | | | | Currently when executing 'bootefi hello' we copy helloworld.efi to the address identified by environment variable loadaddr. This is unexected behavior for a user. There is no need to copy helloworld.efi before executing it after relocation. Remove the copy action. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: consider no-map property of reserved memoryHeinrich Schuchardt2020-10-061-6/+28
| | | | | | | | | | | | | | | The device tree may contain a /reserved-memory node. The no-map property of the sub-nodes signals if the memory may be accessed by the UEFI payload or not. In the EBBR specification (https://github.com/arm-software/ebbr) the modeling of the reserved memory has been clarified. If a reserved memory node in the device tree has the no-map property map, create a EfiReservedMemoryType memory map entry else use EfiBootServicesData. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: log messages for bootefi commandHeinrich Schuchardt2020-09-061-3/+9
| | | | | | | | | | | | | | Write log messages when booting via the bootefi command to allow tracking on the syslog server. Example messages are Booting /snp.efi or Booting /MemoryMapped(0x0,0x4fe00000,0x35a40) Loading image failed Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: document parameters of do_bootefi_exec()Heinrich Schuchardt2020-08-241-0/+4
| | | | | | Add the missing description of the load_options parameter. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: set load options in boot managerHeinrich Schuchardt2020-08-081-10/+12
| | | | | | | | | | | Up to now we used the value of the bootargs environment variable as load options in the boot manager. This is not correct. The data has to be taken from the Boot#### variable. Let the boot manager copy the optional data of the EFI_LOAD_OPTION as load options to the loaded image protocol. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: factor out efi_set_load_options()Heinrich Schuchardt2020-08-081-36/+19
| | | | | | | | | | The bootefi bootmgr command has to set the load options for a loaded image from the value of BootXXXX variable. If the boot manager is not used, the value is set from the environment variable bootargs (or efi_selftest). Factor out a common function efi_set_load_options(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: use logging for bootefi commandHeinrich Schuchardt2020-07-221-18/+24
| | | | | | | | | | | | Log messages of the bootefi command instead of simply printing them to the console. Do not show "## Application terminated" message when the UEFI binary completed successfully. Adjust the python tests testing for '## Application terminated'. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: incorrect check against FDT_ADDR_T_NONEHeinrich Schuchardt2020-06-301-1/+1
| | | | | | | | | | With commit 0d7c2913fdf7 ("cmd: bootefi: Honor the address & size cells properties correctly") addr was replaced by fdt_addr. But not in the check against FDT_ADDR_T_NONE. Fixes: 0d7c2913fdf7 ("cmd: bootefi: Honor the address & size cells properties correctly") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* cmd: bootefi: Fix fdt_size variable type in efi_carve_out_dt_rsv()Bin Meng2020-06-241-1/+2
| | | | | | | | Variable fdt_size should be of type 'fdt_size_t', not 'fdt_addr_t'. Fixes 0d7c2913fdf7: ("cmd: bootefi: Honor the address & size cells properties correctly") Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* cmd: bootefi: Honor the address & size cells properties correctlyAtish Patra2020-06-191-3/+6
| | | | | | | | | | | | | | | | | | fdtdec_get_addr_size reads the uses a fixed value for address & size cell properties which may not be correct always. Use the auto variant of the function which automatically reads #address-cells & #size-cells from parent and uses to read the "reg" property. Signed-off-by: Atish Patra <atish.patra@wdc.com> On 32 bit systems fdt_addr_t may be 4 bytes long but size is defined as u64. Avoid filling the upper 4 bytes of the sizep parameter of fdtdec_get_addr_size_auto_parent() with random bytes from the stack by defining a separate variable fdt_size. Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* command: Remove the cmd_tbl_t typedefSimon Glass2020-05-181-1/+2
| | | | | | | | | | | | | We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop image.h from common headerSimon Glass2020-05-181-0/+1
| | | | | | Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
* efi_loader: round the memory area in efi_add_memory_map()Michael Walle2020-05-171-6/+2
| | | | | | | | | | | | | | | | | Virtually all callers of this function do the rounding on their own. Some do it right, some don't. Instead of doing this in each caller, do the rounding in efi_add_memory_map(). Change the size parameter to bytes instead of pages and remove aligning and size calculation in all callers. There is no more need to make the original efi_add_memory_map() (which takes pages as size) available outside the module. Thus rename it to efi_add_memory_map_pg() and make it static to prevent further misuse outside the module. Signed-off-by: Michael Walle <michael@walle.cc> Add missing comma in sunxi_display.c. Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: put device tree into EfiACPIReclaimMemoryHeinrich Schuchardt2020-05-071-2/+2
| | | | | | | | | According to the UEFI spec ACPI tables should be placed in EfiACPIReclaimMemory. Let's do the same with the device tree. Suggested-by: Ard Biesheuvel <ardb@kernel.org> Cc: Grant Likely <grant.likely@arm.com> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: remove superfluous NULL check in bootefi.cHeinrich Schuchardt2020-04-301-4/+2
| | | | | | | efi_free_pool() and efi_delete_handle() both check if their argument is NULL. The caller should not duplicate this check. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: only reserve memory if fdt node enabledHeinrich Schuchardt2020-03-281-1/+2
| | | | | | | | | | | Sub-nodes of /reserved-memory may be disabled. In this case we should not reserve memory in the memory map. Reported-by: Patrick DELAUNAY <patrick.delaunay@st.com> Fixes: fef907b2e440 ("efi_loader: create reservations after ft_board_setup") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Atish Patra <atish.patra@wdc.com>
* cmd: bootefi: Parse reserved-memory node from DTAtish Patra2020-03-171-9/+34
| | | | | | | | | | | | | | | | | | | | | Currently, bootefi only parses memory reservation block to setup EFI reserved memory mappings. However, it doesn't parse the reserved-memory[1] device tree node that also can contain the reserved memory regions. Add capability to parse reserved-memory node and update the EFI memory mappings accordingly. 1. <U-Boot source>/doc/device-tree-bindings/reserved-memory/reserved-memory.txt] Signed-off-by: Atish Patra <atish.patra@wdc.com> Fix an endless loop. The /reserved-memory node may have children without reg property. Remove a superfluous debug statement. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: create reservations after ft_board_setupHeinrich Schuchardt2020-03-171-3/+3
| | | | | | | | | | | | | | Some memory reservations are made in ft_board_setup(). Ensure that we create reserved memory map entries after ft_board_setup(). The downside of this patch is that if bootefi is called multiple times with an devicetree argument superfluous reservations for the old copies of the device tree will exist. But that is still better than missing a reservation. Deleting the superfluous reservations is not possible because reservations in the memory map are rounded to page size and may be coallesced. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: fix efi_install_fdt() descriptionHeinrich Schuchardt2020-02-191-5/+5
| | | | | | | | In the function description use the correct parameter name. Mention EFI_FDT_USE_INTERNAL. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* dm: core: Create a new header file for 'compat' featuresSimon Glass2020-02-051-0/+1
| | | | | | | | | | | | At present dm/device.h includes the linux-compatible features. This requires including linux/compat.h which in turn includes a lot of headers. One of these is malloc.h which we thus end up including in every file in U-Boot. Apart from the inefficiency of this, it is problematic for sandbox which needs to use the system malloc() in some files. Move the compatibility features into a separate header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* efi_loader: free load options after executionHeinrich Schuchardt2020-01-071-12/+14
| | | | | | | | | When be launch a binary via bootefi the bootargs environment variable is used to set the load options in the loaded image protocol. Free memory allocated for load options when the UEFI binary exits. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: export efi_install_fdt()Heinrich Schuchardt2020-01-071-10/+14
| | | | | | | | | Use a pointer to addressable memory instead of a "physical" address in the virtual address space of the sandbox to efi_install_fdt(). Export the efi_install_fdt() function. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: carve out efi_run_image()Heinrich Schuchardt2020-01-071-19/+32
| | | | | | | Provide public function efi_run_imager() which can be used to run an UEFI image from memory. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: use hardware device tree by defaultHeinrich Schuchardt2020-01-071-8/+14
| | | | | | | | If the bootefi command is called without passing the address of a device tree, the internal device tree is used. For devices with a hardware device tree it is preferable to used the hardware device tree in this case. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: pass address to efi_install_fdt()Heinrich Schuchardt2020-01-071-14/+18
| | | | | | | | | | | As part of moving the parsing of command line arguments to do_bootefi() call efi_install_fdt() with the address of the device tree instead of a string. If the address is EFI_FDT_USE_INTERNAL (= 0), the internal device tree is used. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* env: Move env_get() to env.hSimon Glass2019-08-111-0/+1
| | | | | | | Move env_get() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* efi_loader: fix function comments in cmd/bootefi.cHeinrich Schuchardt2019-07-161-3/+13
| | | | | | | | Describe efi_set_bootdev(). Change function descriptions to Sphinx style. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: Change return type of efi_add_memory_map()Bryan O'Donoghue2019-07-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | We currently have some inconsistent use of efi_add_memory_map() throughout the code. In particular the return value of efi_add_memory_map() is not interpreted the same way by various users in the codebase. This patch does the following: - Changes efi_add_memory_map() to return efi_status_t. - Adds a method description to efi_add_memory_map(). - Changes efi_add_memory_map() to return EFI_SUCCESS - Returns non-zero for error in efi_add_memory_map() - Updates efi_allocate_pages() to new efi_add_memory_map() - Updates efi_free_pages() to new efi_add_memory_map() - Updates efi_carve_out_dt_rsv() to new efi_add_memory_map() - Updates efi_add_runtime_mmio() to new efi_add_memory_map() Fixes: 5d00995c361c ("efi_loader: Implement memory allocation and map") Fixes: 74c16acce30b ("efi_loader: Don't allocate from memory holes") Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Alexander Graf <agraf@csgraf.de> Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: comments for efi_install_fdt()Heinrich Schuchardt2019-05-121-3/+8
| | | | | | | | | Describe that efi_install_fdt() defaults to using the device tree indicated by environment variable fdtcontroladdr. ACPI tables and device trees are mutually exclusive. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: deduplicate code in cmd/bootefi.cHeinrich Schuchardt2019-05-121-62/+37
| | | | | | | | Move duplicate initialization code to single instance. Adjust comments of concerned functions. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: clean up UEFI sub-system initializationHeinrich Schuchardt2019-05-071-27/+0
| | | | | | | | | | | | allow_unaligned(), switch_to_non_secure_mode(), and efi_init_obj_list() are called in sequence in multiple places. Move calls to allow_unaligned() and switch_to_non_secure_mode() to efi_init_obj_list(). Remove unused includes. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: implement support of exit dataHeinrich Schuchardt2019-05-021-3/+8
| | | | | | | | | In case of a failure exit data may be passed to Exit() which in turn is returned by StartImage(). Let the `bootefi` command print the exit data string in case of an error. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: set OsIndicationsSupported at initAKASHI Takahiro2019-05-021-4/+0
| | | | | | | | | | | | UEFI variables should be installed using well-defined API. Currently we don't support much, but the value of OsIndicationsSupported will be updated once some features are added in the future. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Add comments. Rename a variable. Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: need either ACPI table or device treeHeinrich Schuchardt2019-04-231-26/+72
| | | | | | | | | | | | | The EBBR specification prescribes that we should have either an ACPI table or a device tree but not both. Let us enforce this condition in the `bootefi` command. If the bootefi command is called without a device tree parameter use a previously device tree or fall back to the internal device tree. The fdt unit test should not be run on boards with an ACPI table. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: rework bootmgr/bootefi using load_image APIAKASHI Takahiro2019-04-231-86/+94
| | | | | | | | | | | | | | | | | | | | | In the current implementation, bootefi command and EFI boot manager don't use load_image API, instead, use more primitive and internal functions. This will introduce duplicated code and potentially unknown bugs as well as inconsistent behaviours. With this patch, do_efibootmgr() and do_boot_efi() are completely overhauled and re-implemented using load_image API. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Use efi_root as parent handle for the loaded image. LoadImage() should be called with BootPolicy = true by the boot manager. Avoid duplicate free_pool(). Eliminate variable memdp which is not needed after anymore due to "efi_loader: correctly split device path of loaded image". Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* cmd: bootefi: carve out do_bootefi_image() from do_bootefi()AKASHI Takahiro2019-04-231-55/+67
| | | | | | | | | This is a preparatory patch for reworking do_bootefi() in later patch. All the non-boot-manager-based (that is, bootefi <addr>) code is put into one function, do_bootefi_image(). Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* cmd: bootefi: carve out bootmgr code from do_bootefi()AKASHI Takahiro2019-04-231-8/+36
| | | | | | | | | This is a preparatory patch for reworking do_bootefi() in later patch. do_bootmgr_exec() is renamed to do_efibootmgr() as we put all the necessary code into this function. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* cmd: bootefi: move do_bootefi_bootmgr_exec() forwardAKASHI Takahiro2019-04-231-21/+21
| | | | | | | This is a preparatory patch for reworking do_bootefi() in later patch. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* cmd: bootefi: carve out efi_selftest code from do_bootefi()AKASHI Takahiro2019-04-231-53/+92
| | | | | | | | | | | | | | This is a preparatory patch for reworking do_bootefi() in later patch. Efi_selftest code is unusual in terms of execution path in do_bootefi(), which make that function complicated and hard to understand. With this patch, all efi_selftest related code will be put in a separate function. The change also includes expanding efi_run_prepare() and efi_run_finish() in do_bootefi_exec(). Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* cmd: bootefi: merge efi_install_fdt() and efi_process_fdt()AKASHI Takahiro2019-04-231-38/+27
| | | | | | | | | | | | This is a preparatory patch for reworking do_bootefi() in later patch. For simplicity, merge two functions. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Return error code of efi_install_configuration_table() when aborting from efi_install_fdt(). Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* cmd: bootefi: carve out fdt handling from do_bootefi()AKASHI Takahiro2019-04-231-16/+38
| | | | | | | | | | This is a preparatory patch for reworking do_bootefi() in later patch. Carve out a function to handle the installation of the device tree as a configuration table in system table. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* cmd: bootefi: rework set_load_options()AKASHI Takahiro2019-04-231-9/+27
| | | | | | | | | | set_load_options() can fail, so it should return error code to stop invoking an image. In addition, set_load_options() now takes a handle, instead of loaded_image_info, to utilize efi_load_image() in a later patch. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* Change FDT memory type from runtime data to boot services dataIlias Apalodimas2019-04-121-2/+2
| | | | | | | | | | | | | | Following Ard's suggestion: Runtime data sections are intended for data that is used by the runtime services implementation. Let's change the type to EFI_BOOT_SERVICES_DATA. This also fixes booting of armv7 using efi and fdtcontroladdr. Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>