Re: [PATCH v3 7/7] configs: j721s2_evm_r5_defconfig: Add AVS Configs

2024-08-14 Thread Kumar, Udit
On 8/13/2024 11:40 AM, Manorit Chawdhry wrote: Add AVS and PMIC regulator configs Signed-off-by: Manorit Chawdhry --- configs/am68_sk_r5_defconfig| 4 configs/j721s2_evm_r5_defconfig | 6 ++ 2 files changed, 10 insertions(+) diff --git a/configs/am68_sk_r5_defconfig b/config

Re: [PATCH v3 6/7] arm: dts: j721s2: Add VTM node in R5

2024-08-14 Thread Kumar, Udit
On 8/13/2024 11:40 AM, Manorit Chawdhry wrote: Add bootph-pre-ram property to VTM node and the pmic node. Signed-off-by: Manorit Chawdhry --- arch/arm/dts/k3-j721s2-r5-common-proc-board.dts | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm/dts/k3-j721s2-r5-common-proc-b

Re: [PATCH v3 5/7] arm: mach-k3: j721s2_init: Initialize AVS Class 0

2024-08-14 Thread Kumar, Udit
On 8/13/2024 11:40 AM, Manorit Chawdhry wrote: Initialize AVS Class 0. Signed-off-by: Manorit Chawdhry --- arch/arm/mach-k3/j721s2/j721s2_init.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/mach-k3/j721s2/j721s2_init.c b/arch/arm/mach-k3/j721s2/j721s2_init.c in

Re: [PATCH v3 4/7] drivers: misc: k3_avs: Extract MPU clk and dev ID from DT

2024-08-14 Thread Kumar, Udit
On 8/13/2024 11:40 AM, Manorit Chawdhry wrote: Different devices have different MPU clk and dev ID. Currently it had been hardcoded. Move it to DT based extraction. Signed-off-by: Manorit Chawdhry --- drivers/misc/k3_avs.c | 37 + 1 file changed, 37 inse

Re: [PATCH v3 3/7] arm: dts: k3-j7*-r5: Add MPU clock in clocks property

2024-08-14 Thread Kumar, Udit
On 8/13/2024 11:40 AM, Manorit Chawdhry wrote: MPU clock had been missing. Distinguish multiple clocks with clock-names and add MPU clock as well. Signed-off-by: Manorit Chawdhry --- arch/arm/dts/k3-am69-r5-sk.dts | 3 ++- arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 3

Re: [PATCH 00/11] mach-snapdragon: various improvements for newer boards

2024-08-14 Thread Luka Panio
Whole series tested on Galaxy Z Fold 5 (q5q) with sm8550 (kailua) SoC, with these changes i can confirm u-boot booting to console. Without it it's stuck at boot, as bootloader dtb is never parsed. Tested-by: Luka Panio Best Regards, Luka

Re: [PATCH 3/9] sunxi: H616: dram: LPDDR4: adjust settings

2024-08-14 Thread Chris Morgan
On Sat, Aug 03, 2024 at 03:29:17PM +0300, Mikhail Kalashnikov wrote: > > On 02.08.2024 01:55, Chris Morgan wrote: > > From: Jernej Skrabec > > > > Adjust H616 LPDDR4 DRAM settings to be in line with vendor driver. > > > > Signed-off-by: Jernej Skrabec > > Tested-by: Chris Morgan > > --- > >

[PATCH 2/3] tqma6_mba6: Remove unused defines

2024-08-14 Thread Fabio Estevam
From: Fabio Estevam The PAD_CTRL definitions are not used anywhere. Remove them to make the code cleaner. Signed-off-by: Fabio Estevam --- board/tq/tqma6/tqma6_mba6.c | 19 --- 1 file changed, 19 deletions(-) diff --git a/board/tq/tqma6/tqma6_mba6.c b/board/tq/tqma6/tqma6_mba

[PATCH 3/3] tqma6_mba6: Remove UART board code

2024-08-14 Thread Fabio Estevam
From: Fabio Estevam With DM_SERIAL in place, there is no need to setup the UART pins in the board code. The UART pins are setup via devicetree, thanks to DM. Remove the unneeded code. Signed-off-by: Fabio Estevam --- arch/arm/dts/imx6qdl-mba6-u-boot.dtsi | 16 board/tq/tqma6

[PATCH 1/3] tqma6: Remove non-DM board code

2024-08-14 Thread Fabio Estevam
From: Fabio Estevam CONFIG_DM_MMC and CONFIG_DM_SPI are alway selected so the mmc and spi board code can be safely removed. Remove it to make the code cleaner. Signed-off-by: Fabio Estevam --- board/tq/tqma6/tqma6.c | 126 - 1 file changed, 126 deletion

Re: [PATCH v5 00/27] Integrate MbedTLS v3.6 LTS with U-Boot

2024-08-14 Thread Tom Rini
On Wed, Aug 14, 2024 at 01:49:43PM -0400, Raymond Mao wrote: > Hi Tom, > > On Wed, 14 Aug 2024 at 11:07, Tom Rini wrote: > > > On Wed, Aug 14, 2024 at 09:42:08AM -0400, Raymond Mao wrote: > > > Hi Tom, > > > > > > On Fri, 2 Aug 2024 at 11:34, Raymond Mao wrote: > > > > > > > Hi Tom, > > > > > >

Re: [PATCH v2 37/39] efi: Avoid using sandbox virtio devices

