Re: [u-boot PATCH] arm: mach-k3: am6_init: Prioritize MSMC traffic over DDR in NAVSS Northbridge

2021-09-07 Thread Nishanth Menon
On 16:27-20210907, Tom Rini wrote: > On Tue, Sep 07, 2021 at 09:41:23PM +0200, Jan Kiszka wrote: > > On 02.09.21 08:36, Jan Kiszka wrote: > > > On 28.07.21 11:10, Jan Kiszka wrote: > > >> On 30.01.20 09:05, Roger Quadros wrote: [...] > > >

Re: [PATCH 5/5] arm: Finish migration of CONFIG_MACH_TYPE

2021-09-07 Thread Tom Rini
On Mon, Aug 30, 2021 at 09:16:32AM -0400, Tom Rini wrote: > As this is only useful when booting with ATAGs, which are now largely > disabled, remove this value for the remaining platforms. > > Cc: Phil Sutter > Signed-off-by: Tom Rini Applied to u-boot/master, thanks! -- Tom signature.asc

Re: [PATCH 4/5] arm: Add Kconfig entry for MACH_TYPE

2021-09-07 Thread Tom Rini
On Mon, Aug 30, 2021 at 09:16:31AM -0400, Tom Rini wrote: > As part of migrating support for ATAGs to Kconfig, add an option for > setting and passing MACH_TYPE. > > Signed-off-by: Tom Rini Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH 3/5] arm: Disable ATAGs support

2021-09-07 Thread Tom Rini
On Mon, Aug 30, 2021 at 09:16:30AM -0400, Tom Rini wrote: > With the exception of nokia_rx51 and icnova-a20-swac, disable ATAG > support. A large number of platforms had enabled support but never > supported a kernel so old as to require it. Further, some platforms are > old enough to support bo

Re: [PATCH 2/5] imx: Convert SERIAL_TAG support to ENV_VARS_UBOOT_RUNTIME_CONFIG

2021-09-07 Thread Tom Rini
On Mon, Aug 30, 2021 at 09:16:29AM -0400, Tom Rini wrote: > No iMX platforms have supported ATAG-based booting. They have however > re-used the CONFIG_SERIAL_TAG option as a way to enable support of > reading the OTP fuses and setting the serial# environment variable in > some cases. Change the

Re: [PATCH 1/5] Convert CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG to Kconfig

2021-09-07 Thread Tom Rini
On Mon, Aug 30, 2021 at 09:16:28AM -0400, Tom Rini wrote: > This converts the following to Kconfig: >CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG > > Signed-off-by: Tom Rini Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH u-boot] dm: pci: Fix handling of errors when scanning device

2021-09-07 Thread Bin Meng
On Wed, Sep 8, 2021 at 12:07 AM Marek Behún wrote: > > From: Pali Rohár > > Some PCIe controller's read_config() method support indicating error > directly via return value, but some cannot distinguish all-ones (or > all-zeros) read response from an error. > > The current code in pci_bind_bus_dev

[PATCH v2 10/11] ARM: dts: stm32mp: Add OP-TEE "/firmware" node to SPL dtb

2021-09-07 Thread Alexandru Gagniuc
The optee "/firmware" node is normally used to load the OP-TEE driver. SPL does not use it this way, but instead uses it to patch the kernel devicetree when booting OP-TEE. This seems weird, as OP-TEE -- which would run after SPL -- is capable of patching the devicetree and adding the required "/fi

[PATCH v2 11/11] stm32mp1: spl: Copy optee nodes to target FDT for OP-TEE payloads

2021-09-07 Thread Alexandru Gagniuc
OP-TEE does not take a devicetree for its own use. However, it does pass the devicetree to the normal world OS. In most cases that will be some other devicetree-bearing platform, such as linux. OP-TEE is capable of patching the devicetree and adding the required "/firmware" and "/reserved-memory"

[PATCH v2 09/11] lib: Makefile: Make optee library available in SPL

2021-09-07 Thread Alexandru Gagniuc
We want the optee_copy_fdt_nodes symbols in SPL. This is for cases when booting an OPTEE payload directly. Signed-off-by: Alexandru Gagniuc --- lib/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Makefile b/lib/Makefile index 8ba745faa0..73dacbb01b 100644 --- a/l

[PATCH v2 08/11] stm32mp1: spl: Configure MAC address when booting OP-TEE

2021-09-07 Thread Alexandru Gagniuc
When OP-TEE is booted as the SPL payload, the stage after OP-TEE is not guaranteed to be u-boot. Thus the FDT patching in u-boot is not guaranteed to occur. Add this step to SPL. The patching by stm32_fdt_setup_mac_addr() is done in SPL, and patches the target FDT directly. This differs is differe

[PATCH v2 01/11] spl: Move SYS_MMCSD_RAW_MODE_KERNEL_SECTOR to Kconfig

