summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* efi_loader: struct efi_simple_text_input_protocolHeinrich Schuchardt2018-09-236-12/+12
| | | | | | | | | | | | | | %s/efi_simple_input_interface/efi_simple_text_input_protocol/ We should be consistent in the naming of the EFI protocol interface structures. The protocol is called EFI_SIMPLE_TEXT_INPUT_PROTOCOL. %s/ExtendedVerification/extended_verification/ Use consistent naming of function parameters. Do not use CamelCase. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* test/py: typo occuredHeinrich Schuchardt2018-09-231-1/+1
| | | | | | | %s/occured/occurred/ Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* test/py: test EFI_SIMPLE_TEXT_INPUT_PROTOCOLHeinrich Schuchardt2018-09-231-0/+58
| | | | | | | Execute the EFI selftest for the EFI_SIMPLE_TEXT_INPUT_PROTOCOL. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi_selftest: EFI_UNICODE_COLLATION_PROTOCOLHeinrich Schuchardt2018-09-232-0/+261
| | | | | | | Provide a unit test for the EFI_UNICODE_COLLATION_PROTOCOL. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi_loader: EFI_UNICODE_COLLATION_PROTOCOLHeinrich Schuchardt2018-09-238-3/+455
| | | | | | | The patch implements the EFI_UNICODE_COLLATION_PROTOCOL. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* test: tests for utf_to_lower() utf_to_upper().Heinrich Schuchardt2018-09-231-0/+34
| | | | | | | Provide unit tests for utf_to_lower() utf_to_upper(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* lib: charset: upper/lower case conversionHeinrich Schuchardt2018-09-233-0/+73
| | | | | | | Provide functions for upper and lower case conversion. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi_loader: capitalization tableHeinrich Schuchardt2018-09-232-0/+2029
| | | | | | | | This patch provides a define to initialize a table that maps lower to capital letters for Unicode code point 0x0000 - 0xffff. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi_loader: Add console handle references to in/out/errAlexander Graf2018-09-231-0/+6
| | | | | | | | | | | We register the console in/out protocol on the loaded image handle, but never tell anyone about it in the systab. Because of this Shell.efi can not find the input protocol. So let's add a proper reference. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: use correct documentation styleHeinrich Schuchardt2018-09-231-1/+1
| | | | | | | | | We have moved generating html documentation with Sphinx. %s/Return Value/Return/g Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi_loader: description efi_update_capsule()Heinrich Schuchardt2018-09-231-1/+1
| | | | | | | Correct the description of efi_update_capsule(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi_loader: fix typos in efi_runtime.cHeinrich Schuchardt2018-09-231-7/+8
| | | | | | | Fix multiple typos Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi_loader: fix typos in efi_boottime.cHeinrich Schuchardt2018-09-231-21/+21
| | | | | | | Fix numerous typos. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* Revert "Revert "efi_loader: efi_allocate_pages is too restrictive""Stephen Warren2018-09-231-1/+1
| | | | | | | | | | This reverts commit ccfc78b820e5e431c5bd73b072e7536a972e1710. Now that the underlying issue is fixed, we can revert the revert and hence restore the original EFI code. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* ARM: tegra: reserve unmapped RAM so EFI doesn't use itStephen Warren2018-09-231-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tegra U-Boot ensures that board_get_usable_ram_top() never returns a value over 4GB, since some peripherals can't access such addresses. However, on systems with more than 2GB of RAM, RAM bank 1 does describe this extra RAM, so that Linux (or whatever OS) can use it, subject to DMA limitations. Since board_get_usable_ram_top() points at the top of RAM bank 0, the memory locations describes by RAM bank 1 are not mapped by U-Boot's MMU configuration, and so cannot be used for anything. For some completely inexplicable reason, U-Boot's EFI support ignores the value returned by board_get_usable_ram_top(), and EFI memory allocation routines will return values above U-Boot's RAM top. This causes U-Boot to crash when it accesses that RAM, since it isn't mapped by the MMU. One use-case where this happens is TFTP download of a file on Jetson TX1 (p2371-2180). This change explicitly tells the EFI code that this extra RAM should not be used, thus avoiding the crash. A previous attempt to make EFI honor board_get_usable_ram_top() was rejected. So, this patch will need to be replicated for any board that implements board_get_usable_ram_top(). Fixes: aa909462d018 ("efi_loader: efi_allocate_pages is too restrictive") Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi_loader: simplify ifdefsStephen Warren2018-09-234-7/+7
| | | | | | | | Use CONFIG_IS_ENABLED(EFI_LOADER) to avoid explicitly checking CONFIG_SPL too. This simplifies the conditional. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* lib: charset: remove obsolete functionsHeinrich Schuchardt2018-09-232-102/+0
| | | | | | | | | | Remove functions: - utf8_to_utf16() - utf16_strcpy() - utf16_strdup() Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi_loader: buffer size for load optionsHeinrich Schuchardt2018-09-231-2/+4
| | | | | | | | | | The number of bytes in an utf-8 string is an upper limit for the number of words in the equivalent utf-16 string. In so far the inumbant coding works correctly. For non-ASCII characters the utf-16 string is shorter. With the patch only the necessary buffer size is allocated for the load options. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi_loader: don't use unlimited stack as bufferHeinrich Schuchardt2018-09-231-7/+13
| | | | | | | | | The length of a string printed to the console by the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL is not limited by the UEFI spec. Hence should not allocate a buffer for it on the stack. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi_loader: remove limit on variable lengthHeinrich Schuchardt2018-09-231-22/+30
| | | | | | | | The EFI spec does not provide a length limit for variables. Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* test: test printing UnicodeHeinrich Schuchardt2018-09-231-0/+43
| | | | | | | Test printing of Unicode strings Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* lib: vsprintf: correct printing of Unicode stringsHeinrich Schuchardt2018-09-231-9/+4
| | | | | | | | The width and precision of the printf() function refer to the number of characters not to the number of bytes printed. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* test: unit tests for Unicode functionsHeinrich Schuchardt2018-09-237-5/+491
| | | | | | | Provide unit tests for Unicode functions. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* lib: charset: utility functions for UnicodeHeinrich Schuchardt2018-09-232-3/+363
| | | | | | | | | | | | | | | utf8_get() - get next UTF-8 code point from buffer utf8_put() - write UTF-8 code point to buffer utf8_utf16_strnlen() - length of a utf-8 string after conversion to utf-16 utf8_utf16_strncpy() - copy a utf-8 string to utf-16 utf16_get() - get next UTF-16 code point from buffer utf16_put() - write UTF-16 code point to buffer utf16_strnlen() - number of codes points in a utf-16 string utf16_utf8_strnlen() - length of a utf-16 string after conversion to utf-8 utf16_utf8_strncpy() - copy a utf-16 string to utf-8 Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi_loader: rename utf16_strlen, utf16_strnlenHeinrich Schuchardt2018-09-237-23/+27
| | | | | | | | | | | The function names utf16_strlen() and utf16_strnlen() are misnomers. The functions do not count utf-16 characters but non-zero words. So let's rename them to u16_strlen and u16_strnlen(). In utf16_dup() avoid assignment in if clause. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* lib: build charset.o only if neededHeinrich Schuchardt2018-09-232-5/+12
| | | | | | | charset.o is only needed for the EFI subsystem Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* test: print_ut.c use #if CONFIG_IS_ENABLED(EFI_LOADER)Heinrich Schuchardt2018-09-231-4/+2
| | | | | | | | Using CONFIG_IS_ENABLED(EFI_LOADER) allows to simply the #if statements. Suggested-by: Alexander Graf <agraf@suse.de> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* vsprintf.c: use #if CONFIG_IS_ENABLED(EFI_LOADER)Heinrich Schuchardt2018-09-231-4/+4
| | | | | | | | Using CONFIG_IS_ENABLED(EFI_LOADER) allows to simply the #if statements. Suggested-by: Alexander Graf <agraf@suse.de> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi_loader: Pass address to fs_read()Alexander Graf2018-09-231-1/+4
| | | | | | | | | | | | | The fs_read() function wants to get an address rather than the pointer to a buffer. So let's convert the passed buffer from pointer back a the address to make efi_loader on sandbox happier. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi: sandbox: Tidy up copy_fdt() to work with sandboxSimon Glass2018-09-231-29/+50
| | | | | | | | | | | | | | | | | | | | | | | | At present this function takes a pointer as its argument, then passes this to efi_allocate_pages(), which actually takes an address. It uses casts, which are not supported on sandbox. Also the function calculates the FDT size rounded up to the neared EFI page size, then its caller recalculates the size and adds a bit more to it. This function is much better written as something that works with addresses only, and returns both the address and the size of the relocated FDT. Also, copy_fdt() returns NULL on error, but really should propagate the error from efi_allocate_pages(). To do this it needs to return an efi_status_t, not a void *. Update the code in this way, so that it is easier to follow, and also supports sandbox. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi: Relocate FDT to 127MB instead of 128MBSimon Glass2018-09-231-2/+2
| | | | | | | | Sandbox only has 128MB of memory so we cannot relocate the device tree up to start at 128MB. Use 127MB instead, which should be safe. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi_selftest: test for loaded image protocolHeinrich Schuchardt2018-09-232-0/+109
| | | | | | | | Verify that the loaded image protocol is installed on the image handle. Verify that the loaded image protocol points to the system table. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi_loader: pass system table in loaded image protocolHeinrich Schuchardt2018-09-231-0/+1
| | | | | | | | The system table must be passed as a pointer in the loaded image protocol. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi_selftest: memory leak testing manage protocolsHeinrich Schuchardt2018-09-231-2/+19
| | | | | | | Remove memory leak in efi_selftest_manageprotocols.c. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* Merge git://git.denx.de/u-boot-imxTom Rini2018-09-1915-104/+536
|\ | | | | | | | | - changes in pico-* boards - fix imx6ull pinmux
| * pico-imx7d: Add a new defconfig with PICO-Hobbit selectedOtavio Salvador2018-09-182-0/+66
| | | | | | | | | | | | | | This adds a new defconfig which pre-selects the PICO-Hobbit baseboard allowing a completely non-interactive boot process. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
| * pico-imx7d: Add PICO-Hobbit baseboard supportOtavio Salvador2018-09-181-1/+4
| | | | | | | | | | | | This adds the device tree to the DFU and bootmenu environment setting. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
| * pico-imx7d: Fix TechNexion spelling on MAINTAINERS fileOtavio Salvador2018-09-181-2/+2
| | | | | | | | Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
| * pico-imx6ul: Add a new defconfig with PICO-Pi selectedOtavio Salvador2018-09-182-0/+58
| | | | | | | | | | | | | | This adds a new defconfig which pre-selects the PICO-Pi baseboard allowing a completely non-interactive boot process. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
| * pico-imx6ul: Add PICO-Pi baseboard supportOtavio Salvador2018-09-181-0/+3
| | | | | | | | | | | | This adds the device tree to the DFU and bootmenu environment setting. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
| * pico-imx6ul: Fix TechNexion spelling on MAINTAINERS fileOtavio Salvador2018-09-181-2/+2
| | | | | | | | Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
| * Merge branch 'master' of git://git.denx.de/u-boot into masterStefano Babic2018-09-1883-723/+1043
| |\ | | | | | | | | | Signed-off-by: Stefano Babic <sbabic@denx.de>
| * | pico-imx6ul: Add instructions for booting in Falcon modeFabio Estevam2018-09-141-0/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Falcon mode allows the SPL to load and jump directly to the kernel, without loading U-Boot proper. Add detailed step by step on how to use Falcon mode on pico-imx6ul. Signed-off-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
| * | pico-imx6ul: Add Falcon mode supportOtavio Salvador2018-09-143-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Falcon mode boots the kernel directly from SPL, without loading the full U-Boot. As pico-imx6ul does not have a GPIO for selecting Falcon versus normal mode, enter in Falcon mode when the customer selects the CONFIG_SPL_OS_BOOT option in menuconfig. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
| * | wandboard: README: Include the mx6qp variant in the listFabio Estevam2018-09-141-1/+1
| | | | | | | | | | | | | | | | | | The mx6qp Wandboard variant is also supported, so add it to the list. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
| * | ARM: bootscript: For nfsargs only use rootpath (and remove not needed serverip)Lukasz Majewski2018-09-141-1/+1
| | | | | | | | | | | | | | | | | | | | | The serverip part is provided from DHCP server with 'option root-path "192.168.3.1:/srv/tftp/rootfs";' parameter in dhcpd.conf Signed-off-by: Lukasz Majewski <lukma@denx.de>
| * | ARM: bootscript: Fix the nfsargs and addip in K+P's tpcboot.cmdLukasz Majewski2018-09-141-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The quotes around ${bootargs} were missing as we elaborate those variables twice - once when we "setenv" the command and secondly when we "run" it. Without quotes we have just empty string in the second call. Moreover there is an issue with line breaks - as the original commands got truncated. Signed-off-by: Lukasz Majewski <lukma@denx.de>
| * | ARM: bootscript: Replace tftpboot with dhcp when downloading kernelLukasz Majewski2018-09-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'dhcp' command is more versatile as it allows working with the DHCP server to obtain serverip, ipaddress and other network parameters. The configuration necessary to obtain the serverip (dhcpd.conf): option option-150 code 150 = ip-address; and in the subnet definition: option option-150 192.168.X.Y; Signed-off-by: Lukasz Majewski <lukma@denx.de>
| * | ARM: bootscript: Remove hard-coded rootpath from K+P's tpcboot.cmdLukasz Majewski2018-09-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'rootpath' can be provided by DHCP server. Removing this line prevents from overwriting it. To do that on the DHCP server side (isc-dhcp-server) modify dhcpd.conf and add 'option root-path "192.168.X.Y:/srv/tftp/rootfs";' Signed-off-by: Lukasz Majewski <lukma@denx.de>
| * | imx: imx6ull: fix pinmux input_val for uart5 rx pinHeiko Schocher2018-09-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | just try to bring up an imx6ull board with console on uart5 and found, that input_val for pin MX6UL_PAD_UART5_RX_DATA__UART5_DCE_RX is 7 and not 5 on imx6ull. With this patch rx works now. Signed-off-by: Heiko Schocher <hs@denx.de>