2024-08-14 Thread Tom Rini
On Sun, Aug 11, 2024 at 08:50:21AM -0600, Simon Glass wrote: > Hi Tom, > > On Thu, 8 Aug 2024 at 14:06, Tom Rini wrote: > > > > On Thu, Aug 08, 2024 at 12:44:05PM -0600, Simon Glass wrote: > > > Hi Heinrick, Tom, > > > > > > On Tue, 6 Aug 2024 at 19:56, Tom Rini wrote: > > > > > > > > On Wed, Au

Re: [PATCH v5 00/27] Integrate MbedTLS v3.6 LTS with U-Boot

2024-08-14 Thread Raymond Mao
Hi Tom, On Wed, 14 Aug 2024 at 11:07, Tom Rini wrote: > On Wed, Aug 14, 2024 at 09:42:08AM -0400, Raymond Mao wrote: > > Hi Tom, > > > > On Fri, 2 Aug 2024 at 11:34, Raymond Mao wrote: > > > > > Hi Tom, > > > > > > On Thu, 1 Aug 2024 at 16:46, Tom Rini wrote: > > > > > >> On Wed, Jul 31, 2024

Re: OF_UPSTREAM vs. additional dtbs

2024-08-14 Thread Jan Kiszka
On 14.08.24 11:41, Jan Kiszka wrote: > On 13.08.24 14:52, Nishanth Menon wrote: >> On 11:16-20240813, Jan Kiszka wrote: >>> Hi all, >>> >>> I'm trying to migrate the TI AM65x IOT2050 boards to OF_UPSTREAM but I'm >>> facing issues because I need to still build the u-boot-only overlays. It >>> is al

Re: [PATCH v5 00/27] Integrate MbedTLS v3.6 LTS with U-Boot

2024-08-14 Thread Tom Rini
On Wed, Aug 14, 2024 at 09:42:08AM -0400, Raymond Mao wrote: > Hi Tom, > > On Fri, 2 Aug 2024 at 11:34, Raymond Mao wrote: > > > Hi Tom, > > > > On Thu, 1 Aug 2024 at 16:46, Tom Rini wrote: > > > >> On Wed, Jul 31, 2024 at 10:25:10AM -0700, Raymond Mao wrote: > >> > > >> > Integrate MbedTLS v3.

Re: [PATCH v4 06/10] arm: mach-k3: am62x: am625_init: Probe AM65 CPSW NUSS

2024-08-14 Thread Andrew Davis
On 8/14/24 12:17 AM, Chintan Vankar wrote: On 13/08/24 23:57, Andrew Davis wrote: On 8/12/24 6:48 AM, Chintan Vankar wrote: From: Kishon Vijay Abraham I In order to support Ethernet boot on AM62x, probe AM65 CPSW NUSS driver in board_init_f(). Signed-off-by: Kishon Vijay Abraham I Signed-

Re: u-boot does not detect and correct bitflip when loading kernel from NAND

2024-08-14 Thread Fabio Estevam
On Wed, Aug 14, 2024 at 11:19 AM wrote: > Phytec pcm052 (Vybrid vf610), Micron MT29F4G16 …., U-Boot Timesys 2013.07, > Kernel 3.13 That's super old. Please run U-Boot 2024.07 with a modern kernel and check if the problem still exists.

u-boot does not detect and correct bitflip when loading kernel from NAND

2024-08-14 Thread jackie
Hi to all and especially to Albert ARIBAUD, who is I think the maintainer of my board. I’m new to U-Boot and I’m trying to solve an issue regarding NAND Flash. Issue: After system reboot U-Boot loads the same Kernel from NAND into RAM without any error message, whoever the Kernel says ‘Verifyin

[PATCH] maintainers: Update list of maintainers for Corstone-1000

2024-08-14 Thread Hugues KAMBA MPIANA
From: Hugues Kamba Mpiana - Add new maintainer: Hugues KAMBA MPIANA - Remove maintainer: Xueliang ZHONG - Update contact information for current maintainer. Signed-off-by: Hugues KAMBA MPIANA --- board/armltd/corstone1000/MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [PATCH v3] driver: pwm: pwm-imx: fix probing on imx6

2024-08-14 Thread Tom Rini
On Wed, Aug 14, 2024 at 02:10:27PM +0200, Heiko Schocher wrote: > U-Boot 2024.07 drops on aristainetos2 board the following > warning: > > Failed to enable per_clk > > and bootlogo is not seen on LVDS display. > > This patch uses old behaviour for systems without clock framework > if CONF

Re: [PATCH v2] driver: pwm: pwm-imx: fix probing on imx6

2024-08-14 Thread Tom Rini
On Wed, Aug 14, 2024 at 06:07:52AM +0200, Heiko Schocher wrote: > Hello Tom, > > On 13.08.24 18:16, Tom Rini wrote: > > On Tue, Aug 13, 2024 at 03:57:08PM +0200, Heiko Schocher wrote: > > > Hello Fabio, Tom, > > > > > > On 13.08.24 14:27, Fabio Estevam wrote: > > > > Hi Heiko, > > > > > > > > On

Re: [GIT PULL] Please pull u-boot-imx-master-20240813

2024-08-14 Thread Tom Rini
On Tue, Aug 13, 2024 at 10:54:45AM -0300, Fabio Estevam wrote: > Hi Tom, > > Please pull from u-boot-imx/master, thanks. > > The following changes since commit 06dceeba3d4515ccfbe37b8989ee047a7628aee3: > > Merge tag 'u-boot-rockchip-20240812' of > https://source.denx.de/u-boot/custodians/u-b