2021-09-07 Thread Alexandru Gagniuc
Although Falcon mode is very useful in improving boot speed, its implementation is quite antiquated. A question that Falcon mode asks is "Where do I look for the kernel". With MMC boot media, the correct answer is CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR. There are a few things to be said about the

[PATCH v2 05/11] fdt_support: Implement fdt_ethernet_set_macaddr()

2021-09-07 Thread Alexandru Gagniuc
Oftentimes we have MAC address information stored in a ROM or OTP. The way to add that to the FDT would be through the u-boot environment, and then fdt_fixup_ethernet(). This is not very useful in SPL. It would be more helpful to be able to "set interface x to MAC y". This is where fdt_ethernet_se

[PATCH v2 07/11] arm: stm32mp: Factor out reading MAC address from OTP

2021-09-07 Thread Alexandru Gagniuc
Move the reading the OTP into a separate function. This is required for a subsequent change which sets the MAC in SPL. Signed-off-by: Alexandru Gagniuc --- arch/arm/mach-stm32mp/cpu.c | 37 +++-- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/arch

[PATCH v2 06/11] arm: stm32mp: bsec: Update OTP shadow registers in SPL

2021-09-07 Thread Alexandru Gagniuc
For TFABOOT and SPL_BUILD, stm32mp_bsec_probe() skipped updating the OTP shadow registers. The idea is that we can't access BSEC from the normal world. This is true with TFABOOT. However, in SPL, we are in the secure world, so skipping probe is incorrect. In fact, SPL is not even built when TFABOOT

[PATCH v2 03/11] stm32mp1: Add support for falcon mode boot from SD card

2021-09-07 Thread Alexandru Gagniuc
Falcon mode requires a board-specific mechanism to select between fast and normal boot. This is done via spl_start_uboot() Use the USER2 button as the selection mechanism. This is connected to GPIO PA13. This GPIO is already accessible via the "st,fastboot-gpios" devicetree node, but is is also al

[PATCH v2 04/11] board: stm32mp1: Implement board_fit_config_name_match() for SPL

2021-09-07 Thread Alexandru Gagniuc
This function is needed when loading a FIT image from SPL. It selects the correct configuration node for the current board. Implement it. Signed-off-by: Alexandru Gagniuc --- board/st/stm32mp1/spl.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/board/st/stm32mp1/spl.c b/boa

[PATCH v2 02/11] stm32mp1: Add support for baudrates higher than 115200

2021-09-07 Thread Alexandru Gagniuc
The UART can reliably go up to 200 baud when connected to the on-board st-link. Unfortunately u-boot will fall back to 115200 unless higher rates are declared via CONFIG_SYS_BAUDRATE_TABLE. Signed-off-by: Alexandru Gagniuc Reviewed-by: Patrick Delaunay --- include/configs/stm32mp1.h | 4 +++

[PATCH v2 00/11] stm32mp1: Support falcon mode with OP-TEE payloads

2021-09-07 Thread Alexandru Gagniuc
My goal when I started on this project a year ago was to get to linux userspace within a second from power on. Oh, and it had to be secure! Contrast that to the two minutes it took the STLinux demo to come up. It was obvious that the accepted way of running an FSBL, then SSBL was going to blow the

Re: [PATCH 1/1] efi_loader: require CONFIG_BLK

2021-09-07 Thread Heinrich Schuchardt
On 9/7/21 1:25 PM, AKASHI Takahiro wrote: On Tue, Sep 07, 2021 at 09:01:08AM +0200, Heinrich Schuchardt wrote: The move to driver model should by now be completed. To be able to remove pre-driver model code from our block IO code require CONFIG_BLK=y for UEFI support. If so, we can safely remo

Re: [PATCH 1/2] board: sunxi: enable status LED early

2021-09-07 Thread Andre Przywara
On Tue, 7 Sep 2021 13:41:11 +0200 Arnaud Ferraris wrote: Hi Arnaud, > Thanks for your feedback! > > Le 07/09/2021 à 01:46, Andre Przywara a écrit : > > On Mon, 6 Sep 2021 22:57:52 +0200 > > Arnaud Ferraris wrote: > > > > Hi Arnaud, > > > >> diff --git a/board/sunxi/board.c b/board/sunxi/b

[PATCH v2 5/5] clk: ti: k3: Update driver to account for divider flags

2021-09-07 Thread Dave Gerlach
From: Suman Anna The K3 SoCs have some PLL output clocks (POSTDIV clocks) which in turn serve as inputs to other HSDIV output clocks. These clocks use the actual value to compute the divider clock rate, and need to be registered with the CLK_DIVIDER_ONE_BASED flags. The current k3-clk driver and

[PATCH v2 2/5] arm: mach-k3: j7200: Fix clk-data parenting for postdiv PLL clocks

2021-09-07 Thread Dave Gerlach
From: Suman Anna The TI K3 Fractional PLLs use two programmable POSTDIV1 and POSTDIV2 divisors to generate the final FOUTPOSTDIV clock. These are in sequence with POSTDIV2 following the POSTDIV1 clock. The current J7200 clock data has the POSTDIV2 clock as the parent for the POSTDIV1 clock, which

