aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-06-08spl: Correct SPL_SIZE_LIMIT Kconfig optionTom Rini1-1/+1
When introduced this limit was an int but was then changed to hex without noting as much in the prompt nor changing existing users. Put this back to an int. Reported-by: Fabio Estevam <festevam@gmail.com> Tested-by: Fabio Estevam <festevam@gmail.com> Fixes: 2577015dc5c4 ("spl: add overall SPL size check") Signed-off-by: Tom Rini <trini@konsulko.com>
2019-06-07Merge branch '2019-06-07-master-imports'Tom Rini6-26/+95
- Include Heinrich's series to move the i.MX board size check function to be more widely available. - Include Simon Goldschmidt's patch to make it possible to have a more accurate SPL size check applied.
2019-06-07spl: add overall SPL size checkSimon Goldschmidt5-9/+72
This adds a size check for SPL that can dynamically check generated SPL binaries (including devicetree) for a size limit that ensures this image plus global data, heap and stack fit in initial SRAM. Since some of these sizes are not available to make, a new host tool 'spl_size_limit' is added that dumps the resulting maximum size for an SPL binary to stdout. This tool is used in toplevel Makefile to implement the size check on SPL binaries. Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
2019-06-07configs: rk3288: Tinker Board SPL file must fit into 32 KiBHeinrich Schuchardt1-0/+1
The SPL image for the Tinker Board has to fit into 32 KiB. This includes up to 2 KiB for the file header. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-07configs: define CONFIG_SPL_SIZE_LIMITHeinrich Schuchardt2-0/+16
A new configuration variable CONFIG_SPL_SIZE_LIMIT is introduced to define the board specific maximum size for the SPL file. Use Makefile function size_check() to implement the test. Depending on the size of CONFIG_SPL_SIZE_LIMIT an error like the following is thrown: spl/u-boot-spl.bin exceeds file size limit: limit: 30720 bytes actual: 33426 bytes excess: 2706 bytes make: *** [Makefile:1663: spl/u-boot-spl.bin] Error 1 Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-07imx: move BOARD_SIZE_CHECK to main MakefileHeinrich Schuchardt2-16/+1
We currently have duplicate definitions for BOARD_SIZE_CHECK in Makefile and arch/arm/mach-imx/Makefile. Move the board size check from arch/arm/mach-imx/Makefile to Makefile. Depending on the value of CONFIG_BOARD_SIZE_LIMIT an error like an error like the following is thrown: u-boot-dtb.imx exceeds file size limit: limit: 503696 bytes actual: 509720 bytes excess: 6024 bytes make: *** [Makefile:1051: u-boot-dtb.imx] Error 1 Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2019-06-07Makefile: reusable function for BOARD_SIZE_CHECKHeinrich Schuchardt1-10/+14
Carve out function size_check from macro BOARD_SIZE_CHECK. This will allow us to reuse the function for other file size checks. Depending on the value of CONFIG_BOARD_SIZE_LIMIT an error like the following is thrown: u-boot-dtb.img exceeds file size limit: limit: 409516 bytes actual: 444346 bytes excess: 34830 bytes make: *** [Makefile:1212: u-boot-dtb.img] Error 1 Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-07lib/vsprintf: allow printing upper case GUIDsHeinrich Schuchardt4-16/+49
In the UEFI context GUIDs are expected to be rendered in upper case. The patch uses the formerly unused bit 1 of the parameter str_format of function uuid_bin_to_str() to indicate if we need upper or lower case output. Function uuid_string() in vsprint.c is adjusted to correctly set the bit depending on the print format code. %pUb: 01020304-0506-0708-090a-0b0c0d0e0f10 %pUB: 01020304-0506-0708-090A-0B0C0D0E0F10 %pUl: 04030201-0605-0807-090a-0b0c0d0e0f10 %pUL: 04030201-0605-0807-090A-0B0C0D0E0F10 Up to this point only a diagnostic message in mount_ubifs() using '%pUB' is concerned by the change. Further patches are needed to adjust the UEFI subsystem. A unit test is provided inside the ut_print command. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-05Merge tag 'efi-2019-07-rc4-2' of git://git.denx.de/u-boot-efiTom Rini11-21/+100
Pull request for UEFI sub-system for v2019.07-rc4-2 Support for managing the non-volatile attribute of UEFI variables is added though we do not have a backend for persistence yet. Error messages for changes of UEFI variables are provided. UEFI boottime service implementations are corrected.
2019-06-05Merge branch '2019-06-05-master-imports'Tom Rini21-1094/+299
- More DaVinci fixes - BuR platform fix
2019-06-05cmd/led: check subcommand "list" instead "l"Heiko Schocher1-2/+2
current implementation for checking if "led list" command is called checks only if "l" is passed to the led command. This prevents switching leds with name which starts also with a "l". So check for passing "list". While at it, also fix a typo in led command usage. Signed-off-by: Heiko Schocher <hs@denx.de>
2019-06-05board: am335x/mux: configure the pins for 8-bit data transfer on MMC1Jean-Jacques Hiblot1-0/+4
This is required for proper operation of the 8-bit data transfers. This fixes transient errors seen on BeagleBone Black. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2019-06-05board/km: update maintainer e-mailHolger Brunck3-3/+3
Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
2019-06-05arm: davinci: remove leftover assemblyBartosz Golaszewski2-696/+0
There are no more users of lowlevel_init.S. Remove the file. Suggested-by: Adam Ford <aford173@gmail.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2019-06-05configs/legoev3: define CONFIG_SKIP_LOWLEVEL_INITDavid Lechner1-0/+1
This adds a define for CONFIG_SKIP_LOWLEVEL_INIT in the legoev3 config. On the EV3, U-Boot is loaded into RAM by another bootloader, so we don't need the lowlevel init in U-Boot. Signed-off-by: David Lechner <david@lechnology.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2019-06-05ARM: da850evm: Fix reading MAC from SPIAdam Ford1-1/+1
The MAC address is located at at the last 64K of SPI Flash, and it's 6 bytes long. This patch corrects both the length and starting byte of the MAC address. Signed-off-by: Adam Ford <aford173@gmail.com>
2019-06-05arm: omap3: Manually initialize GPIO if OF_CONTROL doesn'tAdam Ford1-1/+3
The commong initialization code manually initializes the GPIO even when OF_CONTROL does it, so we can reduce the code size a bit by not doing it manually when we have device tree support. Using the omap3_logic board (dm3730), the sizes shrunk: Before: text data bss dec hex filename 561066 28596 116880 706542 ac7ee u-boot 55245 1605 1888 58738 e572 spl/u-boot-spl After text data bss dec hex filename 560898 28548 116872 706318 ac70e u-boot 55121 1557 1888 58566 e4c6 spl/u-boot-spl Signed-off-by: Adam Ford <aford173@gmail.com>
2019-06-05ARM: DTS: imx6q-logicpd: Resync with Linux 5.1Adam Ford3-384/+279
Resync imx6q-logicpd with Kernel 5.1.5 Signed-off-by: Adam Ford <aford173@gmail.com>
2019-06-05ARM: davinci: Remove ipam390 linker script from KconfigAdam Ford1-1/+0
With ipam390 support removed in we can remove the reference to the linker script since that case will never be true. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2019-06-05ARM: davinci: SPL: fix BSS initializationSekhar Nori5-5/+4
U-Boot README recommends initializing SDRAM in board_init_f(). DA850 was doing it as part of board_init_r() (through call to spl_board_init() which calls arch_cpu_init() which calls da850_ddr_setup()) This worked fine till commit 15b8c7505819 ("davinci: da850evm/omapl138-lcdk: Move BSS to SDRAM because SRAM is full") moved BSS to SDRAM. Functions like mmc_initialize() called in board_init_r() assume BSS is available. Since SDRAM was not initialized when arch/arm/lib/crt0.S tried to initialize BSS to 0, BSS is not initialized correctly. Fix this by simply calling arch_cpu_init() from board_init_f(). Also move preloader_console_init() there to help debug issues with board_init_r(). With this spl_board_init() is no longer needed, we remove it. Tested using MMC/SD boot on OMAP-L138 LCDK board. Tested-by: Adam Ford <aford173@gmail.com> #da850evm Signed-off-by: Sekhar Nori <nsekhar@ti.com> Tested-by: Peter Howard <phoward@gme.net.au> #omapl138_lcdk
2019-06-05ARM: davinci: omal138_lcdk: fix MMC boot breakage due to driver model conversionSekhar Nori1-1/+1
commit 21af33ed0319 ("ARM: davinci: omapl138_lcdk: Enable DM_MMC") wanted to enable DM_MMC only for U-Boot and not for SPL. But CONFIG_DM_MMC is defined for SPL build too. Because of this MMC device was not getting registered for SPL causing MMC/SD boot breakage. Instead use CONFIG_IS_ENABLED(DM_MMC) which will remain false until CONFIG_SPL_DM_MMC is defined. Tested-by: Adam Ford <aford173@gmail.com> #da850evm Signed-off-by: Sekhar Nori <nsekhar@ti.com> Tested-by: Peter Howard <phoward@gme.net.au> #omapl138_lcdk
2019-06-05board/BuR/common: fix detection for PSC/STM resetcontrollerHannes Schmelzer1-0/+1
Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
2019-06-05Merge git://git.denx.de/u-boot-riscvTom Rini9-1/+152
- Support Microchip MPFS Icicle board. - Enable e1000 and nvme support for qemu. - Enable PCI host ECAM generic driver for qemu. - Increase the environment size to 128kB for qemu.
2019-06-05riscv: Add Microchip MPFS Icicle board supportPadmarao Begari7-0/+145
This patch adds Microchip MPFS Icicle board support. For now, NS16550 serial driver is only enabled. The Microchip MPFS Icicle defconfig by default builds U-Boot for M-Mode with SMP support. Signed-off-by: Padmarao Begari <padmarao.begari@microchip.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
2019-06-05riscv: qemu: Enable e1000 and nvme supportBin Meng1-0/+2
Since we have added the PCI support to the 'virt' target, enable e1000 and NVME as alternate network and storage devices for these virtio based devices. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de> Tested-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
2019-06-05riscv: qemu: Enable PCI host ECAM generic driverBin Meng1-0/+4
QEMU 4.0.0 'virt' target integrates a generic ECAM PCI host. Enable the driver for it. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de> Tested-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
2019-06-05riscv: increase the environment size for the qemu-riscv platform to 128kBKarsten Merker1-1/+1
The existing default size of 4kB is too small as the default environment has already nearly that size and defining a single additional environment variable can exceed the available space. Signed-off-by: Karsten Merker <merker@debian.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-06-04cmd: env: add -nv option for UEFI non-volatile variableAKASHI Takahiro2-4/+14
With this option, -nv, at "setenv -e" command, a variable will be defined as non-volatile. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-04cmd: efidebug: make some boot variables non-volatileAKASHI Takahiro1-0/+3
Boot####, BootOrder and BootNext should be non-volatile. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-04efi_loader: bootmgr: make BootNext non-volatileAKASHI Takahiro1-1/+2
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-04efi_loader: variable: support non-volatile attributeAKASHI Takahiro1-3/+9
The attribute, EFI_VARIABLE_NON_VOLATILE, should be encoded as "nv" flag in U-Boot variable if specified. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-04efi_loader: notify memory map changesHeinrich Schuchardt1-0/+11
When the memory map is changed signal events of the EFI_EVENT_GROUP_MEMORY_MAP_CHANGE event group. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-04cmd: env: print a message when setting UEFI variable failedAKASHI Takahiro1-1/+9
Error message will alert a user that setting/deleting a variable failed. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-04efi_loader: bootmgr: print a message when loading from BootNext failedAKASHI Takahiro1-1/+5
If a user defines BootNext but not BootOrder and loading from BootNext fails, you will see only a message like this: BootOrder not defined This may confuse a user. Adding an error message will be helpful. An example output looks like this: => efidebug boot add 0001 label1 scsi 0:1 "\path1\file1.efi" "--option foo" => efidebug boot add 0002 label2 scsi 0:1 "\path2\file2.efi" "--option bar" => efidebug boot add 0003 label3 scsi 0:1 "\path3\file3.efi" "--option no" => efidebug boot order 0001 0002 => efidebug boot next 0003 => bootefi bootmgr Loading from Boot0003 'label3' failed Loading from BootNext failed, falling back to BootOrder Loading from Boot0001 'label1' failed Loading from Boot0002 'label2' failed EFI boot manager: Cannot load any image Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Adjust messages. Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-04efi_loader: close protocols in UnloadImage()Heinrich Schuchardt1-2/+36
When UnloadImage() is called all protocols opened by the image have to be closed. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-04efi_loader: fix EnableCursor()Heinrich Schuchardt1-0/+1
The EnableCursor() service of the simple text output protocol must update the the CursorVisible field of the output mode. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-04efi_loader: check timer events in Stall()Heinrich Schuchardt1-1/+7
During a call to Stall() we should periodically check for timer events. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-04lib: time: export usec_to_tick()Heinrich Schuchardt3-8/+10
In the UEFI Stall() boottime service we need access to usec_to_tick(). Export the function. Remove redundant implementation in arch/arm/mach-rockchip/rk_timer.c. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-04efi_loader: DisconnectController() with no driverHeinrich Schuchardt1-2/+7
If DisconnectController() is called and no driver is managing ControllerHandle, return EFI_SUCCESS. UEFI SCT II 2017, 3.3.12 DisconnectController(), 5.1.3.12.4 - 5.1.3.12.6 Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-04Merge git://git.denx.de/u-boot-marvellTom Rini1-0/+4
- Enable MMC in SPL to enable DM MMC booting on helios4 (Dennis)
2019-06-04arm: mvebu: helios4: add MMC to SPL DTDennis Gilmore1-0/+4
This allows SPL to load the main U-Boot image from MMC once DM_MMC is enabled. Signed-off-by: Dennis Gilmore <dennis@ausil.us> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
2019-06-02Merge tag 'efi-2019-07-rc4' of git://git.denx.de/u-boot-efiTom Rini12-84/+459
Pull request for UEFI sub-system for v2019.07-rc4 Corrections for boottime services for protocols and for the SetTime() service are provided. Error messages for the 'setenv -e' and 'bootefi bootmgr' commands are added.
2019-06-02Merge branch 'master' of git://git.denx.de/u-boot-netTom Rini8-6/+228
- Basic bug fixes and minor features for 2019.07.
2019-06-01efi_selftest: unit test for OpenProtocolInformation()Heinrich Schuchardt2-0/+206
Provide a unit test that checks that the open protocol information is correctly updated when opening and closing protocols. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-01efi_loader: CloseProtocol() fix open protocol informationHeinrich Schuchardt1-1/+0
CloseProtocol() must delete all open protocol information records relating to import parameters not only one. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-01efi_loader: open protocol informationHeinrich Schuchardt1-1/+2
When a protocol is opened the open protocol information must be updated. The key fields of the open protocol information records are ImageHandle, ControllerHandle, and Attributes. Consider the Attributes field when determining if an open protocol information record has to be updated or a new one has to be created. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-01efi_loader: correct HandleProtocol()Heinrich Schuchardt1-1/+1
The UEFI specification requires that when a protocol is opened via HandleProtocol() the agent handle is the image handle of the EFI firmware (see chapter on EFI_BOOT_SERVICES.OpenProtocol()). Let efi_handle_protocol() pass efi_root as agent handle to efi_open_protocol(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-01cmd: mdio: Fix access to arbitrary PHY addressesVladimir Oltean1-2/+7
Alex reported the following: " I'm doing some MDIO work on a freescale/NXP platform and I bumped into errors with this command: => mdio r emdio#3 5 3 Reading from bus emdio#3 "Synchronous Abort" handler, esr 0x8600000e elr: ffffffff862b8000 lr : 000000008200cce4 (reloc) ... mdio list does not list any PHYs currently because ethernet is using DM and the interfaces are not probed at this time. The PHY does exist on the bus though. The above scenario works with this commit reverted: e55047ec51a662c12ed53ff543ec7cdf158b2137 cmd: mdio: Switch to generic helpers when accessing the registers The current code using generic helpers only works for PHYs that have been registered and show up in bus->phymap and crashes for arbitrary IDs. I find it useful to allow reading from other addresses over MDIO too, certainly helpful for people debugging MDIO on various boards. " Fix this by reverting to use the raw MDIO bus operations in case there is no PHY probed based on DT at the specified address. This restores the old behavior for these PHYs, which means that the newly introduced MMD-over-C22 helpers won't be available for them, but at least they will be accessible again without crashing the system. Fixes: commit e55047ec51a6 ("cmd: mdio: Switch to generic helpers when accessing the registers") Reported-by: Alex Marginean <alexm.osslist@gmail.com> Signed-off-by: Vladimir Oltean <olteanv@gmail.com> Reviewed-by: Alex Marginean <alexm.osslist@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-06-01riscv: sifive: fu540: Enable GEMGXL MGMT driverBin Meng1-0/+1
Enable the new GEMGXL MGMT driver so that GEM 10/100 Mbps works now. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de> Tested-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
2019-06-01dm: net: macb: Implement link speed change callbackBin Meng1-0/+35
At present the link speed change callback is a nop. According to macb device tree bindings, an optional "tx_clk" is used to clock the ethernet controller's TX_CLK under different link speed. In 10/100 MII mode, transmit logic must be clocked from a free running clock generated by the external PHY. In gigabit GMII mode, the controller, not the external PHY, must generate the 125 MHz transmit clock towards the PHY. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de> Tested-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>