Re: Please pull u-boot-i2c next

2024-08-14 Thread Tom Rini
On Tue, Aug 13, 2024 at 12:44:29PM +0200, Heiko Schocher wrote: > Hello Tom, > > please pull from u-boot-i2c next > > The following changes since commit f4f845b859266790b97421f0740efce36bc9b8d2: > > Merge patch series "Universal Payload initial series" (2024-08-09 16:03:21 > -0600) > > are

[PATCH] Kconfig: clean up the efi configuration status

2024-08-14 Thread Ilias Apalodimas
The EFI_LOADER and EFI config options are randomly scattered under lib/ making it cumbersome to navigate and enable options, unless you really know what you are doing. On top of that the existing options are in random order instead of a logical one. So let's move things around a bit and present tw

Re: [PATCH v5 00/27] Integrate MbedTLS v3.6 LTS with U-Boot

2024-08-14 Thread Raymond Mao
Hi Tom, On Fri, 2 Aug 2024 at 11:34, Raymond Mao wrote: > Hi Tom, > > On Thu, 1 Aug 2024 at 16:46, Tom Rini wrote: > >> On Wed, Jul 31, 2024 at 10:25:10AM -0700, Raymond Mao wrote: >> > >> > Integrate MbedTLS v3.6 LTS (currently v3.6.0) with U-Boot. >> > >> > Motivations: >> > >> >

Re: [PATCH v5 02/27] mbedtls: add mbedtls into the build system

2024-08-14 Thread Ilias Apalodimas
On Wed, 14 Aug 2024 at 16:22, Raymond Mao wrote: > > Hi Ilias, > > On Wed, 14 Aug 2024 at 08:08, Ilias Apalodimas > wrote: >> >> Hi Raymond, >> >> On Wed, 31 Jul 2024 at 20:27, Raymond Mao wrote: >> > >> > Port mbedtls with adapted libc header files. >> > Add mbedtls default config header file.

Re: [PATCH v5 02/27] mbedtls: add mbedtls into the build system

2024-08-14 Thread Raymond Mao
Hi Ilias, On Wed, 14 Aug 2024 at 08:08, Ilias Apalodimas wrote: > Hi Raymond, > > On Wed, 31 Jul 2024 at 20:27, Raymond Mao wrote: > > > > Port mbedtls with adapted libc header files. > > Add mbedtls default config header file. > > Optimize mbedtls default config by disabling unused features to

Re: [PATCH v2 2/3] efi: Convert device_path allocation to use malloc()

2024-08-14 Thread Ilias Apalodimas
Hi Simon On Wed, 14 Aug 2024 at 15:40, Simon Glass wrote: > > Hi Ilias, > > On Wed, 14 Aug 2024 at 05:03, Ilias Apalodimas > wrote: > > > > Hi Simon, > > > > On Thu, 1 Aug 2024 at 20:36, Simon Glass wrote: > > > > > > Currently this calls efi_alloc() which reserves a page for each > > > allocat

Re: [PATCH 07/21] Revert "net: wget: Support retransmission a dropped packet"

2024-08-14 Thread Yasuharu Shibata
Dear Simon, Thank you for checking my patch. I sent patch series including enabling wget command for sandbox. https://lore.kernel.org/u-boot/20240814124108.2885-1-yasuharu.shib...@gmail.com/T/#u Best regards, Yasuharu Shibata On Wed, 14 Aug 2024 at 00:12, Simon Glass wrote: > > Hi Yasuharu, >

Re: [PATCH] tools/mkeficapsule: correct printf codes

2024-08-14 Thread Mark Kettenis
> From: Heinrich Schuchardt > Date: Wed, 14 Aug 2024 14:33:44 +0200 > > uint64_t is defined as unsigned long long on 32-bit ARM. > Use PRIX64 for printing uint64_t. > > This avoid a build failure on 32-bit systems: > > tools/mkeficapsule.c: In function 'dump_capsule_auth_header': > tool

Re: [PATCH v3 00/40] efi: Add a test for EFI bootmeth

2024-08-14 Thread Ilias Apalodimas
Hi Simon, On Wed, 14 Aug 2024 at 15:41, Simon Glass wrote: > > Hi Ilias, > > On Mon, 12 Aug 2024 at 07:28, Ilias Apalodimas > wrote: > > > > Hi Simon > > > > On Sun, 11 Aug 2024 at 17:52, Simon Glass wrote: > > > > > > The test coverage for the EFI bootmeth is incomplete since it does not > >

Re: [PATCH 1/1] tools/mkeficapsule: correct printf codes

2024-08-14 Thread Heinrich Schuchardt
On 14.08.24 14:40, Simon Glass wrote: Hi Heinrich, On Wed, 14 Aug 2024 at 01:14, Heinrich Schuchardt wrote: uint64_t is defined as unsigned long long on 32bit ARM. Convert uint64_t values to unsigned long long and use %llX for printing. tools/mkeficapsule.c: In function ‘dump_capsule_au

Re: [PATCH v3 1/1] ata: sata_rescan must scan for block devices

2024-08-14 Thread Heinrich Schuchardt
On 14.08.24 14:40, Simon Glass wrote: On Wed, 14 Aug 2024 at 01:10, Heinrich Schuchardt wrote: A system may have multiple SATA controller. Removing the controller with the lowest sequence number before probing all SATA controllers makes no sense. In sata_rescan we remove all block devices whi

[PATCH 2/2] sandbox: fix wget test failure after fixing wget issue

