summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* configs: Resync with savedefconfigTom Rini2017-07-3127-67/+27
| | | | | | Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
* configs: Migrate CMD_NAND*Tom Rini2017-07-31441-368/+371
| | | | | | | | | | Migrate all remaining instances of CMD_NAND, CMD_NAND_TRIMFFS CMD_NAND_LOCK_UNLOCK and CMD_NAND_TORTURE from the headers into the defconfig files. Tested-by: Adam Ford <aford173@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* dm: console: Check for serial devices properlySimon Glass2017-07-313-2/+12
| | | | | | | | | With driver model the serial device is often not called "serial". Mark driver-model stdio devices so that they can be detected and we can look up the uclass. This is a more reliable way of finding out whether the console is connected to a serial device or not. Signed-off-by: Simon Glass <sjg@chromium.org>
* console: Unify the check for a serial consoleSimon Glass2017-07-311-2/+17
| | | | | | | Put the check for whether a console is a serial device in a function so that we can share the code in the two places that use it. Signed-off-by: Simon Glass <sjg@chromium.org>
* arm: mach-omap2: Align image address before cache operationsAndrew F. Davis2017-07-311-4/+4
| | | | | | | | The image address passed to secure_boot_verify_image() may not be cacheline aligned, round the address down to the nearest cacheline. Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
* ti: Default to ENV_IS_IN_FAT if MMC_OMAP_HSTom Rini2017-07-3117-7/+10
| | | | | | | | When we have MMC available we assume that we want to put the env as a file on FAT. Cc: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Tom Rini <trini@konsulko.com>
* am335x_hs_evm: Disable CONFIG_SPL_ENV_SUPPORTTom Rini2017-07-311-0/+1
| | | | | | | | | | | The main uses of CONFIG_SPL_ENV_SUPPORT are for network support and for disabling "Falcon Mode" support at run-time. As this build enables neither, remove this feature. Cc: Andrew F. Davis <afd@ti.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* env: Migrate CONFIG_ENV_IS_IN_FAT options to KconfigTom Rini2017-07-3140-114/+66
| | | | | | | | We rename the various FAT_ENV_xxx options to CONFIG_ENV_FAT_xxx so that they can be modified via Kconfig. Migrate all existing users to the new values. Signed-off-by: Tom Rini <trini@konsulko.com>
* Remove unused CONFIG_TWL4030_PWMAdam Ford2017-07-312-2/+0
| | | | | | | | CONFIG_TWL4030_PWM is not being used by any source, so let's remove the #define and the whitelist entry Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* serial: stm32x7: Convert CONFIG_STM32X7_SERIAL to KconfigPatrice Chotard2017-07-314-2/+8
| | | | | | | Add CONFIG_STM32X7_SERIAL as a Kconfig option. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
* dm: Kconfig: fix typo in help for SPL_PINCTRLPhilipp Tomsich2017-07-311-1/+1
| | | | | | | Changes 'controlloers' to 'controllers' in the help-text for SPL_PINCTRL. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* efi_loader: Fix warning in efi_gopAlexander Graf2017-07-311-1/+1
| | | | | | | | | | | Commit ca9193d2b16 ("efi_loader: gop: fixes for CONFIG_DM_VIDEO without CONFIG_LCD") dropped the explicit (void*) cast for fb_base in efi gop support for CONFIG_LCD without DM. This patch adds it back, eliminating the now occuring warning again Fixes: ca9193d2b16 ("efi_loader: gop: fixes for CONFIG_DM_VIDEO without CONFIG_LCD") Reported-by: Tom Rini <trini@konsulko.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* Merge tag 'signed-efi-next' of git://github.com/agraf/u-bootTom Rini2017-07-3113-330/+1057
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch queue for efi - 2017-07-29 A lot of EFI greatness this time around. Thanks a lot to the two amazing new contributors Heinrich Schuchardt and Rob Clark we now gain - stable objects across multiple bootefi invocations - fixes for shim - fixes for ipxe - protocol installation - device path conversion to/from text - working "lsefi" support in grub - working notifiers - various bug fixes
| * efi_loader: indent entry/exit prints to show nesting levelRob Clark2017-07-292-4/+33
| | | | | | | | | | | | | | | | | | | | This should make it easier to see when a callback back to UEFI world calls back in to the u-boot world, and generally match up EFI_ENTRY() and EFI_EXIT() calls. Signed-off-by: Rob Clark <robdclark@gmail.com> [agraf: remove static from const var] Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: add checking for incorrect use of EFI_ENTRY/EXITRob Clark2017-07-292-21/+41
| | | | | | | | | | | | | | | | | | Missing an EFI_ENTRY() or doubling up EFI_EXIT() leads to non-obvious crashes. Let's add some error checking. Signed-off-by: Rob Clark <robdclark@gmail.com> [agraf: fix bogus assert() and fix app_gd breakage] Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: Add an EFI_CALL() macroRob Clark2017-07-282-3/+18
| | | | | | | | | | | | | | | | | | | | Rather than open-coding EFI_EXIT() + callback + EFI_ENTRY(), introduce an EFI_CALL() macro. This makes callbacks into UEFI world (of which there will be more in the future) more concise and easier to locate in the code. Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: only evaluate EFI_EXIT()'s ret onceRob Clark2017-07-281-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | There are a couple spots doing things like: return EFI_EXIT(some_fxn(...)); which I handn't noticed before. With addition of printing return value in the EFI_EXIT() macro, now the fxn call was getting evaluated twice. Which we didn't really want. Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: add some missing breaksRob Clark2017-07-281-0/+2
| | | | | | | | | | Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: fix bug in efi_get_memory_mapRob Clark2017-07-261-2/+2
| | | | | | | | | | | | | | | | | | | | When booting shim -> fallback -> shim -> grub -> linux the memory map is a bit larger than the size linux passes in on the first call. But in the EFI_BUFFER_TOO_SMALL case we were not passing back the updated size to linux so it would loop forever. Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: Fix configuration table overrideAlexander Graf2017-07-261-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before commit 7cbc12415d ("efi_loader: initalize EFI object list only once") we recreated the world on every bootefi invocation. That included the object tree as well as the configuration tables. Now however we don't recreate them, which means we must not explicitly override the configuration tables, as otherwise we may lose our SMBIOS table from the configuration table list on second bootefi invocation. This patch makes bootefi call our normal configuration table modification APIs to add/remove the FDT instead of recreating all tables from scratch. That way the SMBIOS table gets preserved across multiple invocations. Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: Improve install_configuration_tableAlexander Graf2017-07-261-1/+18
| | | | | | | | | | | | | | The INSTALL_CONFIGURATION_TABLE callback also provides the ability to remove table entries. This patch adds that functionality. Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: remove more double EFI_EXIT() in efi_disk.cRob Clark2017-07-261-3/+3
| | | | | | | | | | Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: remove double EFI_EXIT() with efi_unsupportedRob Clark2017-07-261-2/+2
| | | | | | | | | | | | | | | | Probably this went unnoticed before, but it causes problems with addition of 804b1d73 ("efi_loader: log EFI return values too") Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: expose protocols via GUIDRob Clark2017-07-252-0/+23
| | | | | | | | | | | | | | | | | | | | shim.efi (or rather gnu-efi's LibLocateProtocol() which shim.efi uses) resolves protocols via efi_locate_handle() so the console protocols need to be added to the efi object list. Signed-off-by: Rob Clark <robdclark@gmail.com> [agraf: whitespace fixes] Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: add helper macro to construct protocol objectsRob Clark2017-07-251-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a bunch of protocols which should be exposed by GUID but are not. Add a helper macro to create an efi_object, to avoid much typing. Note that using the pointer for efiobj->handle is semi-arbitrary. We just need a unique value to match the efiobj supporting the protocol with the handle that LocateHandle() returns.. See LibLocateProtocol() in gnu-efi. It does LocateHandle() to find all the handles, and then loops over them calling HandleProtocol() with the GUID of the protocol it is trying to find. Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: log EFI return values tooRob Clark2017-07-251-1/+4
| | | | | | | | | | | | | | Turns out this is rather useful to tracking down where things fail. Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: implement ProtocolsPerHandlexypron.glpk@gmx.de2017-07-251-1/+44
| | | | | | | | | | | | | | | | Boot service ProtocolsPerHandle is implemented in efi_protocols_per_handle. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: parameter types for CreateEvent, SetTimerxypron.glpk@gmx.de2017-07-243-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | The first argument 'type' of CreateEvent is an 32bit unsigned integer bitmap and not an enum. The second argument 'type' of SetTimer take values of an enum which is called EFI_TIMER_DELAY in the UEFI standard. To avoid confusion rename efi_event_type to efi_timer_delay. Reported-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: initalize EFI object list only onceHeinrich Schuchardt2017-07-241-26/+36
| | | | | | | | | | | | | | | | If several EFI applications are executed in sequence we want to keep the content of the EFI object list. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_console: use EFIAPI for callback functionsxypron.glpk@gmx.de2017-07-241-2/+3
| | | | | | | | | | | | | | | | The call to efi_create_event requires notification functions flagged as EFIAPI. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: workaround for grub lsefi bugRob Clark2017-07-241-0/+1
| | | | | | | | | | | | | | | | | | Patch has also been sent to fix grub to not ignore the error returned and treat protocol_buffer_count as valid. But that that might take a while to trickle into distro's, so this workaround might be useful. Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: implement ConvertDeviceNodeToTextxypron.glpk@gmx.de2017-07-241-30/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the logic for converting a node to text from efi_convert_device_path_to_text to convert_device_node_to_text. Provide a wrapper function convert_device_node_to_text_ext. As we use only shallow device paths so we can call directly call efi_device_node_to_text from efi_device_path_to_text. Add output for MAC addresses. Add output for not yet supported types/subtypes. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_memory: return MapKeyxypron.glpk@gmx.de2017-07-241-0/+2
| | | | | | | | | | | | | | | | | | | | efi_get_memory_map should set a defined value for map_key. We later can introduce the test against this value in efi_exit_boot_services as required by the UEFI standard. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_memory: do parameter checks firstxypron.glpk@gmx.de2017-07-241-3/+3
| | | | | | | | | | | | | | The parameter checks should be done first. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: gop: fixes for CONFIG_DM_VIDEO without CONFIG_LCDRob Clark2017-07-243-2/+8
| | | | | | | | | | | | | | Make EFI GOP support work with DM_VIDEO but without legacy LCD. Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: move guidcmp to headerRob Clark2017-07-242-5/+5
| | | | | | | | | | | | | | Want to re-use this for file protocol, which I'm working on. Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: EFI file paths should be DOS styleRob Clark2017-07-241-1/+5
| | | | | | | | | | | | | | | | shim.efi, for example, actually tries to parse this, but is expecting backslashes. Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: correctly implement 100ns conversionxypron.glpk@gmx.de2017-07-191-9/+40
| | | | | | | | | | | | | | | | | | | | | | In efi_set_timer we receive the trigger time in intervals of 100 ns. We should convert it to intervals of 1000 ns by 64bit division. The patch supplies function efi_div10 that uses multiplication to implement the missing 64 bit division. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_console: set up eventsxypron.glpk@gmx.de2017-07-194-3/+46
| | | | | | | | | | | | | | | | | | Set up a timer event and the WaitForKey event. In the notify function of the timer event check for console input and signal the WaitForKey event accordingly. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: refactor efi_set_timerxypron.glpk@gmx.de2017-07-192-8/+16
| | | | | | | | | | | | | | | | efi_set_timer is refactored to make the function callable internally. Wrapper function efi_set_timer_ext is provided for EFI applications. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: refactor efi_create_eventxypron.glpk@gmx.de2017-07-192-12/+29
| | | | | | | | | | | | | | | | | | efi_create_event is refactored to make it possible to call it internally. For EFI applications wrapper function efi_create_event_ext is created. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: correct size for tpl levelxypron.glpk@gmx.de2017-07-193-10/+12
| | | | | | | | | | | | | | | | | | | | | | The UEFI standard defines the type for the tpl level as EFI_TPL alias UINTN. UINTN is an integer is defined as an unsigned integer of native width. So we can use size_t for the definition. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: implement multiple event supportxypron.glpk@gmx.de2017-07-193-64/+168
| | | | | | | | | | | | | | | | Up to now the boot time supported only a single event. This patch now allows four events. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: use struct efi_event * instead of void *xypron.glpk@gmx.de2017-07-192-21/+27
| | | | | | | | | | | | | | | | In our implementation the internal structure of events is known. So use the known type instead of void. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_memory: avoid NULL dereference in efi_free_poolxypron.glpk@gmx.de2017-07-191-0/+3
| | | | | | | | | | | | | | | | | | | | If efi_free_pool is called with argument NULL an illegal memory access occurs. So let's check the parameter on entry. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: disk: iterate only over valid block devicesxypron.glpk@gmx.de2017-07-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The efi_loader currently stops iterating over the available block devices stopping at the first device that fails. This may imply that no block device is found. With the patch efi_loader only iterates over valid devices. It is based on patch 06d592bf52f6 (dm: core: Add uclass_first/next_device_check()) which is currently in u-boot-dm.git. For testing I used an odroid-c2 with a dts including &sd_emmc_a { status = "okay"; }; This device does not exist on the board and cannot be initialized. Without the patch: => bootefi hello ## Starting EFI application at 01000000 ... WARNING: Invalid device tree, expect boot to fail mmc_init: -95, time 1806 Found 0 disks Hello, world! ## Application terminated, r = 0 With the patch: => bootefi hello ## Starting EFI application at 01000000 ... WARNING: Invalid device tree, expect boot to fail mmc_init: -95, time 1806 Scanning disk mmc@70000.blk... Scanning disk mmc@72000.blk... Card did not respond to voltage select! mmc_init: -95, time 9 Scanning disk mmc@74000.blk... Found 3 disks Hello, world! ## Application terminated, r = 0 Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: provide meaningful status codexypron.glpk@gmx.de2017-07-191-8/+8
| | | | | | | | | | | | | | | | | | | | | | Currenty any EFI status other than EFI_SUCCESS is reported as Application terminated, r = -22 With the patch the status code returned by the EFI application is printed. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: define all known status codesxypron.glpk@gmx.de2017-07-191-13/+37
| | | | | | | | | | | | | | | | | | efi.h held only a few EFI status codes. The patch adds the missing definitions for later usage. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * bootefi: allow return without EFI_BOOT_SERVICES.Exitxypron.glpk@gmx.de2017-07-191-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Unified Extensible Firmware Interface Specification, version 2.7, defines in chapter 2.1.2 - UEFI Application that an EFI application may either directly return or call EFI_BOOT_SERVICES.Exit(). Unfortunately U-Boot makes the incorrect assumption that EFI_BOOT_SERVICES.Exit() is always called. So the following application leads to a memory exception on the aarch64 architecture when returning: EFI_STATUS efi_main( EFI_HANDLE handle, EFI_SYSTEM_TABlE systable) { return EFI_SUCCESS; } With this patch the entry point is stored in the image handle. The new wrapper function do_enter is used to call the EFI entry point. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: implement EFI_DEVICE_PATH_TO_TEXT_PROTOCOLxypron.glpk@gmx.de2017-07-195-1/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ConvertPathToText is implemented for * type 4 - media device path * subtype 4 - file path This is the kind of device path we hand out for block devices. All other cases may be implemented later. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> [agraf: fix whitespace] Signed-off-by: Alexander Graf <agraf@suse.de>