[PATCH v2 4/5] clk: ti: k3-pll: Change DIV_CTRL programming to read-modify-write

2021-09-07 Thread Dave Gerlach
There are three different divider values in the DIV_CTRL register controlled by the k3-pll driver. Currently the ti_pll_clk_set_rate function writes the entire register when programming plld, even though plld only resides in the lower 6 bits. Change the plld programming to read-modify-write to onl

[PATCH v2 0/5] arm: mach-k3: Fixes for j721e/j7200 clock data and drivers

2021-09-07 Thread Dave Gerlach
Hi, This is v2 of series with fixes for TI j721e and j7200 platforms data and also some fixes for TI clock drivers that make use of this data. Updates are to patch 3 to address comments from Lokesh and Suman. Patch 3 now contains a note with contact for issues with autogenerated files, http->https

[PATCH v2 3/5] arm: mach-k3: Add note to auto-generated files

2021-09-07 Thread Dave Gerlach
Add a note to the automatically generated clk-data and dev-data files for j721e and j7200 to indicate that they are in fact auto-generated and should not be hand edited. Also adjust TI URL to use https instead of http and also add an empty line before first header inclusion. Signed-off-by: Dave G

[PATCH v2 1/5] arm: mach-k3: j721e: Fix clk-data parenting for postdiv PLL clocks

2021-09-07 Thread Dave Gerlach
From: Suman Anna The TI K3 Fractional PLLs use two programmable POSTDIV1 and POSTDIV2 divisors to generate the final FOUTPOSTDIV clock. These are in sequence with POSTDIV2 following the POSTDIV1 clock. The current J721E clock data has the POSTDIV2 clock as the parent for the POSTDIV1 clock, which

Re: [PATCH u-boot-marvell v2 15/39] tools: kwboot: Allow greater timeout when executing header code