2024-08-14 Thread Yasuharu Shibata
After applying the following patch, wget test on sandbox failed[1]. Commit: cab7867cff ("net: wget: Support retransmission a dropped packet") Here are two reasons why the test is failed and how to fix it: 1. tcp_ack is calculated by the wrong value. tcp_ack needs to be calculated by the rec

[PATCH 1/2] sandbox: Enable wget command

2024-08-14 Thread Yasuharu Shibata
Enable this so that the tests run. Fix a few warnings in the code so that CI passes. Signed-off-by: Simon Glass Signed-off-by: Yasuharu Shibata --- cmd/Kconfig | 1 + net/wget.c | 7 +++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index 978f44e

Re: [PATCH v3 00/40] efi: Add a test for EFI bootmeth

2024-08-14 Thread Simon Glass
Hi Ilias, On Mon, 12 Aug 2024 at 07:28, Ilias Apalodimas wrote: > > Hi Simon > > On Sun, 11 Aug 2024 at 17:52, Simon Glass wrote: > > > > The test coverage for the EFI bootmeth is incomplete since it does not > > actually boot the application. > > > > This series creates a simple test for this p

Re: [PATCH 23/40] lmb: add a flags parameter to the API's

2024-08-14 Thread Simon Glass
Hi Sughosh, On Wed, 14 Aug 2024 at 02:13, Sughosh Ganu wrote: > > On Fri, 9 Aug 2024 at 21:28, Simon Glass wrote: > > > > Hi Sughosh, > > > > On Fri, 9 Aug 2024 at 02:25, Sughosh Ganu wrote: > > > > > > On Thu, 8 Aug 2024 at 19:58, Simon Glass wrote: > > > > > > > > Hi Sughosh, > > > > > > > >

Re: [PATCH 1/1] tools/mkeficapsule: correct printf codes

2024-08-14 Thread Simon Glass
Hi Heinrich, On Wed, 14 Aug 2024 at 01:14, Heinrich Schuchardt wrote: > > uint64_t is defined as unsigned long long on 32bit ARM. > Convert uint64_t values to unsigned long long and use %llX for printing. > > tools/mkeficapsule.c: In function ‘dump_capsule_auth_header’: > tools/mkeficapsu

Re: [PATCH v2 2/3] efi: Convert device_path allocation to use malloc()

2024-08-14 Thread Simon Glass
Hi Ilias, On Wed, 14 Aug 2024 at 05:03, Ilias Apalodimas wrote: > > Hi Simon, > > On Thu, 1 Aug 2024 at 20:36, Simon Glass wrote: > > > > Currently this calls efi_alloc() which reserves a page for each > > allocation and this can overwrite memory that will be used for reading > > images. > > > >

Re: [PATCH v3 1/1] ata: sata_rescan must scan for block devices

2024-08-14 Thread Simon Glass
On Wed, 14 Aug 2024 at 01:10, Heinrich Schuchardt wrote: > > A system may have multiple SATA controller. Removing the controller with > the lowest sequence number before probing all SATA controllers makes no > sense. > > In sata_rescan we remove all block devices which are children of SATA > contr

Re: [PATCH v3 1/1] ata: sata_rescan must scan for block devices

2024-08-14 Thread Tony Dinh
Hi Heinrich, On Wed, Aug 14, 2024 at 2:10 PM Heinrich Schuchardt wrote: > > A system may have multiple SATA controller. Removing the controller with > the lowest sequence number before probing all SATA controllers makes no > sense. > > In sata_rescan we remove all block devices which are children

Re: [PATCH] tools/mkeficapsule: correct printf codes

2024-08-14 Thread Ilias Apalodimas
Thanks Heinrich On Wed, 14 Aug 2024 at 15:33, Heinrich Schuchardt wrote: > > uint64_t is defined as unsigned long long on 32-bit ARM. > Use PRIX64 for printing uint64_t. > > This avoid a build failure on 32-bit systems: > > tools/mkeficapsule.c: In function 'dump_capsule_auth_header': >

[PATCH] tools/mkeficapsule: correct printf codes

2024-08-14 Thread Heinrich Schuchardt
uint64_t is defined as unsigned long long on 32-bit ARM. Use PRIX64 for printing uint64_t. This avoid a build failure on 32-bit systems: tools/mkeficapsule.c: In function 'dump_capsule_auth_header': tools/mkeficapsule.c:694:66: warning: format '%lX' expects argument of type 'long unsi

Re: [PATCH 1/1] tools/mkeficapsule: correct printf codes

2024-08-14 Thread Heinrich Schuchardt
On 14.08.24 13:40, Ilias Apalodimas wrote: Hi Heinrich, On Wed, 14 Aug 2024 at 10:14, Heinrich Schuchardt wrote: uint64_t is defined as unsigned long long on 32bit ARM. Convert uint64_t values to unsigned long long and use %llX for printing. Why do we need to convert? uint64_t is a fixed wi

[PATCH v3] driver: pwm: pwm-imx: fix probing on imx6

2024-08-14 Thread Heiko Schocher
U-Boot 2024.07 drops on aristainetos2 board the following warning: Failed to enable per_clk and bootlogo is not seen on LVDS display. This patch uses old behaviour for systems without clock framework if CONFIG_CLK is not enabled. Fixes: bfc778cb93a3 ("driver: pwm: pwm-imx: get and enabl

Re: [PATCH v5 02/27] mbedtls: add mbedtls into the build system

2024-08-14 Thread Ilias Apalodimas
Hi Raymond, On Wed, 31 Jul 2024 at 20:27, Raymond Mao wrote: > > Port mbedtls with adapted libc header files. > Add mbedtls default config header file. > Optimize mbedtls default config by disabling unused features to > reduce the target size. > Add mbedtls kbuild makefile. > Add Kconfig skeleton

Re: [PATCH v2] driver: pwm: pwm-imx: fix probing on imx6

2024-08-14 Thread Fabio Estevam
Hi Heiko, On Wed, Aug 14, 2024 at 1:11 AM Heiko Schocher wrote: > Hmm.. yes, setting a default value is a good option, so I would add > a check, if define is not set yet? > > And we should simply let the name "CFG_IMX6_PWM_PER_CLK" ? Yes, that is OK. > If okay, I can make a v3 if you want? Ye

Re: [PATCH 1/1] tools/mkeficapsule: correct printf codes

2024-08-14 Thread Sughosh Ganu
On Wed, 14 Aug 2024 at 17:10, Ilias Apalodimas wrote: > > Hi Heinrich, > > On Wed, 14 Aug 2024 at 10:14, Heinrich Schuchardt > wrote: > > > > uint64_t is defined as unsigned long long on 32bit ARM. > > Convert uint64_t values to unsigned long long and use %llX for printing. > > Why do we need to

Re: [PATCH 1/1] tools/mkeficapsule: correct printf codes

2024-08-14 Thread Ilias Apalodimas
Hi Heinrich, On Wed, 14 Aug 2024 at 10:14, Heinrich Schuchardt wrote: > > uint64_t is defined as unsigned long long on 32bit ARM. > Convert uint64_t values to unsigned long long and use %llX for printing. Why do we need to convert? uint64_t is a fixed width type Thanks /Ilias > > tools/mkef

Re: [PATCH 1/1] tools/mkeficapsule: correct printf codes

2024-08-14 Thread Sughosh Ganu
On Wed, 14 Aug 2024 at 12:44, Heinrich Schuchardt wrote: > > uint64_t is defined as unsigned long long on 32bit ARM. > Convert uint64_t values to unsigned long long and use %llX for printing. > > tools/mkeficapsule.c: In function ‘dump_capsule_auth_header’: > tools/mkeficapsule.c:694:66: w

[PATCH v2 32/32] lmb: add logic to print lmb flag strings

2024-08-14 Thread Sughosh Ganu
Instead of printing the LMB flags as numerical values, print them as strings. This makes it easier to understand what flags are associated with the lmb region. Also make corresponding changes to the bdinfo command's test code. Signed-off-by: Sughosh Ganu --- Changes since V1: New patch lib/lmb.

[PATCH v2 31/32] lmb: ut: re-enable unit tests

2024-08-14 Thread Sughosh Ganu
All the changes needed for making the LMB memory map persistent and global have been made, including making corresponding changes in the test code. Re-enable the unit tests on the platforms. Signed-off-by: Sughosh Ganu --- Changes since V1: None configs/sandbox64_defconfig| 4 +++- conf

[PATCH v2 30/32] sandbox: adjust load address of couple of tests

2024-08-14 Thread Sughosh Ganu
The TCG event log has now been moved to the start of the memory, and occupies 8KB of memory. Make a corresponding change to the load address in a couple of tests so that it does not overlap with the TCG event log. Signed-off-by: Sughosh Ganu --- Changes since V1: None test/py/tests/test_android

Re: [PATCH v2 2/3] efi: Convert device_path allocation to use malloc()

2024-08-14 Thread Ilias Apalodimas
Hi Simon, On Thu, 1 Aug 2024 at 20:36, Simon Glass wrote: > > Currently this calls efi_alloc() which reserves a page for each > allocation and this can overwrite memory that will be used for reading > images. > > Switch the code to use malloc(), as with other parts of EFI, such as > efi_add_proto

[PATCH v2 29/32] test: bdinfo: dump the global LMB memory map

2024-08-14 Thread Sughosh Ganu
The LMB code has been changed to make the memory reservations persistent and global. Make corresponding change the the lmb_test_dump_all() function to print the global LMB available and used memory. Signed-off-by: Sughosh Ganu --- Changes since V1: * Get the alloced lists through the lmb_get() fu

[PATCH v2 28/32] test: lmb: tweak the tests for the persistent lmb memory map

2024-08-14 Thread Sughosh Ganu
The LMB memory maps are now persistent, with alloced lists being used to keep track of the available and free memory. Make corresponding changes in the test functions so that the list information can be accessed by the tests for checking against expected values. Also introduce functions to initiali

[PATCH v2 27/32] test: cedit: use allocated address for reading file

2024-08-14 Thread Sughosh Ganu
Instead of a randomly selected address, use an LMB allocated one for reading the file into memory. With the LMB map now being persistent and global, the address used for reading the file might be already allocated as non-overwritable, resulting in a failure. Get a valid address from LMB and then re

[PATCH v2 26/32] stm32mp: compute ram_top based on the optee base address

2024-08-14 Thread Sughosh Ganu
The value of ram_top address currently gets computed in an indirect manner. The boot_fdt_add_mem_rsv_regions() function gets called first to reserve the memory region occupied by OP-TEE in the LMB memory map. This is followed by a call to the lmb_alloc() API, which returns an address which is below

[PATCH v2 25/32] stm32mp: allow calling optee_get_reserved_memory() from U-Boot

2024-08-14 Thread Sughosh Ganu
The optee_get_reserved_memory() function returns the OP-TEE base address and size. The function gets these values from the FDT. Currently, this function is defined only to be called in the SPL phase. Move this function to a place where it can be invoked from the main U-Boot phase, where it will be

[PATCH v2 24/32] zynq: lmb: do not add to lmb map before relocation

2024-08-14 Thread Sughosh Ganu
The LMB memory is typically not needed very early in the platform's boot. Do not add memory to the LMB map before relocation. Reservation of common areas and adding of memory is done after relocation. Signed-off-by: Sughosh Ganu --- Changes since V1: None board/xilinx/common/board.c | 31 --

[PATCH v2 23/32] sandbox: iommu: remove lmb allocation in the driver

2024-08-14 Thread Sughosh Ganu
The sandbox iommu driver uses the LMB module to allocate a particular range of memory for the device virtual address(DVA). This used to work earlier since the LMB memory map was caller specific and not global. But with the change to make the LMB allocations global and persistent, adding this memory

[PATCH v2 22/32] sandbox: spl: enable lmb config for SPL

2024-08-14 Thread Sughosh Ganu
Enable the LMB config in SPL. This helps in testing the LMB code in SPL on sandbox. Signed-off-by: Sughosh Ganu --- Changes since V1: None configs/sandbox_noinst_defconfig | 1 + configs/sandbox_spl_defconfig| 1 + 2 files changed, 2 insertions(+) diff --git a/configs/sandbox_noinst_defcon

[PATCH v2 21/32] spl: sandbox: initialise the ram banksize in spl

2024-08-14 Thread Sughosh Ganu
Initialise the ram bank information for sandbox in SPL. This is needed for adding available memory to the LMB memory map, which is done as part of the initialisation sequence. Signed-off-by: Sughosh Ganu --- Changes since V1: * Update the commit message to explain why this change is being done.

[PATCH v2 20/32] spl: call spl_board_init() at the end of the spl init sequence

2024-08-14 Thread Sughosh Ganu
The spl_board_init() function on sandbox invokes the unit tests. Invoking the tests should be done once the rest of the system has been initialised. Call the spl_board_init() function at the very end, once the rest of the initilisation functions have been called, including the setting up of the LMB

[PATCH v2 18/32] lmb: add a common implementation of arch_lmb_reserve()

2024-08-14 Thread Sughosh Ganu
Almost all of the current definitions of arch_lmb_reserve() are doing the same thing. The only exception in a couple of cases is the alignment parameter requirement. Have a generic weak implementation of this function, keeping the highest value of alignment that is being used(16K). Also, instead o

[PATCH v2 19/32] sandbox: move the TCG event log to the start of ram memory

2024-08-14 Thread Sughosh Ganu
The TCG event log buffer is being set at the end of ram memory. This region of memory is to be reserved as LMB_NOMAP memory in the LMB memory map. The current location of this buffer overlaps with the memory region reserved for the U-Boot image, which is at the top of the usable memory. This worked

[PATCH v2 17/32] lmb: init: initialise the lmb data structures during board init

2024-08-14 Thread Sughosh Ganu
The memory map maintained by the LMB module is now persistent and global. This memory map is being maintained through the alloced list structure which can be extended at runtime -- there is one list for the available memory, and one for the used memory. Allocate and initialise these lists during th

[PATCH v2 16/32] lmb: bootm: remove superfluous lmb stub functions

2024-08-14 Thread Sughosh Ganu
Remove a couple of superfluous LMB stub functions, and instead put a check for calling the lmb_reserve() function. Signed-off-by: Sughosh Ganu Reviewed-by: Simon Glass --- Changes since V1: None boot/bootm.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/boot/boot

[PATCH v2 15/32] lmb: reserve common areas during board init

2024-08-14 Thread Sughosh Ganu
The LMB module provides API's for allocating and reserving chunks of memory which is then typically used for things like loading images for booting. Reserve the portion of memory that is occupied by the U-Boot image itself, and other parts of memory that might have been marked as reserved in the bo

[PATCH v2 14/32] lmb: introduce a function to add memory to the lmb memory map

2024-08-14 Thread Sughosh Ganu
Introduce a function lmb_add_memory() to add available memory to the LMB memory map. Call this function during board init once the LMB data structures have been initialised. Signed-off-by: Sughosh Ganu --- Changes since V1: * Call the lmb_add_memory() from lmb_init() instead of lmb_mem_regions_

[PATCH v2 13/32] lmb: remove lmb_init_and_reserve_range() function

2024-08-14 Thread Sughosh Ganu
With the move to make the LMB allocations persistent and the common memory regions being reserved during board init, there is no need for an explicit reservation of a memory range. Remove the lmb_init_and_reserve_range() function. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas Reviewe

[PATCH v2 12/32] lmb: remove the lmb_init_and_reserve() function

2024-08-14 Thread Sughosh Ganu
With the changes to make the LMB reservations persistent, the common memory regions are being added during board init. Remove the now superfluous lmb_init_and_reserve() function. Signed-off-by: Sughosh Ganu Reviewed-by: Simon Glass Reviewed-by: Ilias Apalodimas --- Changes since V1: None arch

[PATCH v2 11/32] lmb: allow lmb module to be used in SPL

2024-08-14 Thread Sughosh Ganu
With the introduction of separate config symbols for the SPL phase of U-Boot, the condition checks need to be tweaked so that platforms that enable the LMB module in SPL are also able to call the LMB API's. Use the appropriate condition checks to achieve this. Signed-off-by: Sughosh Ganu --- Chan

[PATCH v2 10/32] lmb: config: add lmb config symbols for SPL

2024-08-14 Thread Sughosh Ganu
Add separate config symbols for enabling the LMB module for the SPL phase. The LMB module implementation now relies on alloced list data structure which requires heap area to be present. Add specific config symbol for the SPL phase of U-Boot so that this can be enabled on platforms which support a

[PATCH v2 09/32] test: lmb: remove the test for max regions

2024-08-14 Thread Sughosh Ganu
The LMB memory map is now persistent and global, and the CONFIG_LMB_USE_MAX_REGIONS config symbol has now been removed. Remove the corresponding lmb test case. Signed-off-by: Sughosh Ganu Reviewed-by: Simon Glass Reviewed-by: Ilias Apalodimas --- Changes since V1: None test/lib/lmb.c | 67 ---

[PATCH v2 08/32] lmb: remove config symbols used for lmb region count

2024-08-14 Thread Sughosh Ganu
The LMB memory maps are now being maintained through a couple of alloced lists, one for the available(added) memory, and one for the used memory. These lists are not static arrays but can be extended at runtime. Remove the config symbols which were being used to define the size of these lists with

[PATCH v2 07/32] lmb: allow for resizing lmb regions

2024-08-14 Thread Sughosh Ganu
Allow for resizing of LMB regions if the region attributes match. The current code returns a failure status on detecting an overlapping address. This worked up until now since the LMB calls were not persistent and global -- the LMB memory map was specific and private to a given caller of the LMB AP

[PATCH v2 06/32] lmb: make LMB memory map persistent and global

2024-08-14 Thread Sughosh Ganu
The current LMB API's for allocating and reserving memory use a per-caller based memory view. Memory allocated by a caller can then be overwritten by another caller. Make these allocations and reservations persistent using the alloced list data structure. Two alloced lists are declared -- one for

[PATCH v2 05/32] lmb: use the BIT macro for lmb flags

2024-08-14 Thread Sughosh Ganu
Use the BIT macro for assigning values to the LMB flags instead of assigning random values to them. Signed-off-by: Sughosh Ganu --- Changes since V1: None include/lmb.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/lmb.h b/include/lmb.h index 7b87181b9e..a1de1

[PATCH v2 04/32] lmb: staticize __lmb_alloc_base()

2024-08-14 Thread Sughosh Ganu
The __lmb_alloc_base() function is only called from within the lmb module. Moreover, the lmb_alloc() and lmb_alloc_base() API's are good enough for the allocation API calls. Make the __lmb_alloc_base() function static. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas Reviewed-by: Simon

[PATCH v2 03/32] lmb: remove the unused lmb_is_reserved() function

2024-08-14 Thread Sughosh Ganu
The lmb_is_reserved() API is not used. There is another API, lmb_is_reserved_flags() which can be used to check if a particular memory region is reserved. Remove the unused API. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas Reviewed-by: Simon Glass --- Changes since V1: None inclu

[PATCH v2 02/32] lmb: ut: disable unit tests for lmb changes

2024-08-14 Thread Sughosh Ganu
The LMB module code is being overhauled to make it's memory map global and persistent. This involves extensive changes to the LMB code. Disable the unit test code temporarily till the changes are in place. These tests will be enabled in a subsequent commit once all the LMB module and the correspond

[PATCH v2 01/32] alist: add a helper to check if the list is full

2024-08-14 Thread Sughosh Ganu
Add a helper function to check if the alist is full. This can then be used to extend the alist. Signed-off-by: Sughosh Ganu --- Changes since V1: * Do away with the alist_empty() function, as it is no longer needed include/alist.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a

[PATCH v2 00/32] Make LMB memory map global and persistent

2024-08-14 Thread Sughosh Ganu
This is a follow-up from an earlier RFC series [1] for making the LMB and EFI memory allocations work together. This is a non-rfc version with only the LMB part of the patches, for making the LMB memory map global and persistent. This is part one of a set of patches which aim to have the LMB and

[RESEND PATCH v3 9/9] net/netcat: add netcat over tcp support

2024-08-14 Thread Mikhail Kshevetskiy
This patch adds downloading/uploading of data with netcat. Client/server mode both supported. Signed-off-by: Mikhail Kshevetskiy --- cmd/Kconfig | 7 ++ cmd/net.c| 34 +++-- include/net.h| 2 +- include/net/netcat.h | 20 ++ net/Makefile | 1 +

[RESEND PATCH v3 8/9] net/tcp: define a fallback value for rcv_wnd size

2024-08-14 Thread Mikhail Kshevetskiy
Some driver implements it's own network packet pool, so PKTBUFSRX is zero. This results in zero-size TCP receive window, so data transfer doesn't work. Avod it by setting a reasonable fallback value. Signed-off-by: Mikhail Kshevetskiy --- net/tcp.c | 6 +- 1 file changed, 5 insertions(+), 1

[RESEND PATCH v3 6/9] net/tcp: improve tcp framework, use better state machine

2024-08-14 Thread Mikhail Kshevetskiy
Changes: * Fix initial send sequence always zero issue * Use state machine close to RFC 9293. This should make TCP transfers more reliable (now we can upload a huge array of data from the board to external server) * Improve TCP framework a lot. This should make tcp client code much more

[RESEND PATCH v3 7/9] net/tcp: simplify tcp header filling code

2024-08-14 Thread Mikhail Kshevetskiy
Signed-off-by: Mikhail Kshevetskiy --- net/tcp.c | 70 +-- 1 file changed, 37 insertions(+), 33 deletions(-) diff --git a/net/tcp.c b/net/tcp.c index 2c34556c26d..7014d5b4f43 100644 --- a/net/tcp.c +++ b/net/tcp.c @@ -527,10 +527,37 @@ void net

[RESEND PATCH v3 5/9] net/tcp: rename ack_edge and seq_init to more common rcv_nxt and irs

2024-08-14 Thread Mikhail Kshevetskiy
Use the names from RFC 9293 Signed-off-by: Mikhail Kshevetskiy --- include/net/tcp.h | 8 net/tcp.c | 32 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/include/net/tcp.h b/include/net/tcp.h index f224d0cae2f..0694af9d5b1 10064

[RESEND PATCH v3 4/9] net/tcp: add connection info to tcp_stream structure

2024-08-14 Thread Mikhail Kshevetskiy
Changes: * Avoid use net_server_ip in tcp code, use tcp_stream data instead * Ignore packets from other connections if connection already created. This prevents us from connection break caused by other tcp stream. Signed-off-by: Mikhail Kshevetskiy --- include/net.h | 5 +- include/n

[RESEND PATCH v3 3/9] net/tcp: put connection specific data into a tcp_stream structure

2024-08-14 Thread Mikhail Kshevetskiy
no functional changes Signed-off-by: Mikhail Kshevetskiy --- include/net/tcp.h | 37 +++- net/net.c | 11 ++- net/tcp.c | 231 +++--- net/wget.c| 3 +- 4 files changed, 163 insertions(+), 119 deletions(-) diff --git a/inclu

[RESEND PATCH v3 2/9] net/tcp: fix selective acknowledge

2024-08-14 Thread Mikhail Kshevetskiy
Current code assume that all (except last) packets are of the same size. This is definitely wrong. Replace SACK code with a new one, that does not rely on this assumption. Also this code uses less memory. Signed-off-by: Mikhail Kshevetskiy --- net/tcp.c | 200 +++-

[RESEND PATCH v3 1/9] net/tcp: fix TCP options processing

2024-08-14 Thread Mikhail Kshevetskiy
Current TCP code may miss an option if TCP_O_NOP option was used before it for proper aligning. Signed-off-by: Mikhail Kshevetskiy --- net/tcp.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/tcp.c b/net/tcp.c index b0cc8a1fe3e..3e3118de450 100644 --- a/net/tcp.c +

[RESEND PATCH v3 0/9] net: tcp: improve tcp support

2024-08-14 Thread Mikhail Kshevetskiy
U-Boot support of LWIP is not ready for a moment, but we already have some kind of tcp support. Unfrotunately this support is really bad. Some of the known issues: * tcp packet from other connection can break a current one * tcp send sequence always starts from zero * bad tcp options processing

[RESEND PATCH v2 3/3] cmd: mtd: add nandtest command support

2024-08-14 Thread Mikhail Kshevetskiy
This patch implements readonly test of nand flashes. Signed-off-by: Mikhail Kshevetskiy --- cmd/Kconfig | 6 ++ cmd/mtd.c | 203 2 files changed, 209 insertions(+) diff --git a/cmd/Kconfig b/cmd/Kconfig index 698e0e697f2..db5113e016b 1006

[RESEND PATCH v2 2/3] cmd: mtd: add torture command support

2024-08-14 Thread Mikhail Kshevetskiy
Some nand flashes (like spi-nand one) are registered with mtd subsystem only, thus nand command can't be used to work with such flashes. As result some functionality is missing. This patch implements 'nand torture' functionality for mtd command. Signed-off-by: Mikhail Kshevetskiy --- cmd/Kconfi

[RESEND PATCH v2 1/3] cmd: mtd: add markbad command support

2024-08-14 Thread Mikhail Kshevetskiy
Some nand flashes (like spi-nand one) are registered with mtd subsystem only, thus nand command can't be used to work with such flashes. As result some functionality is missing. This patch implements 'nand markbad' functionality for mtd command. Signed-off-by: Mikhail Kshevetskiy --- cmd/Kconfi

[RESEND PATCH v2 0/3] cmd/mtd: add missed featuries

2024-08-14 Thread Mikhail Kshevetskiy
Some nand flashes (like spi-nand one) are registered with mtd subsystem only, thus nand command can't be used to work with such flashes. As result some functionality is missing. This patch series implements following subcommands: * markbad -- mark block as bad (copy of 'nand markbad') * torture

[RESEND PATCH v4 10/10] mtd: nand: add initial ecc engine support

2024-08-14 Thread Mikhail Kshevetskiy
only spinand on_die ecc is supported for a moment Signed-off-by: Mikhail Kshevetskiy --- drivers/mtd/nand/Makefile | 2 +- drivers/mtd/nand/core.c | 130 +++- drivers/mtd/nand/ecc.c | 249 ++ drivers/mtd/nand/spi/core.c | 207 +

[RESEND PATCH v4 09/10] mtd: spinand: sync supported flashes with linux-6.10

2024-08-14 Thread Mikhail Kshevetskiy
Signed-off-by: Mikhail Kshevetskiy --- drivers/mtd/nand/spi/Makefile | 4 +- drivers/mtd/nand/spi/alliancememory.c | 155 drivers/mtd/nand/spi/ato.c| 84 +++ drivers/mtd/nand/spi/core.c | 5 +- drivers/mtd/nand/spi/esmt.c |

  1   2   >