2021-09-07 Thread Marek Behún
On Tue, 7 Sep 2021 11:58:13 +0200 Marek Behún wrote: > +static uint64_t > +_now(void) > +{ > + struct timespec ts; > + > + if (clock_gettime(CLOCK_MONOTONIC, &ts)) { > + static int err_print; > + > + if (!err_print) { > + perror("clock_gettime(

Re: [u-boot PATCH] arm: mach-k3: am6_init: Prioritize MSMC traffic over DDR in NAVSS Northbridge

2021-09-07 Thread Tom Rini
On Tue, Sep 07, 2021 at 09:41:23PM +0200, Jan Kiszka wrote: > On 02.09.21 08:36, Jan Kiszka wrote: > > On 28.07.21 11:10, Jan Kiszka wrote: > >> On 30.01.20 09:05, Roger Quadros wrote: > >>> NB0 is bridge to SRAM and NB1 is bridge to DDR. > >>> > >>> To ensure that SRAM transfers are not stalled du

Re: [u-boot PATCH] arm: mach-k3: am6_init: Prioritize MSMC traffic over DDR in NAVSS Northbridge

2021-09-07 Thread Jan Kiszka
On 02.09.21 08:36, Jan Kiszka wrote: > On 28.07.21 11:10, Jan Kiszka wrote: >> On 30.01.20 09:05, Roger Quadros wrote: >>> NB0 is bridge to SRAM and NB1 is bridge to DDR. >>> >>> To ensure that SRAM transfers are not stalled due to >>> delays during DDR refreshes, SRAM traffic should be higher >>>

Re: [PATCH 2/2] mx7ulp: add base SPL support for mx7ulp

2021-09-07 Thread Fabio Estevam
Hi Oleksandr, On Tue, Sep 7, 2021 at 11:59 AM Oleksandr Suvorov wrote: > arch/arm/Makefile | 2 +- > arch/arm/mach-imx/Makefile | 2 +- > arch/arm/mach-imx/mx7ulp/soc.c | 2 +- > arch/arm/mach-imx/spl.c| 12 ++-- > include/configs/imx7ulp_spl.h | 52

Re: [PATCH 1/2] lib: optee: remove the duplicate CONFIG_OPTEE

2021-09-07 Thread Alex G.
On 9/6/21 5:39 PM, Alex G. wrote: On 9/6/21 11:53 AM, Patrick DELAUNAY wrote: In fact, the SPL boot path for OP-TEE doesn't use this function. That's intentional. Here's what I suggest:     - Remove OPTEE_TZDRAM_BASE and _SIZE There is some legacy here, board/warp7and board/technexion/p

[BUG] Pinebook Pro won't boot since ac804143cf, regression from -rc1

2021-09-07 Thread Tomasz Bielecki
Hi all, Starting with: ac804143cf (refs/bisect/bad) mmc: rockchip_sdhci: add phy and clock config for rk3399 Pinebook Pro won't boot. U-boot is installed on the internal MMC, the serial console shows this: U-Boot TPL 2021.10-rc1-00372-gac804143cf-dirty (Sep 06 2021 - 16:32:50) Channel 0: LPDDR4,

Re: Booting from NAND on an Armada-370 based machine -> Invalid header checksum

2021-09-07 Thread Uwe Kleine-König
Hello, first of all thanks for your reply and also your ideas on irc. The machine started to properly boot now after I changed the UART-to-USB adapter. (The first one I used stopped providing the /dev/ttyUSB0 device on my host machine and got quite hot.) Maybe this is related to the UART TX

[PATCH] arm: dts: sun50i-h6-orangepi-3: disable aldo2 regulator

2021-09-07 Thread Maxim Karasev
Mainline TF-A has a broken behavior - it enables all used AXP regulator outputs, without much reason. It breaks PHY on Orange Pi 3 and other boards, because they a specific power-on sequence is required. aldo2 which is enabled by TF-A is just a half of PHY's power and the other half that is untouc

[PATCH 4/4] arm: imx: mx7: Move CONFIG_OPTEE_TZDRAM_SIZE from lib/optee

2021-09-07 Thread Alexandru Gagniuc
This config is only used by three boards with this SOC. Most other platforms derive this information from devicetree, and are unlikely to ever need this config. Moreover, it is confusing when Kconfig asks for this value under "Support OPTEE images", but does not do anything with the value. Move it

[PATCH 3/4] lib: optee: Remove CONFIG_OPTEE_LOAD_ADDR

2021-09-07 Thread Alexandru Gagniuc
This value is not used by u-boot, and it should not. The load address of an OPTEE image is defined by said image. Either a uImage or a FIT will have a defined load address and entry point. Those values are the correct ones, not CONFIG_OPTEE_LOAD_ADDR. Commit f25006b96e9f ("optee: Add CONFIG_OPTEE_

[PATCH 2/4] lib: optee: Remove CONFIG_OPTEE_TZDRAM_BASE

2021-09-07 Thread Alexandru Gagniuc
It is no longer used in u-boot. Information about the TZDRAM location is usually available in the devicetree as "/reserved-memory/" nodes. Because this isn't used, remove it. Signed-off-by: Alexandru Gagniuc --- configs/warp7_bl33_defconfig | 1 - configs/warp7_defconfig | 1 - lib/optee/Kc

[PATCH 1/4] lib: optee: Avoid CONFIG_TZDRAM_* in optee_verify_bootm_image()

2021-09-07 Thread Alexandru Gagniuc
The configs TZDRAM_BASE and TZDRAM_SIZE are expected to describe the memory allocated to the OPTEE region. according to according to commit c5a6e8bd00cc ("optee: Add optee_verify_bootm_image()"). The TZDRAM is with some limitations, described by "/reserved-memory" nodes in the devicetree. Conseque

[PATCH 0/4] Repeal and replace TZDRAM_ related config options

2021-09-07 Thread Alexandru Gagniuc
When enabling OPTEE support in the config menu, one is asked for the TZDRAM region and OPTEE load address. It would seem that these are very important values, not just some half-assed bollocks. There are currently three sources of information regarding OPTEE and its associated DRAM region: 1)

[PATCH u-boot] dm: pci: Fix handling of errors when scanning device

2021-09-07 Thread Marek Behún
From: Pali Rohár Some PCIe controller's read_config() method support indicating error directly via return value, but some cannot distinguish all-ones (or all-zeros) read response from an error. The current code in pci_bind_bus_devices() interprets all-ones / all-zeros in PCI_VENDOR_ID register a

Re: [PULL] u-boot-riscv/master

2021-09-07 Thread Tom Rini
On Tue, Sep 07, 2021 at 04:20:50PM +0800, Leo Liang wrote: > Hi Tom, > > The following changes since commit ad320c237bea7ece659efaf6c1d43475e0e5db6a: > > Merge tag 'u-boot-stm32-20210906' of > https://source.denx.de/u-boot/custodians/u-boot-stm (2021-09-06 10:31:56 > -0400) > > are availabl

[PATCH u-boot-marvell] arm: a37xx: pci: Don't spam about PIO Response Status

2021-09-07 Thread Marek Behún
Use dev_dbg() instead of dev_err() in pcie_advk_check_pio_status(). For example CRS is not an error status, it just says that the request should be retried. Without this, U-Boot spams the terminal with pcie_advk pcie@d007: Non-posted PIO Response Status: UR, 0xc80 @ 0x10 pcie_advk pci

[PATCH 2/2] mx7ulp: add base SPL support for mx7ulp

2021-09-07 Thread Oleksandr Suvorov
From: Ricardo Salveti Add a base implementation of mx7ulp SPL config header and soc, and changes in makefiles in order to allow building SPL on mx7ulp based devices. Signed-off-by: Ricardo Salveti Co-developed-by: Oleksandr Suvorov Signed-off-by: Oleksandr Suvorov --- arch/arm/Makefile

[PATCH 1/2] mx7ulp: select soc features

2021-09-07 Thread Oleksandr Suvorov
Force selecting features present in SoC i.MX7ULP. Signed-off-by: Oleksandr Suvorov --- arch/arm/mach-imx/mx7ulp/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/mach-imx/mx7ulp/Kconfig b/arch/arm/mach-imx/mx7ulp/Kconfig index 2ffac9cf7c..56a3efd7b9 100644 --- a/arch/arm/m

[PATCH 0/2] Support SPL for i.MX7ULP

2021-09-07 Thread Oleksandr Suvorov
This patchset adds SPL support for mx7ulp-based boards. Oleksandr Suvorov (1): mx7ulp: select soc features Ricardo Salveti (1): mx7ulp: add base SPL support for mx7ulp arch/arm/Makefile| 2 +- arch/arm/mach-imx/Makefile | 2 +- arch/arm/mach-imx/mx7ulp/Kconfig |

Re: [PATCH 1/4] ARM: dts: at91: sama5d2_icp: add QSPI1 device

2021-09-07 Thread Eugen.Hristev
On 8/17/21 1:29 PM, Eugen Hristev wrote: > From: Mihai Sain > > Add support for sst26vf064b 64Mbit qspi-flash that is > present on sama5d2_icp board. > > Signed-off-by: Mihai Sain > [eugen.hris...@microchip.com: move u-boot properties to > sama5d2_icp-u-boot.dtsi] > Signed-off-by: Eugen Hriste

Re: tftp time outs

2021-09-07 Thread Matteo Guglielmi
Hi Harm, thanks for the suggestion. I have this set in my .config file for the compilation of u-boot: CONFIG_TFTP_BLOCKSIZE=1468 CONFIG_TFTP_WINDOWSIZE=1 I'm also using a custom boot.cmd file... should I instead just put your vars in it like this: tftpblocksize=512 tftptimeout=1 or l

Re: [PATCH u-boot-marvell v2 32/39] kwboot: Disable tty interbyte timeout

2021-09-07 Thread Marek Behún
sorry, the commit title should be tools: kwboot: Disable tty interbyte timeout instead of just kwboot: Disable tty interbyte timeout Marek

Re: [PATCH 1/2] board: sunxi: enable status LED early

2021-09-07 Thread Arnaud Ferraris
Hi André, Thanks for your feedback! Le 07/09/2021 à 01:46, Andre Przywara a écrit : > On Mon, 6 Sep 2021 22:57:52 +0200 > Arnaud Ferraris wrote: > > Hi Arnaud, > >> diff --git a/board/sunxi/board.c b/board/sunxi/board.c >> index 1a46100e40..6e0bf5fbf9 100644 >> --- a/board/sunxi/board.c >> ++

Re: [PATCH 1/1] efi_loader: require CONFIG_BLK

2021-09-07 Thread AKASHI Takahiro
On Tue, Sep 07, 2021 at 09:01:08AM +0200, Heinrich Schuchardt wrote: > The move to driver model should by now be completed. To be able to remove > pre-driver model code from our block IO code require CONFIG_BLK=y for UEFI > support. If so, we can safely remove !CONFIG_BLK-related code from efi_dis

Re: [PATCH 2/3] usb: gadget: Add CDC ACM function

2021-09-07 Thread Loic Poulain
Hi folks, Any comments on this? On Thu, 19 Aug 2021 at 13:02, Loic Poulain wrote: > > Add support for CDC ACM using the new UDC and gadget API. This protocol > can be used for serial over USB data transfer and is widely supported > by various OS (GNU/Linux, MS-Windows, OSX...). The usual purpose

[PATCH u-boot-marvell v2 28/39] tools: kwboot: Support higher baudrates when booting via UART

2021-09-07 Thread Marek Behún
From: Pali Rohár Add support for uploading the boot image (the data part only) at higher baudrate than the standard one. The kwboot utility already has -B option, but choosing other baudrate than the standard one (115200 Bd) can only work for debug mode, not for booting the device. The BootROM f

[PATCH u-boot-marvell v2 16/39] tools: kwboot: Prevent waiting indefinitely if no xmodem reply is received

2021-09-07 Thread Marek Behún
Currently if BootROM fails to respond with ACK/NAK to a xmodem block, we will be waiting indefinitely for such response. Make sure that we only wait at most 1 second (blk_rsp_timeo) for ACK/NAK for each block in case non-xmodem text output is not being expected. Interpret this timeout expiration a

[PATCH u-boot-marvell v2 27/39] tools: kwboot: Explicitly check against size of struct main_hdr_v1

2021-09-07 Thread Marek Behún
Explicitly check the image size against size of struct main_hdr_v1. This way the check is more readable, since the `hdrsz` variable may semantically contain another value. Signed-off-by: Marek Behún --- tools/kwboot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/

[PATCH u-boot-marvell v2 39/39] MAINTAINERS: Add entry for kwbimage / kwboot tools

2021-09-07 Thread Marek Behún
Add entry for these tools with Marek, Pali and Stefan as maintainers. Signed-off-by: Marek Behún --- MAINTAINERS | 10 ++ 1 file changed, 10 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 4cf0c33c5d..0ae58a85a6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -776,6 +776,16 @@

[PATCH u-boot-marvell v2 11/39] tools: kwboot: Split sending image into header and data stages

2021-09-07 Thread Marek Behún
From: Pali Rohár This change is required to implement other features in kwboot. Split sending header and data parts of the image into two stages. Signed-off-by: Pali Rohár [ refactored ] Signed-off-by: Marek Behún --- tools/kwbimage.h | 8 +++-- tools/kwboot.c | 84 +++

[PATCH u-boot-marvell v2 32/39] kwboot: Disable tty interbyte timeout

2021-09-07 Thread Marek Behún
From: Pali Rohár Function kwboot_tty_recv() has its own handling of read timeout, we don't need to do set it in tty settings. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- tools/kwboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/kwboot.c b/tools/kwbo

[PATCH u-boot-marvell v2 22/39] tools: kwboot: Patch destination address to DDR area for SPI image

2021-09-07 Thread Marek Behún
From: Pali Rohár SPI/NOR kwbimage may have destination address set to 0x, which means that the image is not downloaded to DDR but rather it is executed directly from SPI/NOR. In this case execution address is set to SPI/NOR area. When patching image to UART type, change destination and e

[PATCH u-boot-marvell v2 20/39] tools: kwboot: Don't patch image header if signed

2021-09-07 Thread Marek Behún
From: Pali Rohár It is not possible to modify image with secure header due to cryptographic signature. Signed-off-by: Pali Rohár [ refactored ] Signed-off-by: Marek Behún --- tools/kwboot.c | 30 +- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/too

[PATCH u-boot-marvell v2 15/39] tools: kwboot: Allow greater timeout when executing header code

2021-09-07 Thread Marek Behún
When executing header code (which contains U-Boot SPL in most cases), wait 10s after every non-xmodem character received (i.e. printed by U-Boot SPL) before timing out. Sometimes DDR training, which runs in SPL, may be slow. Signed-off-by: Marek Behún --- tools/kwboot.c | 34 +++

[PATCH u-boot-marvell v2 37/39] tools: kwboot: Add Pali and Marek as authors

2021-09-07 Thread Marek Behún
From: Pali Rohár Add Pali and Marek as another authors of the kwboot utility. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- tools/kwboot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/kwboot.c b/tools/kwboot.c index e4802d4371..c7d2a38cd3 100644 --- a/tools/kwboot.c

[PATCH u-boot-marvell v2 38/39] doc/kwboot.1: Update man page

2021-09-07 Thread Marek Behún
Update man page for the kwboot utility. Signed-off-by: Marek Behún --- doc/kwboot.1 | 60 ++-- 1 file changed, 39 insertions(+), 21 deletions(-) diff --git a/doc/kwboot.1 b/doc/kwboot.1 index 1e9ca268f7..acdea891d9 100644 --- a/doc/kwboot.1 +++ b/

[PATCH u-boot-marvell v2 35/39] tools: kwboot: Avoid code repetition in kwboot_img_patch()

2021-09-07 Thread Marek Behún
Change kwboot_img_patch() to avoid code repetition of setting errno to EINVAL. Signed-off-by: Marek Behún --- tools/kwboot.c | 55 ++ 1 file changed, 20 insertions(+), 35 deletions(-) diff --git a/tools/kwboot.c b/tools/kwboot.c index 8e361dad56..

[PATCH u-boot-marvell v2 36/39] tools: kwboot: Update file header

2021-09-07 Thread Marek Behún
Mention all supported platforms in file header. Signed-off-by: Marek Behún --- tools/kwboot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/kwboot.c b/tools/kwboot.c index 0969b8cf8a..e4802d4371 100644 --- a/tools/kwboot.c +++ b/tools/kwboot.c @@ -1,6 +1,7 @@ /*

[PATCH u-boot-marvell v2 34/39] tools: kwboot: Cosmetic fix

2021-09-07 Thread Marek Behún
Add spaces around the | operator. Signed-off-by: Marek Behún --- tools/kwboot.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/kwboot.c b/tools/kwboot.c index 546112c964..8e361dad56 100644 --- a/tools/kwboot.c +++ b/tools/kwboot.c @@ -644,7 +644,7 @@ kwboot_open_

[PATCH u-boot-marvell v2 24/39] tools: kwbimage: Refactor kwbimage header size determination

2021-09-07 Thread Marek Behún
Add functions kwbheader_size() and kwbheader_size_for_csum(). Refactor code determining header size to use these functions. Refactor header checksum determining function. Remove stuff that is not needed anymore. This simplifies the code a little and fixes one instance of validating header size

[PATCH u-boot-marvell v2 33/39] tools: kwboot: Disable non-blocking mode

2021-09-07 Thread Marek Behún
From: Pali Rohár The kwboot utility does not handle EAGAIN / EBUSY errors, it expects blocking mode on tty - it uses select() to check if data is available. Disable non-blocking mode by clearing O_NDELAY flag which was set by open(). We can't just take O_NDELAY from open(), because it is requir

[PATCH u-boot-marvell v2 30/39] tools: kwboot: Check whether baudrate was set to requested value

2021-09-07 Thread Marek Behún
The tcsetattr() function can return 0 even if baudrate was not changed. Check whether baudrate was changed to requested value, and in case of arbitrary baudrate, check whether the set value is within 3% tolerance. Signed-off-by: Marek Behún --- tools/kwboot.c | 32 +++

[PATCH u-boot-marvell v2 26/39] tools: kwboot: Round up header size to 128 B when patching

2021-09-07 Thread Marek Behún
From: Pali Rohár The beginning of image data must be sent in a separate xmodem block; the block must not contain end of header with the beginning of data. Therefore we need to ensure that the image header size is a multiple of xmodem block size (which is 128 B). Read the file into a malloc()ed

[PATCH u-boot-marvell v2 23/39] tools: kwbimage: Refactor image_version()

2021-09-07 Thread Marek Behún
Rename this function to kwbimage_version() and don't cast argument if not needed. Signed-off-by: Marek Behún --- tools/kwbimage.c | 8 tools/kwbimage.h | 4 ++-- tools/kwboot.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/kwbimage.c b/tools/kwbimage.c

[PATCH u-boot-marvell v2 25/39] tools: kwbimage: Update comments describing kwbimage v1 structures

2021-09-07 Thread Marek Behún
From: Pali Rohár These structures are relevant for several other platforms, mention them all. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- tools/kwbimage.c | 3 ++- tools/kwbimage.h | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/kwbimage.c b/tools

[PATCH u-boot-marvell v2 21/39] tools: kwboot: Patch source address in image header

2021-09-07 Thread Marek Behún
From: Pali Rohár Some image types have source address in non-bytes unit; for example for SATA images, it is in 512 B units. We need to multiply by unit size when patching image type to UART. Signed-off-by: Pali Rohár [ refactored ] Signed-off-by: Marek Behún --- tools/kwboot.c | 40 +

[PATCH u-boot-marvell v2 14/39] tools: kwboot: Print new line after SPL output

2021-09-07 Thread Marek Behún
There is no separation between output from the code from binary header (U-Boot SPL in most cases) and subsequent kwboot output. Print '\n' to make distinguishing these two easier. Signed-off-by: Marek Behún --- tools/kwboot.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) di

[PATCH u-boot-marvell v2 19/39] tools: kwbimage: Simplify iteration over version 1 optional headers

2021-09-07 Thread Marek Behún
Create macro for_each_opt_hdr_v1 and functions opt_hdr_v1_size(), opt_hdr_v1_valid_size(), opt_hdr_v1_ext(), opt_hdr_v1_first() and opt_hdr_v1_next() to simplify iteration over version 1 optional headers. This prevents ugly code repetition and makes it nicer to read. Signed-off-by: Ma

[PATCH u-boot-marvell v2 13/39] tools: kwboot: Allow non-xmodem text output from BootROM only in a specific case

2021-09-07 Thread Marek Behún
From: Pali Rohár When sending image header / image data, BootROM does not send any non-xmodem text output. We should therefore interpret unknown bytes in the xmodem protocol as errors and resend current packet. This should improve the transfer in case there are errors on the UART line. Text outp

[PATCH u-boot-marvell v2 10/39] tools: kwboot: Print newline on error when progress was not completed

2021-09-07 Thread Marek Behún
From: Pali Rohár When progress was not completed, current terminal position is in progress bar. So print newline before printing error message to make error message more readable. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwboot.c | 1 + 1 file changed, 1 insertion(+) diff

[PATCH u-boot-marvell v2 12/39] tools: kwboot: Use a function to check whether received byte is a Xmodem reply

2021-09-07 Thread Marek Behún
This is a non-functional change that should make the code more readable. Signed-off-by: Marek Behún --- tools/kwboot.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/kwboot.c b/tools/kwboot.c index 7f231c0823..2e5684b91c 100644 --- a/tools/kwboot.c +++ b/too

[PATCH u-boot-marvell v2 09/39] tools: kwboot: Fix printing progress

2021-09-07 Thread Marek Behún
From: Pali Rohár Ensure that `pos` is still in range up to the `width` so printing 100% works also for bigger images. After printing 100% progress reset it to zero, so that next progressbar can be started. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwboot.c | 9 +++-- 1

[PATCH u-boot-marvell v2 07/39] tools: kwboot: Fix return type of kwboot_xm_makeblock() function

2021-09-07 Thread Marek Behún
From: Pali Rohár Function kwboot_xm_makeblock() always returns length of xmodem block. It is always non-negative and calculated from variable with size_t type. Set return type of this function to size_t and remove dead code which checks for negative value. Signed-off-by: Pali Rohár Reviewed-by:

[PATCH u-boot-marvell v2 06/39] tools: kwboot: Fix kwboot_xm_sendblock() function when kwboot_tty_recv() fails

2021-09-07 Thread Marek Behún
From: Pali Rohár When kwboot_tty_recv() fails or times out, it does not set the `c` variable to NAK. The variable is then compared, while it holds either an undefined value or a value from previous iteration. Set `c` to NAK so that the other side will try to resend current block, and remove the n

[PATCH u-boot-marvell v2 05/39] tools: kwboot: Print version information header

2021-09-07 Thread Marek Behún
From: Pali Rohár Print kwboot's (U-Boot's) version when printing usage. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwboot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/kwboot.c b/tools/kwboot.c index 22cdd137ad..454339db14 100644 --- a/tools/kwboot.c +++ b/to

[PATCH u-boot-marvell v2 08/39] tools: kwboot: Fix comparison of integers with different size

2021-09-07 Thread Marek Behún
The compiler complains that we are comparing int with size_t when compiled with -W. Signed-off-by: Marek Behún --- tools/kwboot.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/kwboot.c b/tools/kwboot.c index 88353d19c0..3d9f73e697 100644 --- a/tools/kwboot.c +++ b/t

[PATCH u-boot-marvell v2 03/39] tools: kwboot: Make the quit sequence buffer const

2021-09-07 Thread Marek Behún
This buffer is never written to. Make it const. Signed-off-by: Marek Behún --- tools/kwboot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/kwboot.c b/tools/kwboot.c index e6e99849a7..f18f6d2134 100644 --- a/tools/kwboot.c +++ b/tools/kwboot.c @@ -460,7 +460,7 @@

[PATCH u-boot-marvell v2 02/39] tools: kwboot: Fix buffer overflow in kwboot_terminal()

2021-09-07 Thread Marek Behún
The `in` variable is set to -1 in kwboot_terminal() if stdin is not a tty. In this case we should not look whether -1 is set in fd_set, for it can lead to a buffer overflow, which can be reproduced with echo "xyz" | ./tools/kwboot -t /dev/ttyUSB0 Signed-off-by: Marek Behún --- tools/kwboot.c |

[PATCH u-boot-marvell v2 04/39] tools: kwboot: Refactor and fix writing buffer

2021-09-07 Thread Marek Behún
There are 3 instances in kwboot.c where we need to write() a given buffer whole (iteratively writing until all data are written), and 2 of those instances are wrong, for they do not increment the buffer pointer. Refactor the code into a new function kwboot_write() where it is fixed. Signed-off-by

[PATCH u-boot-marvell v2 01/39] tools: kwbimage: Fix printf format warning

2021-09-07 Thread Marek Behún
On 32-bit ARM the compiler complains: tools/kwbimage.c:547: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ Fix this by using %zu instead of %lu format specifier. Signed-

[PATCH u-boot-marvell v2 00/39] kwboot higher baudrate

2021-09-07 Thread Marek Behún
Hello Stefan and others, here's v2 of series adding support for booting Marvell platforms via UART (those bootable with kwboot) at higher baudrates. Tested on Turris Omnia up to 5.15 MBd, which is 44x faster than 115200 Bd. The user can direct kwboot to use higher baudrate via the -B option. (BT

[PULL] u-boot-riscv/master

2021-09-07 Thread Leo Liang
Hi Tom, The following changes since commit ad320c237bea7ece659efaf6c1d43475e0e5db6a: Merge tag 'u-boot-stm32-20210906' of https://source.denx.de/u-boot/custodians/u-boot-stm (2021-09-06 10:31:56 -0400) are available in the Git repository at: https://source.denx.de/u-boot/custodians/u-boot-

Re: tftp time outs

2021-09-07 Thread Harm Berntsen
Hi Matteo, Which version of U-Boot are you using? Try setting the following environment variables: tftpblocksize=512 tftptimeout=1 -- Harm -Original Message- From: Matteo Guglielmi To: u-boot@lists.denx.de Subject: tftp time outs Date: Sun, 05 Sep 2021 13:49:46 + Dear All,

[PATCH] board: fsl_validate: Double free Issue Solved

2021-09-07 Thread Kshitiz Varshney
Removed Double free issue from calc_img_key_hash() and calc_esbchdr_esbc_hash() function. Verified the secure boot changes using lx2162aqds board. Signed-off-by: Kshitiz Varshney --- board/freescale/common/fsl_validate.c | 28 ++- drivers/crypto/fsl/fsl_hash.c | 1

[PATCH 1/1] efi_loader: require CONFIG_BLK

2021-09-07 Thread Heinrich Schuchardt
The move to driver model should by now be completed. To be able to remove pre-driver model code from our block IO code require CONFIG_BLK=y for UEFI support. Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/efi_loader/Kconfig b